If no products are on sale – hide ID or class

Question

Sorry for the simplicity of this question, but I can’t seem to find an answer anywhere. Is there an existing sales hook in woocommerce?

Like:

<?php
   if ( on_sale == 0 ) {
     echo '<style>.specials {display:none;};
     }
?>

That is essentially all I am trying to accomplish. I have a row/column that displays products on sale… I just want to hide that if there are currently no products on sale.

Thanks in advance.

0
, Bruce Banner 4 years 2020-03-29T16:53:34-05:00 0 Answers 107 views 0

Leave an answer

Browse
Browse