Quickly translate any string

Quickly translate any string WooCommerce support to any WordPress theme:

add_filter('gettext',  'translate_text');
add_filter('ngettext',  'translate_text');
 
function translate_text($translated) {
     $translated = str_ireplace('Choose and option',  'Select',  $translated);
     return $translated;
}
See also  Show Checkout Even If Cart Is Empty

Leave a Reply

Your email address will not be published. Required fields are marked *