Conflict with CartFlows plugin on thank you page.
Bug Description
While using the latest version of this plugin with the CartFlows plugin, there is an Fatal/Critical error is getting generated on the thank you page created by CartFlows.
This issue is getting initiated from the WooCommerce action woocommerce_thankyou action hook. In the callback function, there is a check to confirm that the order_key is valid or not.
Before this check, the $order_key added on line number 94 is returning blank and that what is triggering the Fatal/Critical error.
The code: $order->key_is_valid( $order_key )
File location: includes/Core/Conversion_Tracking/Conversion_Event_Providers/WooCommerce.php
Line number: 97
Steps to reproduce
- Setup a new WordPress plugin
- Install WooCommerce, CartFlows and Google Site Kit
- Import the CSV file of sample products in WooCommerce.
- Activate the CartFlows plugin and Import the ready-made funnel having landing, checkout and thank you page.
- Add a product on the checkout page. Read more to setup the CartFlows.
- Once the flow is setup completely then place an order from the checkout page.
- After placing an order, the user will be redirected to the thank you page where a Fatal/Critical error will be logged in the debug.log file.
- Go to 'CartFlows Funnels menu'
- Click on 'The eye icon on the thank you page'
- Scroll down the page to the end of the page, to see the error.
Screenshots
- https://bsf.d.pr/i/GcujUP
Additional Context
- PHP Version: 8.1.28
- OS: [e.g. iOS]: Linux
- Browser: [e.g. chrome, safari]: Chrome
- Plugin Version: [e.g. 22]: CartFlows: 2.0.10 Google Site Kit: 1.134.0
- Device: [e.g. iPhone6]: Desktop/Laptop
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
- [ ]
Test Coverage
QA Brief
Changelog entry
Thanks for raising this @sarangshahane. With other users also reporting this I'll perform some checks on this and report back to you here with any findings.
yes, it's happening the same with me.
I have the same issue. Looking forward to a fix release in the future SiteKit plugin updates. Thanks
Me too!
Another user raised this in the support forums.
We've been having this issue since September. Happy to provide error logs or anything else to help troubleshoot a solution.
Thanks @HacMedia. I'm happy to report we've got a fix in progress which is currently being QA'd. All being well, this should be rolled out in the forthcoming 1.139.0 release.
Thanks @techanvil - is it possible for us to test that as well?
We've been using a work-around which has not been ideal.
QA Update ⚠
The error is no longer showing. I have 1 question though: ⚠
Referring to the 2nd bullet of the QAB: Basic testing of the WC conversion tracking provider could be done to double check
I am unsure of what to check for the WC conversion tracking. Could we elaborate on this please?
Other than that, the main error is no longer showing with the fix on Develop. ✅
https://github.com/user-attachments/assets/712f3640-f117-4ed8-871e-dba6bd46bd49
@kelvinballoo as discussed on Slack, I'd suggest giving the WC integration a test for the purchase event which the update relates to, using the QAB for https://github.com/google/site-kit-wp/issues/8814 as a guide.
Thanks @techanvil - is it possible for us to test that as well?
We've been using a work-around which has not been ideal.
Hi @HacMedia, as per the above the issue has been verified in QA and is just undergoing a final related smoke test. The release is due out today so please bear with us and it will be with you shortly. Thanks for your patience!
QA Update ✅
-
The fatal error is no longer happening on develop branch ✅
https://github.com/user-attachments/assets/712f3640-f117-4ed8-871e-dba6bd46bd49
-
Regression test on normal WooCommerce
purchaseevent tracking done and it's firing accordingly. ✅
Moving ticket to approval.