Snippets Library for Paid Memberships Pro and related Add Ons
We are aiming to collect all of the most useful Gists and Snippets here in one place.
A few of the benefits of this collection will be:
- Quality Assurance: Each snippet will get code reviewed for quality and compatibility
- Access: Easy to search via GitHub (or locally)
- Offline Access: Easy to checkout this repo locally by the team as needed
- Maintainability: One place to update as changes are needed going forward for any snippet (not stuck on any one GitHub user account)
Submitting new snippets or changes
- Just go to the folder (or create a new path) for where you want to add/change a snippet.
- Create a fork and submit Pull Fequest with your snippet work.
- The PR will be code reviewed.
- In the mean time, you can provide customers with your own Gist URL of the snippet.
- After PR is approved, the snippet will be merged.
- Now the snippet is ready for inclusion on our site!
Header Layout for snippets
Please include the following header format when submitting a snippet
/**
* Describe what the snippet does in one sentence. (i.e. Add a checkbox to the checkout page.)
*
* title: Add custom field to checkout
* layout: snippet-example
* collection: frontend-pages
* category: custom-fields
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/