Gettext and Plugin
-
After add something to cart and then choose a Pickup Location
The “Schedule a pickup appointment *” pops up.I need to change this text to “Select Date” and having trouble with GETTEXT.
The other two changes are working. The original text is coming from a plugin
called woocommerce-shipping-local-pickup-plus.Any help is so appreciated! I am banging my head. thank you
I have tried woocommerce and woocommerce-shipping-local-pickup-plus for the theme_text_domain thinking this was the problem.
/**
* Change text strings
*
* @link http://codex.ww.wp.xz.cn/Plugin_API/Filter_Reference/gettext
*/
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case ‘Cart totals’ :
$translated_text = __( ‘Order Total’, ‘woocommerce’ );
break;
case ‘Pickup Location’ :
$translated_text = __( ‘Select Location’, ‘woocommerce’ );
break;
case ‘Schedule a pickup appointment’ :
$translated_text = __( ‘Select Date’, ‘woocommerce-shipping-local-pickup-plus’ );
break;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘my_text_strings’, 20, 3 );The page I need help with: [log in to see the link]
The topic ‘Gettext and Plugin’ is closed to new replies.