Woocommerce - Check if product was created less than 60 days ago
问题 I want to check if a Woocommerce product was created less than 60 days ago. - If true, do something. I am obtaining the date the product was created in backend/admin using the official Woocmmerce function $product->get_date_created . My code partially works, but it seems to be checking if $product->get_date_created literally contains the value 60 instead of perfoming the calculation and minusing 60 days from the current DateTime . I have come to this conclusion because my IF statement runs