Performance Improvement
-
Hi there,
we use this plugin and have many coupons that get fetched via theWJECF_Autocoupon::get_all_auto_coupons()call. In this function all coupons get returned and thenWC_Couponclasses get created by the coupon code/post title. We noticed a relatively big performance improvement by using$post->IDsince no extra query is needed to get the ID by the coupon code.Is there a specific reason why the
$post->post_titlewas 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
You must be logged in to reply to this topic.