Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Bug in version 2.3.0
- This topic has 7 replies, 3 voices, and was last updated 10 years, 9 months ago by brianyerkes.
- AuthorPosts
- December 30, 2015 at 8:48 pm #258hwillsonParticipant
Hi guys – I just stumbled across what appears to be a bug in the most recent version. In the wjecf-autocoupon.php file, within the get_all_auto_coupons() function, the meta_query in $query_args is invalid. This means it’s being dropped, always rendering an SQL query like:
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = ‘shop_coupon’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_posts.post_title ASC
The meta_query value should be wrapped in another array() – something like:
‘meta_query’ => array(array( ‘key’ => ‘_wjecf_is_auto_coupon’, ‘compare’ => ‘=’, ‘value’ => ‘yes’))
Thanks!
December 30, 2015 at 9:06 pm #259Soft79KeymasterYes, you’re right!
Fortunately the bug causes no issues, as later another check is performed to be sure it’s an autocoupon.
I will fix this in the next release, though. Thanks for letting me know!
I wonder, how did you stumble upon this?
December 30, 2015 at 9:16 pm #260hwillsonParticipantGreat, and no problem at all!
Actually in my case it is causing a bit of an issue with regards to performance. I stumbled upon the issue while troubleshooting recent performance issues on our site. See http://cl.ly/0V1r0U1s2L39 for an example of what we’re seeing – a large performance hit when hitting the get_all_auto_coupons() method (we have a lot of coupons so without the restriction check in place, processing takes a while).
Thanks!
December 30, 2015 at 9:23 pm #261Soft79KeymasterOops, that’s nasty. And how many msecs for that function after the edit?
December 30, 2015 at 10:52 pm #262hwillsonParticipantThe entire index.php request is down to around 500 ms after the change. Thanks!
January 19, 2016 at 1:29 am #287brianyerkesParticipantI see the 2.3.1 updated version for the free plugin. Is there an update for the pro version? I can’t seem to find where to download the plugin within my account on soft79.nl.
I’ve been having major performance issues for a few versions now , and the last two have been unusable. We have over 5,000 coupons on the site. Hoping to try this fix with the pro version. Thanks
January 19, 2016 at 6:41 pm #288Soft79KeymasterHi Brian,
If you purchased through soft79.nl the file can be find on your account page, otherwise please let me know your order number (through the contact form). If you purchased through CodeCanyon; the new version has been sent for approval so it should be available soon.
January 25, 2016 at 2:17 am #296brianyerkesParticipantPerfect, thanks. Downloaded the latest from codecanyon
- AuthorPosts
- You must be logged in to reply to this topic.