Last active
August 22, 2021 15:18
-
-
Save bagerathan/67f08729611e3a76155a16fa21c67fe3 to your computer and use it in GitHub Desktop.
[Change any string in WooCommerce] #woo
This file contains hidden or 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_filter( 'gettext', 'maxpapi_translate_woocommerce_strings', 999, 3 ); | |
function maxpapi_translate_woocommerce_strings( $translated, $untranslated, $domain ) { | |
if ( ! is_admin() && 'woocommerce' === $domain ) { | |
switch ( $translated ) { | |
case 'Weight': | |
$translated = 'Shipping Weight'; | |
break; | |
case 'Dimensions': | |
$translated = 'Shipping Dimensions'; | |
break; | |
} | |
} | |
return $translated; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment