Hi there,
I’m making a site here:
- Here’s a product:
- After I add it to the cart, here’s the cart page:
https://www.tablebudapest.com/kosar/
Everything is in Hungarian, except for “apply coupon”. After some search, I found the following code:
jQuery(“input[name=‘apply_coupon’]”).attr(“value”,“custom text”);
Then I tried this:
add_filter(‘gettext’, ‘x_translate_text’ , 20, 3);
function x_translate_text ( $translated_text, $text, $domain ) {
$translation = array (
‘Apply Coupon’ => ‘Your new text’
);
if( isset( $translation[$text] ) ) {
return $translation[$text];
}
return $translated_text;
}
However, neither does not seem to work anymore. Any ideas?
Thanks!