Change Apply Coupon Text

For some reason this code that was previously on this form does not work, does anyone have nay ideas?

Thanks,

Smokingjacket

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;

}

Hi Chiara,

Thanks for reaching out.

I checked your site and the child theme is inactive, this custom code should work once your child theme is activated again. Unless you didn’t it add it to the child theme, please add it in case it’s removed.

Thanks!

Hi Rad,

Does it need to be on the child theme to work?

Thanks!

Hi @smokingjacket,

That custom code should be placed under functions.php file locates in your child theme, so you should install and activate the child theme to make it work.

Let us know how it goes!

@thai Sorry not to be clear, this is already in my functions.php file but it is not a child theme?

Should I expect it to work?

Thanks!

Hi Chiara,

The child theme should be active after adding it to functions.php, let’s say it’s added already. But it’s not working since you’re not activating your child theme. Please activate it in Admin > Appearance > Themes.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.