Skip to content

Instantly share code, notes, and snippets.

@lmartins
Created November 24, 2014 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmartins/9ed41e55b91d16de91eb to your computer and use it in GitHub Desktop.
Save lmartins/9ed41e55b91d16de91eb to your computer and use it in GitHub Desktop.
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