Hi! I haven’t tested this but some more questions..
In your example:
switch ( (int) $product_or_term_id ) {
case 1: // Product A - Lifetime.
$date_to_check = 0;
break;
case 2: // Product B - Last 7 days.
$date_to_check = ( $current_time - WEEK_IN_SECONDS );
break;
case 3: // Product C - Last 24 hours.
$date_to_check = ( $current_time - DAY_IN_SECONDS );
break;
}
– How do I place the product ID instead of the product name? Example Product ID#123
– What about multiple product ID’s? example: id#123, id#234, id#345
– What is the code to check for 15days and 30days?
Thank you!