Hide non-purchasable products
-
Great plugin but I am stucked on one thing. I have some restricted products for some countries. By default woocommerce doesn’t show add_to_cart button for those product who are not purchasabe. To hide those product from front end I tried two ways..
First: I used “if ( $product->is_purchasable() )” in woocommerce archive-product page so that product who are not purchasable, don’t visible on frontend. But that trick works only on shop page, not on category page. I couldn’t fegured out about in which file I need to put this condition so it got hide on category page too. So I jumped to second option.
Second(Chosen): woocoomerce adds “purchasable” class in “li” tag for those products who are purchasable. So I just used those class to hide non purchasable products from the list and it worked.
But I couldn’t figured out any way to hide non-purchasable products in your plugin slider. Any idea how can I hide non-purchasable products in product slider too?
Thanks
- The topic ‘Hide non-purchasable products’ is closed to new replies.