skip to Main Content

Get woocommerce products by SQL that are front end visible (not private, not password protected, are able to be displayed in search or catalog) – WordPress

I'm running the following SQL code: SELECT DISTINCT p.ID FROM {$wpdb->prefix}posts AS p INNER JOIN {$wpdb->prefix}term_relationships AS tr ON p.ID = tr.object_id INNER JOIN {$wpdb->prefix}term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN {$wpdb->prefix}term_relationships AS tr2 ON p.ID = tr2.object_id…

VIEW QUESTION
Back To Top
Search