Change Woocommerce sold individually product setting Programmatically
Let’s assume you have a product inventory of 1000s of product and you want to sell your all product individually, what will you?
Well you need to change the product setting one by one to sell individually but, is this a right solution?
No,
I have come here with a tricky solution, you just need to add a single line of code in your active theme’s functions.php file.
/**
* @snippet Change Woocommerce sold individually product setting
*/
add_filter( 'woocommerce_is_sold_individually', '__return_true' );
This snippet will overwrite your all products “sold individual” setting to true.