Fix for the gap in Purchase events through CAPI#3060
Closed
vahidkay-meta wants to merge 3 commits intomainfrom
Closed
Fix for the gap in Purchase events through CAPI#3060vahidkay-meta wants to merge 3 commits intomainfrom
vahidkay-meta wants to merge 3 commits intomainfrom
Conversation
…se events through different flows. Also added a flag to the order metadata to track whether a Purchase event has been sent for this order or not. Added more hooks to track if an event's status changed from on-hold or pending to processing or completed through the WP dashboard. Also fixed a phpcs warning in AAMSettings.php file
iodic
reviewed
Apr 22, 2025
iodic
approved these changes
Apr 22, 2025
Contributor
|
@vahidkay-meta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@vahidkay-meta merged this pull request in 21f2866. |
This was referenced Apr 23, 2025
carterbuce
pushed a commit
to carterbuce/facebook-for-woocommerce
that referenced
this pull request
Apr 24, 2025
Summary: Added a hook to woocommerce_new_order event to ensure we track Purchase events through different flows. Also added a flag to the order metadata to track whether a Purchase event has been sent for this order or not. Added more hooks to track if an event's status changed from on-hold or pending to processing or completed through the WP dashboard. Also fixed a phpcs warning in AAMSettings.php file ## Description This PR is addressing the gap in Purchase events being sent by this plugin compared to GTM & Stape. The details are explained in this doc: https://fburl.com/gdoc/ihoi9jna ### Type of change Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Fixed a problem where Purchase event was not firing if thankyou page was not shown, Custom payment provider or order management plugin used, or Purchase state updated through Woo dashboard Pull Request resolved: facebook#3060 Test Plan: On a woo website, use any of the following payment options and check the Purchase event being registered: - Klarna - Card Payment - Direct Bank transfer - Cash on delivery - Paypal Reviewed By: tzahgr Differential Revision: D73507420 Pulled By: vahidkay-meta fbshipit-source-id: e879f24103ca0b4505fa981b99d820de9181ee77 (cherry picked from commit 21f2866)
carterbuce
pushed a commit
to carterbuce/facebook-for-woocommerce
that referenced
this pull request
Apr 24, 2025
Summary: Added a hook to woocommerce_new_order event to ensure we track Purchase events through different flows. Also added a flag to the order metadata to track whether a Purchase event has been sent for this order or not. Added more hooks to track if an event's status changed from on-hold or pending to processing or completed through the WP dashboard. Also fixed a phpcs warning in AAMSettings.php file ## Description This PR is addressing the gap in Purchase events being sent by this plugin compared to GTM & Stape. The details are explained in this doc: https://fburl.com/gdoc/ihoi9jna ### Type of change Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Fixed a problem where Purchase event was not firing if thankyou page was not shown, Custom payment provider or order management plugin used, or Purchase state updated through Woo dashboard Pull Request resolved: facebook#3060 Test Plan: On a woo website, use any of the following payment options and check the Purchase event being registered: - Klarna - Card Payment - Direct Bank transfer - Cash on delivery - Paypal Reviewed By: tzahgr Differential Revision: D73507420 Pulled By: vahidkay-meta fbshipit-source-id: e879f24103ca0b4505fa981b99d820de9181ee77 (cherry picked from commit 21f2866)
Closed
tzahgr
pushed a commit
that referenced
this pull request
Apr 24, 2025
Summary: Added a hook to woocommerce_new_order event to ensure we track Purchase events through different flows. Also added a flag to the order metadata to track whether a Purchase event has been sent for this order or not. Added more hooks to track if an event's status changed from on-hold or pending to processing or completed through the WP dashboard. Also fixed a phpcs warning in AAMSettings.php file ## Description This PR is addressing the gap in Purchase events being sent by this plugin compared to GTM & Stape. The details are explained in this doc: https://fburl.com/gdoc/ihoi9jna ### Type of change Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Fixed a problem where Purchase event was not firing if thankyou page was not shown, Custom payment provider or order management plugin used, or Purchase state updated through Woo dashboard Pull Request resolved: #3060 Test Plan: On a woo website, use any of the following payment options and check the Purchase event being registered: - Klarna - Card Payment - Direct Bank transfer - Cash on delivery - Paypal Reviewed By: tzahgr Differential Revision: D73507420 Pulled By: vahidkay-meta fbshipit-source-id: e879f24103ca0b4505fa981b99d820de9181ee77
This was referenced May 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a hook to woocommerce_new_order event to ensure we track Purchase events through different flows. Also added a flag to the order metadata to track whether a Purchase event has been sent for this order or not. Added more hooks to track if an event's status changed from on-hold or pending to processing or completed through the WP dashboard. Also fixed a phpcs warning in AAMSettings.php file
Description
This PR is addressing the gap in Purchase events being sent by this plugin compared to GTM & Stape.
The details are explained in this doc: https://fburl.com/gdoc/ihoi9jna
Type of change
Bug fix (non-breaking change which fixes an issue)
Checklist
Changelog entry
Fixed a problem where Purchase event was not firing if thankyou page was not shown or Purchase state updated through Woo dashboard
Test Plan
On a woo website, use any of the following payment options and check the Purchase event being registered: