Remove Cash On Delivery Instructions From WooCommerce Emails

2k views Asked by At

Here is what my email looks like currently: enter image description here

I have spent some time trying to remove this: 'Pay wish cash upon arriving to destination.'

But cannot make it go away without removing other stuff.

Please help if you can.

Thank you.

1

There are 1 answers

3
LoicTheAztec On BEST ANSWER

— Update 1 —

In backend, if you go to WooCommerce > settings > Checkout > Cash on Delivery (tab), you will see:

enter image description here

You will be able to remove "Pay wish cash upon arriving to destination." instructions message, or to replace it with something more convenient.


You could try to use the WordPress gettext() function that will remove your text this way:

add_filter( 'gettext', 'removing_email_text', 10, 3 );
function customizing_checkout_text( $translated_text, $untranslated_text, $domain )
{
    if ( 'Pay wish cash upon arriving to destination.' == $untranslated_text ) {
        $translated_text = __( '', $domain );
    }
    return $translated_text;
}

This code goes in function.php file of your active child theme (active theme or in any plugin file).

You can also replace the text by something else.