WooCommerce shortcode products list
问题 I have to make a Wordpress plugin which adds shortcode for WooCommerce. I want to get products from a specific product category and the maximum number of products to show. The shortcode parameters should be category ID and product limit. I think I should have to use WP_Query object. I need to get it look like this: Shortcode would be like this: [productslist_category="[category_ID]" limit="[product_limit]"] I used the code below from this answer (thanks to LoicTheAztec) : if( !function_exists