Help with minicart
-
Hi, I’m trying to add a custom text on the minicart / cart widget when no products are on it.
I tried this and it works for a second, but something inmediately replaces the custom text for a “0”…
What could be happening here?
<div class="header-cart-count"> <?php if ( ! WC()->cart->is_empty() ) { echo WC()->cart->get_cart_contents_count(); }else{ echo "SUPER COOL CUSTOM TEXT"; } ?> </div>
Thanks for your help,
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Help with minicart’ is closed to new replies.