We just need to add the following:

add_filter( 'woocommerce_is_purchasable', false );

This small line of code will render the product un-purchasable and do it in a pretty simple way.

It produces results like the following:

 

Screen Shot 2018-05-10 at 3.21.05 PM

 

 

May 10, 2018

How to Hide ‘Add to Cart’ Button in WooCommerce

We just need to add the following: add_filter( 'woocommerce_is_purchasable', false ); This small line of code will render the product un-purchasable and do it in a pretty […]