Display the total number of WooCommerce products
To display the total number of WooCommerce products, you can use the following code snippet: <?php $products = wc_get_products(array( ‘limit’ => -1 )); echo count($products); ?> This code uses the wc_get_products() function to retrieve all published products, with no limit on the number of products returned. The count() function is then used to count the … Read full article →