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'
@rrrhys

This comment has been minimized.

Copy link

@rrrhys rrrhys commented Oct 11, 2016

Legend

@yratof

This comment has been minimized.

Copy link

@yratof yratof commented Oct 26, 2016

"Does this work multilingual?" – yes it does, everything in the database is based on american english.

@japick

This comment has been minimized.

Copy link

@japick japick commented Nov 14, 2016

Nice one!

@amykallissa

This comment has been minimized.

Copy link

@amykallissa amykallissa commented Jun 2, 2017

Hi there, where do I actually paste this coding to get it to work?!

@JoeyKhd

This comment has been minimized.

Copy link

@JoeyKhd JoeyKhd commented Jun 8, 2017

Thanks for sharing!

@c9dd

This comment has been minimized.

Copy link

@c9dd c9dd commented Sep 5, 2017

Thanks!

@shivsingh7150

This comment has been minimized.

Copy link

@shivsingh7150 shivsingh7150 commented Sep 21, 2017

Thanks great idea

@MarkPraschan

This comment has been minimized.

Copy link

@MarkPraschan MarkPraschan commented Oct 10, 2017

Exceptional! Thanks, BFTrick.

I paired this with the following quick tutorial about executing the code since I wasn't 100% confident:
http://support.hostgator.com/articles/how-to-run-sql-queries-in-phpmyadmin

@takisv76

This comment has been minimized.

Copy link

@takisv76 takisv76 commented Mar 21, 2018

You are a legend mate...

@saibottrenham

This comment has been minimized.

Copy link

@saibottrenham saibottrenham commented Jul 26, 2018

My Hero!

@akashjdongre

This comment has been minimized.

Copy link

@akashjdongre akashjdongre commented Aug 27, 2018

awesome

@zhex900

This comment has been minimized.

Copy link

@zhex900 zhex900 commented Sep 20, 2018

Works like magic. Thanks!

@tecgal

This comment has been minimized.

Copy link

@tecgal tecgal commented Oct 5, 2018

It took a second ... absolutely pure gold. Thank you!

@anton-roos

This comment has been minimized.

Copy link

@anton-roos anton-roos commented Dec 6, 2018

Thank you!! This helped me a lot and saved me so much time. I am grateful <3

@toniodz

This comment has been minimized.

Copy link

@toniodz toniodz commented Feb 6, 2019

useful, thanks

@unscripted

This comment has been minimized.

Copy link

@unscripted unscripted commented Apr 2, 2019

Saved me a lot of time. Thank you!

@mio31337

This comment has been minimized.

Copy link

@mio31337 mio31337 commented Sep 17, 2019

Thanks. Still working as of now.

@anton-roos

This comment has been minimized.

Copy link

@anton-roos anton-roos commented Nov 25, 2019

This helped me thank you!

@curdaneta

This comment has been minimized.

Copy link

@curdaneta curdaneta commented Feb 21, 2020

Thanks, you have saved me a lot of work

@brynzovskii

This comment has been minimized.

Copy link

@brynzovskii brynzovskii commented Mar 31, 2020

Perfect!

@gagankhatri

This comment has been minimized.

Copy link

@gagankhatri gagankhatri commented Jun 29, 2020

how i am supposed to run this?

@SeydaAsan

This comment has been minimized.

Copy link

@SeydaAsan SeydaAsan commented Jun 30, 2020

Kral adamsın :)

@Deimz

This comment has been minimized.

Copy link

@Deimz 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

This comment has been minimized.

Copy link

@Whendriksen-Spec Whendriksen-Spec commented Aug 26, 2020

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

This comment has been minimized.

Copy link

@RonR-WebDesign RonR-WebDesign commented Oct 22, 2020

Thanks! Found easily with a google search...

@MilenFrom

This comment has been minimized.

Copy link

@MilenFrom MilenFrom commented Oct 3, 2021

Yup same
KING :D

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