get all products that have product_tag woocommerce
function get_all_woocommerce_products() { $args = array( 'post_type' => 'product', 'posts_per_page' => -1, 'product_tag' => 'woocommerce' ); return get_posts( $args ); } get_all_woocommerce_products();