Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change WooCommerce shipping and taxes notice in Cart Page
add_action( 'init', 'mw_gettext_filter_woocommerce', 9999 );
/**
* Change the text in WooCommerce for "Shipping and taxes are estimated..." via Gettext filter.
*
* @author David Decker - DECKERWEB
* @link http://twitter.com/deckerweb
*/
function mw_gettext_filter_woocommerce() {
add_filter( 'gettext', 'ddw_woocommerce_change_estimated_shipping_taxes_text', 9999, 2 );
/** Search for our string and add changed text */
function ddw_woocommerce_change_estimated_shipping_taxes_text( $translation, $text ) {
if ( $text == 'Note: Shipping and taxes are estimated%s and will be updated during checkout based on your billing and shipping information.' ) {
return 'Note: Taxes are estimated%s and will be updated during checkout based on your billing information.';
}
return $translation;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.