Get all coupons query retrieves expired coupons
-
In class-wt-smart-coupon-auto-coupon.php -> get_all_auto_coupons() function, is it possible to filter on only not expired coupons in this function? By adding a plugin parameter for example, or a wordpress filter to update directly the query?
The current query:
“SELECT DISTINCTID
as coupon_id FROM $wpdb->posts as P INNER JOIN $wpdb->postmeta AS PM1 ON (P.ID
= PM1.post_id
) WHERE P.post_type
= ‘shop_coupon’ AND P.post_status
= ‘publish’ AND PM1.meta_key
= ‘_wt_make_auto_coupon’ AND PM1.meta_value
= 1 ORDER BY P.post_date
DESC LIMIT %d”Regards,
Sylvain
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get all coupons query retrieves expired coupons’ is closed to new replies.