Created
November 24, 2014 18:09
-
-
Save lmartins/9ed41e55b91d16de91eb to your computer and use it in GitHub Desktop.
Change WooCommerce shipping and taxes notice in Cart Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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