Remove Cash On Delivery Instructions From WooCommerce Emails

最后都变了- 提交于 2019-12-13 15:31:14

问题


Here is what my email looks like currently:

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:


— Update 1 —

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

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.



来源:https://stackoverflow.com/questions/41231686/remove-cash-on-delivery-instructions-from-woocommerce-emails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!