WooCommerce - Translate WC Notices

lorro Aug 4th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Some WC Notices can't be translated with gettext, Loco Translate or Say What?
  3. // but they can be translated with a filter:
  4. add_filter( 'woocommerce_add_message', 'customize_messages' );
  5. function customize_messages( $message ) {
  6.   $message = str_replace( 'Customer matched zone', 'Zona coincidente del cliente', $message );
  7.   return $message;
  8. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand