Created
May 26, 2022 03:05
-
-
Save cpaul007/6e00b96091216514ff8eb0bc2f7d661c to your computer and use it in GitHub Desktop.
Translate no products in cart text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include this line | |
add_filter( 'gettext_woocommerce', 'ouwoo_translate_cart_text', 10, 3); | |
function ouwoo_translate_cart_text( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'No products in the cart.' : | |
$translated_text = "Please add some products from our shop, so we can generate a quote for you."; | |
break; | |
} | |
return $translated_text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment