Answer the question
In order to leave comments, you need to log in
How to write in the code if the goods are from the category, then apply this to it?
I change the text on the "Add to Cart" button like this:
function rog_shop_strings( $translated_text, $text, $domain ) {
if( 'woocommerce' === $domain) {
switch ( $translated_text ) {
case 'Добавить в корзину' :
$translated_text = 'Арендовать';
case 'Подробнее' :
$translated_text = 'Характеристики';
break;
}
}
return $translated_text;
}
add_filter( 'gettext', 'rog_shop_strings', 20, 3 );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question