-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add active incentive ID to Payments task data to use in Tracks props #9403
Merged
vladolaru
merged 5 commits into
develop
from
update/9401-woopayments-incentive-to-payments-task-tracks-props
Sep 9, 2024
Merged
Add active incentive ID to Payments task data to use in Tracks props #9403
vladolaru
merged 5 commits into
develop
from
update/9401-woopayments-incentive-to-payments-task-tracks-props
Sep 9, 2024
Conversation
This file contains 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
…ents-task-tracks-props
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
…ents-task-tracks-props
vladolaru
commented
Sep 9, 2024
oaratovskyi
approved these changes
Sep 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM and they work according to the instructions 🚢
vladolaru
deleted the
update/9401-woopayments-incentive-to-payments-task-tracks-props
branch
September 9, 2024 15:17
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.
Fixes #9401
Changes proposed in this Pull Request
We use the
woocommerce_admin_woopayments_onboarding_task_additional_data
WP filter introduced in this WooCommerce PR to add the active incentive ID to the Payment task's additional data so the core JS logic attaches the incentive ID to the Payments task click Tracks event (wcadmin_tasklist_click
).We need to do this also in the WooPayments client, because when WooPayments is active, the incentive logic in core will not be activated, letting WooPayments to handle incentives.
Testing instructions
Pre-testing setup
JurassicNinja testing
wcadmin_tasklist_click
event with thetask_name: woocommerce-payments
prop and thewoopayments_incentive_id
prop:wcadmin_tasklist_click
event with thetask_name: woocommerce-payments
prop and thewoopayments_incentive_id
prop:wcadmin_tasklist_click
event with thetask_name: woocommerce-payments
prop and WITHOUT thewoopayments_incentive_id
prop:npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge