Answer the question
In order to leave comments, you need to log in
WooCommerce cart appearance without page reload?
use this to hide cart from 0
add_action( 'wp_footer', 'hide_cart' );
function hide_cart(){
if ( WC()->cart->get_cart_contents_count() == 0 ) {
?>
<style>.cart{display: none;}</style>
<?php
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question