Disable products purchases that doesn’t have specific tag in WooCommerce
Guys I want to edit this code
/*
* Disable buying products from specific category and tag
*
* @author Misha Rudrastyh
* @url https://rudrastyh.com/woocommerce/make-products-non-purchasable.html#specific-categories
*/
add_filter(…
To make all products unavailable on WooCommerce except those with the tag available, you need to make is purchasable false before you make it true only if your condition is met.
/*
* Disable buying products from specific category and tag
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.