Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'gettext', 'webplus_translate_woocommerce_strings', 999 );
- function webplus_translate_woocommerce_strings( $translated ) {
- // Store all string in an array
- $translatedStrings = array(
- 'Sale!' => 'ON OFFER',
- 'Product Description' => 'Product Specifications',
- );
- $translated = str_ireplace( array_keys($translatedStrings), $translatedStrings, $translated );
- return $translated;
- }
Add Comment
Please, Sign In to add comment