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

fix(donate): override defaults with manual config #1313

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Nov 17, 2022

All Submissions:

Changes proposed in this Pull Request:

In the Donate block, if manually configured the manual settings don't fully override the default settings in the Reader Revenue wizard as you would expect. If a frequency is disabled in Reader Revenue, that frequency will remain disabled in a manually configured block, even if that frequency is manually enabled.

This branch tweaks the logic so that if a block is manually configured, its manual settings completely override the settings in Reader Revenue.

Also overrides the default frequency if the manual setting differs from the default settings.

Closes /0/1200550061930446/1203385734865005.

How to test the changes in this Pull Request:

  1. Toggle off the One-Time option in Reader Revenue → Donations. Keep Monthly and Annual enabled.
  2. Create a new page. Add the Donate Block.
  3. Toggle on the option to Configure Manually.
  4. Enable One-Time in block settings, and disable Monthly.
  5. Note that the one-time option does appear in the editor.
  6. Publish the page.
  7. Notice that the One-time option isn't available on the front-end.
  8. Check out this branch, refresh. Confirm that the One-Time and Annual tabs are available (only those configured in manual settings).
  9. In block settings, set the default frequency to something other than it is in Reader Revenue.
  10. Confirm on the front-end that the default frequency matches the manual setting, not the Reader Revenue setting.

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?

@dkoo dkoo added bug Something isn't working [Status] Needs Review labels Nov 17, 2022
@dkoo dkoo requested a review from a team as a code owner November 17, 2022 23:29
@dkoo dkoo self-assigned this Nov 17, 2022
@dkoo dkoo merged commit 637284f into master Nov 18, 2022
@dkoo dkoo deleted the fix/manual-config-overrides branch November 18, 2022 16:30
matticbot pushed a commit that referenced this pull request Dec 1, 2022
## [1.59.1-alpha.1](v1.59.0...v1.59.1-alpha.1) (2022-12-01)

### Bug Fixes

* **donate:** override defaults with manual config ([#1313](#1313)) ([637284f](637284f))
* update CI orb newspack-scripts ([a6675b7](a6675b7))
@matticbot
Copy link
Contributor

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

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Dec 12, 2022
## [1.59.1](v1.59.0...v1.59.1) (2022-12-12)

### Bug Fixes

* **donate:** override defaults with manual config ([#1313](#1313)) ([637284f](637284f))
* update CI orb newspack-scripts ([a6675b7](a6675b7))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.59.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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