Category: WooCommerce

This is the function that you need to call and pass the product type that's registered in WordPress (by WooCommerce). It's 'product'.

 

This function call returns an object with multiple properties and you can decide what you need. The total number of published products or those saved as draft.

 

To get the number of published products you need to access this property: $total_products_obj->publish

To get the number of draft products you need to access this property: $total_products_obj->draft

 

Join our mailing list

Get important news about cool products we release and invitations to beta test new products
We're working on a secure & flexible WordPress hosting solution. Read for more info (has 1min video)