How to delete WooCommerce Products than have a specific custom field?
WooCommerce products is a custom post type called product. We can use that to start for querying posts. Now you say you want to find those posts, that either don’t have a postmeta entry with the key wholesale_customer_wholesale_prices or ones that have an entry that has an empty value. DELETE p FROM wp_posts p INNER … Read more