• Hi there,
    we use this plugin and have many coupons that get fetched via the WJECF_Autocoupon::get_all_auto_coupons() call. In this function all coupons get returned and then WC_Coupon classes get created by the coupon code/post title. We noticed a relatively big performance improvement by using $post->ID since no extra query is needed to get the ID by the coupon code.

    Is there a specific reason why the $post->post_title was chosen here? If it does not have a specific requirement, would it make sense then to update the code to use $post->ID?

    If you have any more questions, feel free to ask!

    Best regards,
    Miguel

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.