Remove Product category progmatically [closed]
Is there a way of removing a WooCommerce product from a certain category after 30 days?
So when I add a new product, I check the ‘whats-new’ category. Then after 30 days, I would like that to automatically be removed from that category, as it’s no longer new.
I have a bit of code that can assess how old the product is, but then I don’t really know how to work the rest…. and do i add this in my ‘content-product.php‘?
if ( ( time() – ( 60 * 60 * 24 * $newness_days ) )