The core Paid Memberships Pro plugin includes a setting to require agreement to your site’s “Terms of Service” at Membership Checkout. By default, the terms are loaded in a scrolling box directly on the checkout page.
This recipe will show you how to display your TOS as a basic text link with a required checkbox. I have also included a CSS snippet to highlight your “Terms and Conditions” link.
How to Add a TOS Agreement as a Linked Page or Linked PDF
The customization function in this guide adds a required terms agreement checkbox as a linked page or linked file. This method could be used as an alternative to the core Paid Memberships Pro method to display the terms agreement at checkout as outlined in this guide.
First create the page or upload the media file for use in the recipe. To use a page in WordPress, create the new page and include your terms in the post content. For the linked file method, follow the steps below:
- Navigate to Media > Add New and upload your Terms & Conditions PDF document. We do not recommend using any other file type for readability and security reasons.
- Navigate to Media > Library and click on your Terms & Conditions PDF document in the library.
- When the “Attachment Details” modal window for your media file is open. Note the item ID number displayed in your browser’s address bar.
- When using the recipe below, update line ’33’ to the correct ID for your uploaded file.
- If you’re using the linked page method, replace
wp_get_attachment_url
on line 33 withget_permalink
and update the permalink ID to that of your terms page.
Now that you have your terms file or page configured:
- Navigate to Memberships > Settings > Advanced.
- Confirm that “Require Terms of Service on signups?” under “Checkout Settings” is set to “No”.
- Add the following recipe to your site.
- Finally, navigate to your membership checkout page and test the Terms & Conditions link.
The Code Recipe
Adding the Recipe to Your Website
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.
Free Course: Membership Site Development—The Basics
Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.