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

Add/popup info to donations #2300

Merged
merged 4 commits into from
Feb 24, 2023
Merged

Add/popup info to donations #2300

merged 4 commits into from
Feb 24, 2023

Conversation

leogermani
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This PR adds referer and popup information to the Donate process via the donation block.

It depends on Automattic/newspack-blocks#1378 and Automattic/newspack-popups#1060

This will allow us to have more information about where the donation is coming from when firing our Data Api events.

How to test the changes in this Pull Request:

  1. Checkout this PR, feat: add popup info to donation block newspack-blocks#1378 and feat: add popup info to donation block newspack-popups#1060
  2. Set Stripe as the Reader Revenue platform
  3. Create a Campaign prompt with a Donation block
  4. Make a recurring donation through this prompt
  5. After confirmation, go to Woocommerce > Orders and Woocommerce > Subscriptions and check the ID of the order and the subscription that were created
  6. Check the database and confirm the two of them have a _referer and a _newspack_popup_id post_meta values.
  7. Repeat steps 4 to 6 making a One Time donation
  8. Repeat steps 4 to 7 with Newspack as the Revenue platform
  9. add the Donation block to a regular page (not a campaign prompt)
  10. make a donation through this page and confirm it works and the _newspack_popup_id metadata is not created

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Member

@adekbadek adekbadek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's an issue, but the _referer is absolute for orders made with Stripe as platform and relative with Newspack as platform. Also, WDYT about calling it _newspack_referer, to avoid conflicts with other plugins?

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Feb 23, 2023
@leogermani
Copy link
Contributor Author

Not sure if it's an issue, but the _referer is absolute for orders made with Stripe as platform and relative with Newspack as platform.

Good catch! Fixed in Automattic/newspack-blocks@777685a

Also, WDYT about calling it _newspack_referer, to avoid conflicts with other plugins?

Good idea. Done in 63ea201

@leogermani leogermani merged commit 7ea800b into master Feb 24, 2023
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.105.0-hotfix-hpb-amp-optimisations.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Mar 3, 2023
# [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))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.106.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Mar 14, 2023
# [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))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.106.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@miguelpeixe miguelpeixe deleted the add/popup-info-to-donations branch July 12, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants