Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Update the tax status of all WooCommerce products.
UPDATE `wp_postmeta`
SET meta_value='taxable'
WHERE meta_key='_tax_status'
@curdaneta
Copy link

Thanks, you have saved me a lot of work

@brynzovskii
Copy link

Perfect!

@gagankhatri
Copy link

how i am supposed to run this?

@SeydaAsan
Copy link

Kral adamsın :)

@Deimz
Copy link

Deimz commented Aug 26, 2020

This looks like SQL, so you should run it in phpmyadmin or in you mysql console :)

Thanks bro !

@Whendriksen-Spec
Copy link

Thanks for this query, flipped all rows in wp_wc_product_meta_lookup to taxable but the products kept saying it wasn't taxable. This query solved my issue, great!

@RonR-WebDesign
Copy link

Thanks! Found easily with a google search...

@MilenFrom
Copy link

Yup same
KING :D

@davidebr90
Copy link

Thanks !!!!

@bartmolk
Copy link

Thanks! Was looking to write this myself and find the columns but 1 search query and google showed me the correct thing.
P.s. for people who are using object cache, the reason it won't add the taxes until you visited the problem is because you have to clean the Cache. This could be Reddis object cache or other caching plugins!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment