Created
February 24, 2022 17:13
-
-
Save jhimross/018709bb4024aa09850b42f8724fa399 to your computer and use it in GitHub Desktop.
Hide Cart Icon When Cart is Empty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_footer', function() { | |
if ( WC()->cart->is_empty() ) { | |
echo '<style type="text/css">CLASS HERE{ display: none; }</style>'; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment