What code use to display the total number of products? I want to make a section with icons on the main page of my store and it would be great to include something like that.
In case if you wants to show total number of published products in your store, use the following code:
$args = array( 'post_type' => 'product', 'post_status' => 'publish', 'posts_per_page' => -1 ); $products = new WP_Query( $args ); echo $products->found_posts;
It sill return total number of published products in your store.