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

Moving all TOS logic into a single file #3119

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

dparker1005
Copy link
Member

@dparker1005 dparker1005 commented Aug 15, 2024

All Submissions:

Changes proposed in this Pull Request:

Currently, the logic for TOS fields is spread across numerous PMPro files when the TOS field can be implemented using existing PMPro hooks.

Moving all of the TOS logic into a single file has a number of benefits:

  1. Simplifies all of the code that included TOS logic (specifically checkout) and will allow for more flexibility when updating those files in the future.
  2. Allows unhooking the TOS field from the checkout page and re-hooking a custom UI (such as embedding the page contents into the checkout form)
  3. Makes it easier to extend the TOS field in the future by having all the code that would need to be modified in a single place
  4. Provides a template for creating a second TOS field using custom code.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

@dparker1005 dparker1005 added this to the 3.2 milestone Aug 20, 2024
@dparker1005 dparker1005 merged commit 436b19c into strangerstudios:v3.2 Aug 20, 2024
@dparker1005 dparker1005 deleted the refactor-tos branch August 20, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant