Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛Added empty condition to solve the conflict with CartFlows and Google Site Kit. #9278

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

sarangshahane
Copy link

@sarangshahane sarangshahane commented Sep 3, 2024

Summary

  • Added empty condition to solve the conflict with CartFlows and Google Site Kit.

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

Addresses issue:

Relevant technical choices

  • There was a missing empty condition before checking the has_key is correct or not.

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

Copy link

google-cla bot commented Sep 3, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant