Skip to content

Instantly share code, notes, and snippets.

@codingwithchris
Last active July 21, 2020 15:48
Show Gist options
  • Save codingwithchris/484e1f56844daec7ada96b37e54045ab to your computer and use it in GitHub Desktop.
Save codingwithchris/484e1f56844daec7ada96b37e54045ab to your computer and use it in GitHub Desktop.
Disable "Stock Management" for all products in WooCommerce.
// Set "Manatge Stock" setting forall products
UPDATE table_name
SET meta_value = 'no'
WHERE meta_key = '_manage_stock'
// Allow backorders for all products
UPDATE table_name
SET meta_value = 'yes'
WHERE meta_key = '_backorders'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment