Last active
October 10, 2015 07:17
-
-
Save deckerweb/3653296 to your computer and use it in GitHub Desktop.
WooCommerce: Change "Shipping and taxes are estimated..." text via Gettext filter -- only compatible until WCDE plugin version 3.0.13! // Nur kompatibel bis WCDE Pluginversion 3.0.13, nicht mit neueren Versionen!!!
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
<?php | |
/** Do NOT include the opening php tag */ | |
// Nur kompatibel bis Pluginversion 3.0.13!! // | |
add_action( 'init', 'ddw_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 ddw_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 'Hier der neue Hinweistext'; | |
} | |
return $translation; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment