• Resolved maheraldous

    (@maheraldous)


    Hello

    I just want to translate this https://prnt.sc/oo6pf1 untranslated string in WooCommerce but I couldn’t find this string anywhere in the Woocommerce .pot file or .po or .mo. Also I couldn’t translate it via “gettext” filter. So please can you update this string or give me a way to do it.

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The message is in class-wp-shipping.php, but its not a translatable string, so it can’t be changed with gettext, Loco Translate or Say What?

    Fortunately WooCommerce gives us a filter to be able to change notice messages. So:

    add_filter( 'woocommerce_add_message', 'customize_messages' );
    function customize_messages( $message ) {
      $message = str_replace( 'Customer matched zone', 'Zona coincidente del cliente', $message );
      return $message;
    }

    Works for me. Your setup may be different.

    Thread Starter maheraldous

    (@maheraldous)

    Thank you your code worked but is there is a way to addmy textdomain?

    There isn’t one because its not a translatable string.

    Thread Starter maheraldous

    (@maheraldous)

    ok do you have a idea how to change this message https://prnt.sc/ooamtb I got this in new order via cash method in settings

    That one is in woocommerce/templates/emails/customer-processing-order.php and it is translatable. I would try Say What? first.
    https://wordpress.org/plugins/say-what/

    The settings in Say What? are:
    original string (must be exact):
    Just to let you know — we\'ve received your order #%s, and it is now being processed:
    domain:
    woocommerce
    context
    blank
    New string:
    in your language but put %s in the position where you want WC to insert the order number

    I would expect that over time this string will find its way it the translation file for your language and you will be able to remove the Say What conversion.

    Thread Starter maheraldous

    (@maheraldous)

    Oh Thank you, I found it. I Just wondered where to fine the right template.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to translate the WooCommerce “zone message”’ is closed to new replies.