'product', 'posts_per_page' => $number_of_posts, ); if( ! empty( $category_id ) ) { $args[ 'tax_query' ] = array( array( 'taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => $category_id ) ); } $query = new WP_Query( $args ); ?> false, 'currency' => '', 'decimal_separator' => wc_get_price_decimal_separator(), 'thousand_separator' => wc_get_price_thousand_separator(), 'decimals' => wc_get_price_decimals(), 'price_format' => get_woocommerce_price_format(), ); ?> have_posts() ) : ?>