You can define WooCommerce product settings programmatically to force a specific behavior — like always-enabled reviews or always sold-individually — across every product regardless of its individual saved setting, which is much faster than manually re-editing thousands of existing products.
Why Override Settings Instead of Bulk-Editing
- Large catalogs or bulk imports commonly miss a per-product setting that should apply universally
- Re-running an import or manually correcting thousands of products is slow and error-prone
- A single filter guarantees consistent behavior going forward without depending on every product being configured correctly
Force Reviews Enabled on Every Product
/** Force product reviews open regardless of each product's individual setting */
add_filter( 'comments_open', 'force_enable_reviews_all_products', 9999, 2 );
function force_enable_reviews_all_products( $open, $post_id ) {
if ( 'product' === get_post_type( $post_id ) ) {
$open = true;
}
return $open;
}Force Sold Individually on Every Product
/** Force every product to be sold individually, ignoring the per-product checkbox */
add_filter( 'woocommerce_is_sold_individually', 'force_sold_individually_all_products', 9999, 2 );
function force_sold_individually_all_products( $sold_individually, $product ) {
return true;
}Force a Specific Tax Class on Every Product
/** Force every product onto the "reduced-rate" tax class */
add_filter( 'woocommerce_product_get_tax_class', 'force_reduced_tax_class_all_products', 9999, 2 );
function force_reduced_tax_class_all_products( $tax_class, $product ) {
return 'reduced-rate';
}

Troubleshooting
A forced setting doesn’t override an existing plugin’s behavior
Check filter priority — if another plugin filters the same hook at a higher priority number running after yours, it can override your forced value. Increase your priority number to run later.
You need the override for only some products, not all
Add a category, tag, or specific ID check inside the function before applying the override, rather than applying it unconditionally to every product.
Frequently Asked Questions
Does this actually change the saved database value?
No, these filters override the value at runtime only — the underlying per-product setting in the database is untouched, which means removing the snippet reverts to each product’s original individual setting.
Can I force multiple settings at once?
Yes, each setting typically has its own dedicated filter — stack as many of these snippets as you need for different settings.
Is this safer than bulk-editing the actual database values?
Generally yes — a filter-based override is reversible instantly by removing code, whereas bulk database edits are harder to undo if something goes wrong.
Keep a short changelog of which settings you’ve forced this way, since a future developer troubleshooting unexpected product behavior will otherwise have no way to know a filter is silently overriding what the product edit screen actually shows. A single comment block listing every forced setting near the top of your snippets file works well for this.
Conclusion
Filters are the fastest way to define WooCommerce product settings programmatically across an entire catalog, avoiding the need to re-edit or re-import thousands of individual products.
See also How to Create a WooCommerce Product Programmatically. Then read How to Add a Second Store Address to WooCommerce General Settings.
Prefer no code? All-in-One Utilities Woo Add-on adds over 50 WooCommerce features, so you can switch them on without code.