hi, i am trying to change related product text to something else, for that I am using a PHP code but that is not working.
the code is:
// Change WooCommerce “Related products” text
add_filter(‘gettext’, ‘change_rp_text’, 10, 3);
add_filter(‘ngettext’, ‘change_rp_text’, 10, 3);
function change_rp_text($translated, $text, $domain)
{
if ($text === ‘Related products’ && $domain === ‘woocommerce’) {
$translated = esc_html__(‘Check out our other products’, $domain);
}
return $translated;
}
Can you find me a better solution to change related products to something else on the product page?
Site URL: hidden Theme version: 8.1.5Hello,
This text comes from the theme, so you can use translation files to change it. Install and activate Loco Translate plugin > create a translation for XStore theme > change English text and disable the Loco plugin https://xstore.helpscoutdocs.com/article/30-base-theme-translation
Regards
Hello,
We’d appreciate if you could take a moment to give us 5-stars on ThemeForest! https://themeforest.net/downloads
Regards
The topic ‘change related product text to related reviews’ is closed to new replies.
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.