When managing a WooCommerce site, especially in a development or staging environment, there may be times when you need to delete all orders. This could be to refresh the database during testing or before syncing data from a live environment. Using MySQL to delete orders is efficient and direct but should be handled with care … Continue reading “MySQL Query: How to Delete all WooCommerce Orders”
Tag: woocommerce
Where Are WooCommerce Products Stored In The WordPress Database?
TL;DR: WooCommerce stores all products as custom post types in wp_posts, with attributes and meta (price, SKU, stock) in wp_postmeta. Categories, tags, and product attributes live in the wp_terms family of tables. Visibility and product type flags are stored as post meta keys. Sometimes you add new WooCommerce products on your staging site and just … Continue reading “Where Are WooCommerce Products Stored In The WordPress Database?”
MySQL Query – Delete all WooCommerce Bookings
If you need to delete all WooCommerce bookings that have the custom post type wc_booking you can use the MySQL query below: