I want to create a Woocommerce shop page that only displays products published last month. What is the best way to accomplish this? I’ve tried several plugins without succes. From my understanding you can accomplish this with standard Woocommerce, Woocommerce blocks and some shortcode.
Any suggestions are appreciated.
3
Answers
Solution here: https://www.sitepoint.com/community/t/show-latest-30-days-products-in-woocommerce/258276
I just made a shortcode for you. Which will return all products from last month. you can use this shortcode anywhere:
[wc_get_products_last_month]
Tested and Worked.
Try this. Combination of these two answers (credit goes to them. I am just updating code by your requirements). put this code in your active theme functions.php file.
https://stackoverflow.com/a/66528155/6469645
Woocommerce : only show products between start and end dates