Reputation: 21
I would like to replace the text "Price" to "Value" in the description row of the shopping cart table of woocommerce.
How can I do this?
Upvotes: 2
Views: 925
Reputation: 253784
Try the following:
add_filter('gettext', 'change_price_text_in_cart_page', 105, 3 );
function change_price_text_in_cart_page( $translated, $text, $domain ) {
if( is_cart() && $text == 'Price' ) {
$translated = __('Value', $domain );
}
return $translated;
}
Code goes in function.php file of your active child theme (or active theme). Tested and works.
Upvotes: 2