• Resolved sylvainorosys

    (@sylvainorosys)


    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 DISTINCT ID 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)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @sylvainorosys,

    Thanks for reaching out to Webtoffee! Sorry about the delay in response.

    We have reviewed the plugin code and unfortunately, we currenytly do no have any filters to support your requirement.

    Thread Starter sylvainorosys

    (@sylvainorosys)

    Yes, thanks for the answer.
    So, is it possible to add the filter in a next version? Or a parameter “don’t try to process expired coupons” to active in the plugin settings?
    Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get all coupons query retrieves expired coupons’ is closed to new replies.