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

feat: ensure that membership plans have unique network id #108

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

leogermani
Copy link
Contributor

@leogermani leogermani commented Jul 1, 2024

One membership plan in one site should always map to one membership plan in the other sites.

This PRs make sure you don't allow users to set the same "network id" for more than one membership plan.

This is an alternative to #80

Testing

  • Create a membership plan and assign a network id
  • Confirm it saves the network id as you created it
  • edit the membership plan and confirm the network id is kept
  • Create another membership plan and try to assign the same network id
  • confirm the network id is suffixed with -2
  • Try to create a third one and confirm it's still unique
  • Edit any of the membership plans and add an unique network id and make sure it does not get the -2 suffix added when it shouldn't

Copy link
Contributor

@chickenn00dle chickenn00dle left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@leogermani leogermani merged commit d2d63a0 into trunk Jul 30, 2024
4 checks passed
@leogermani leogermani deleted the feat/ensure-membership-plan-unique-net-id branch July 30, 2024 20:14
matticbot pushed a commit that referenced this pull request Aug 1, 2024
# [1.11.0-alpha.1](v1.10.1...v1.11.0-alpha.1) (2024-08-01)

### Bug Fixes

* **memberships-sync:** handle active subs from other nodes ([#114](#114)) ([97f9a58](97f9a58))

### Features

* **distributor:** sync comment status ([#116](#116)) ([5844853](5844853))
* ensure that membership plans have unique network id ([#108](#108)) ([d2d63a0](d2d63a0))
@matticbot
Copy link
Contributor

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Aug 13, 2024
# [2.0.0](v1.10.1...v2.0.0) (2024-08-13)

### Bug Fixes

* **memberships-sync:** handle active subs from other nodes ([#114](#114)) ([97f9a58](97f9a58))
* update dependencies to support `@wordpress/scripts` ([#104](#104)) ([e9691b8](e9691b8))

### Features

* **distributor:** sync comment status ([#116](#116)) ([5844853](5844853))
* ensure that membership plans have unique network id ([#108](#108)) ([d2d63a0](d2d63a0))

### BREAKING CHANGES

* Updates dependencies for compatibility with WordPress 6.6.*, but breaks JS in WordPress 6.5.* and below. If you need support for WP 6.5.*, please do not upgrade to this new major version.

* chore: refactor for newspack-scripts dependency updates

* chore: update composer

* fix: peer dependencies

* chore: update newspack-scripts to v5.6.0-alpha.3

* chore: update newspack-scripts to v5.6.0-alpha.4

* chore: remove unnecessary prettier config file

* chore: update newspack-scripts to v5.6.0-alpha.7

* fix: update phpcs.xml

* chore: bump newspack-scripts to v5.5.2
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

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