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.

Banner Image for Code Recipe to Add a Required Checkbox for Service Agreement or Terms of Service

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:

  1. 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.
  2. Navigate to Media > Library and click on your Terms & Conditions PDF document in the library.
  3. When the “Attachment Details” modal window for your media file is open. Note the item ID number displayed in your browser’s address bar.
  4. When using the recipe below, update line ’33’ to the correct ID for your uploaded file.
  5. If you’re using the linked page method, replace wp_get_attachment_url on line 33 with get_permalink and update the permalink ID to that of your terms page.
Screenshot of Membership Checkout with Terms of Service as a Text Link

Now that you have your terms file or page configured:

  1. Navigate to Memberships > Settings > Advanced.
  2. Confirm that “Require Terms of Service on signups?” under “Checkout Settings” is set to “No”.
  3. Add the following recipe to your site.
  4. 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.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo