Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Translate no products in cart text
<?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