• Resolved dnex11

    (@dnex11)


    I deleted many woocommerce orders but I saw the entries in wpzx_woocommerce_order_items still existed. I was able to delete the items in the table for the order id’s that didn’t
    exist.
    SELECT * FROM wpzx_woocommerce_order_items WHERE order_id NOT IN(values…..)`

    _woocommerce_order_itemmeta` is another table which has lot of junk data.
    Whats the way to delete the data in this table though SQL query. I want to delete the data which is linked to the orders that were deleted.

    • This topic was modified 3 years, 6 months ago by dnex11.
    • This topic was modified 3 years, 6 months ago by dnex11.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    To delete all rows from the wp_woocommerce_order_itemmeta table, you can use the DELETE statement without the WHERE clause as follows:

    DELETE FROM wp_woocommerce_order_itemmeta

    If you need to specify a certain condition, then you will need to use the WHERE statement.

    Kindly remember to modify the database prefix for the above query.

    Prior to doing this, please make sure you have a good backup in place of your full site and database. Most hosting companies have this included in the subscription, but you could also consider using a service like?Jetpack. If something goes wrong, it’s nice to know that you can restore your site.

    If you do require more help with the actual cquery, we’d recommend you hire a developer who can take a look at this, quote you for their services, and help you add this feature to your site. We’d recommend getting in touch with a web developer or one of the customisation experts listed at https://woocommerce.com/customizations/.

    Cheers. ??

    Mirko P.

    (@rainfallnixfig)

    Hi @dnex11,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions!

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to delete data from _woocommerce_order_itemmeta’ is closed to new replies.