-
Notifications
You must be signed in to change notification settings - Fork 49
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
Update/normalize donation events #2299
Conversation
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.
Approving because it works, but I noticed something that may be outside the scope of this PR—when using the Stripe RR platform, the user_id
value always seems to be 0
. Tested on both an existing and a new browser session.
I could not reproduce this. Did you have RAS enabled when you tested? This will happen if RAS is not enabled because a user won't be created. I really want @miguelpeixe to have a look at this, but I'll merge it if I get to the next task that depends on it so I'm not blocked. We can always revisit/revert it if Miguel finds a problem. |
RAS is enabled on my site, and the user ID is populated when Newspack is the Reader Revenue platform. It's only |
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.
Working as described
when using the Stripe RR platform, the user_id value always seems to be 0. Tested on both an existing and a new browser session.
@dkoo Perhaps you are unauthenticated and donating with an already registered email? The donation will not be tied to the user ID if that's the case.
Why not? Shouldn't it? |
That was my assumption as well—I was assuming if using an email address that is known to be associated with a user ID, that user ID should be sent with the data. |
We can double-check with @adekbadek, but that's not how it's designed: newspack-plugin/includes/reader-revenue/stripe/class-stripe-connection.php Lines 771 to 775 in 2624d53
newspack-plugin/includes/reader-activation/class-reader-activation.php Lines 1284 to 1298 in 2624d53
I'm not sure we can/should relate a donation to a user account without authorization. |
Thanks for the additional info—let's leave as-is for now |
# [1.106.0-alpha.1](v1.105.0...v1.106.0-alpha.1) (2023-03-03) ### Bug Fixes * **ads:** gam api availability according to error type ([#2289](#2289)) ([024fe08](024fe08)) ### Features * add a Add new button to subscription lists ([#2314](#2314)) ([9543ad2](9543ad2)) * add ga4 user registered handler ([#2281](#2281)) ([5eb2336](5eb2336)) * add pid to Logger ([#2290](#2290)) ([fd3011c](fd3011c)) * Add popup info to donations ([#2300](#2300)) ([7ea800b](7ea800b)) * allow external links in dashboard via a filter ([#2279](#2279)) ([3943b1a](3943b1a)) * campaigns listeners for the data events api ([#2291](#2291)) ([ab407d4](ab407d4)) * disable save button for unchanged settings ([#2259](#2259)) ([e06d72f](e06d72f)), closes [#1531](#1531) * **donate-block:** support modal checkout ([#2256](#2256)) ([34226dd](34226dd)) * Normalize donation events ([#2299](#2299)) ([2624d53](2624d53)) * **perfmatters:** improve config ([267306e](267306e)) * prevent homepage from being unpublished ([#2307](#2307)) ([a151d53](a151d53)) * Remove the campaign rendered event ([#2301](#2301)) ([23caa1d](23caa1d)) * Stripe Subscriptions to WC subscriptions migrator ([#2298](#2298)) ([6904356](6904356)), closes [#2251](#2251) * **wc:** force allowing subscription switching ([#2305](#2305)) ([c13e741](c13e741))
🎉 This PR is included in version 1.106.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.106.0](v1.105.1...v1.106.0) (2023-03-14) ### Bug Fixes * **ads:** gam api availability according to error type ([#2289](#2289)) ([024fe08](024fe08)) * show handoff to finish Newspack setup only if setup is incomplete ([#2343](#2343)) ([1173b5b](1173b5b)) ### Features * add a Add new button to subscription lists ([#2314](#2314)) ([9543ad2](9543ad2)) * add ga4 user registered handler ([#2281](#2281)) ([5eb2336](5eb2336)) * add pid to Logger ([#2290](#2290)) ([fd3011c](fd3011c)) * Add popup info to donations ([#2300](#2300)) ([7ea800b](7ea800b)) * allow external links in dashboard via a filter ([#2279](#2279)) ([3943b1a](3943b1a)) * campaigns listeners for the data events api ([#2291](#2291)) ([ab407d4](ab407d4)) * disable save button for unchanged settings ([#2259](#2259)) ([e06d72f](e06d72f)), closes [#1531](#1531) * **donate-block:** support modal checkout ([#2256](#2256)) ([34226dd](34226dd)) * Normalize donation events ([#2299](#2299)) ([2624d53](2624d53)) * **perfmatters:** improve config ([267306e](267306e)) * prevent homepage from being unpublished ([#2307](#2307)) ([a151d53](a151d53)) * Remove the campaign rendered event ([#2301](#2301)) ([23caa1d](23caa1d)) * Stripe Subscriptions to WC subscriptions migrator ([#2298](#2298)) ([6904356](6904356)), closes [#2251](#2251) * **wc:** force allowing subscription switching ([#2305](#2305)) ([c13e741](c13e741))
🎉 This PR is included in version 1.106.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Normalizes the
donation_new
event so it works the same way in both platforms.Before the change in this PR, donations processed through Woocommerce would trigger a
donation_new
event before they were confirmed, while in Stripe it would only be triggered after confirmation.Now the event is only triggered after confirmation in both platforms.
We keep the current WooCommerce listener as a new event called
donation_order_processed
as suggested in p1676562193774819-slack-1676536201.225739 (even though I'm not sure we need it)How to test the changes in this Pull Request:
Other information: