Skip to content

Instantly share code, notes, and snippets.

@atxiii
Created November 2, 2020 10:28
Show Gist options
  • Save atxiii/c5181a18edb8db08f24b030544342e6d to your computer and use it in GitHub Desktop.
Save atxiii/c5181a18edb8db08f24b030544342e6d to your computer and use it in GitHub Desktop.
Update Product Stocks Woocommerce by SQL
INSERT INTO `wp_postmeta`(meta_id,post_id,meta_key,meta_value) VALUES
(24947,3352,'_stock',2),(24947,3352,'_stock',21)
ON DUPLICATE KEY UPDATE meta_value=VALUES(meta_value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment