Woo: Change the No Product in cart text on the Oxy Ultimate Woo plugin

smartsovereign
29 May 2022

This is a snippet for Oxy Ultimate Woo plugin that allows you to change the default “No product in cart” to anything you like.

Credit to the Developer, you can see the original code here

<?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 = "ENTER YOUR TEXT HERE";
      break;
  }
  return $translated_text;
}

Was this article helpful?

Tags

Categories

Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy