Hide Cart Icon if no items are in Cart
/* ---------------------------------------------------------------------------
* Add Body Class if items are in cart |
* --------------------------------------------------------------------------- */
add_filter(‘body_class’, ‘pwm_woocommerce [Links visible only for registered users]_cart_status’);
function pwm_woocommerce [Links visible only for registered users]_cart_status( $classes ){
global $woocommerce [Links visible only for registered users];
if( $woocommerce [Links visible only for registered users]->cart->cart_contents_count > 0 ):
$classes[] = ‘woocommerce [Links visible only for registered users]-items-in-cart’;
endif;
return $classes;
}
Comments
what you ask for, requires files customization what in reference to Item Support Policy [Links visible only for registered users] is not allowed. So if you want to modify files and don't know how, you should contact with your web developer.
Thanks for udnerstanding!