Advertisement
fahimmurshed

Remove the number "0" when the cart is empty

Mar 16th, 2021
1,171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.20 KB | None | 0 0
  1. add_filter('astra_woo_header_cart_total', 'remove_cart_count');
  2.  function remove_cart_count( $default){
  3.     if(0 === ()->cart->get_cart_contents_count()){
  4.         return false;
  5.     }else{
  6.         return $default;
  7.     }
  8.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement