Paid Memberships Pro shows a “Terms of Service” checkbox that links to one “Terms of Service” page at checkout. But if you offer multiple membership levels with different terms, like a standard membership, a business plan, or a level with specific regional requirements, one generic page may not be enough.

This code recipe uses the option_pmpro_tospage filter to serve a different “Terms of Service” page depending on the level a member is purchasing at checkout. All other levels will continue to show your default TOS.

Featured image for Show a Different Terms of Service at Checkout Based on Membership Level

Do You Need This Recipe?

This recipe is a good fit if:

  • You offer multiple membership levels, and each level carries different contractual terms.
  • You have a business or professional tier that requires a separate service agreement.
  • You need to display region-specific or compliance-driven terms for certain levels.

If all of your membership levels share the same terms, the built-in PMPro TOS setting is enough.

Before You Start

This recipe requires:

  1. A TOS page set under Memberships > Settings > General. This is your default “Terms of Service” page and what all other levels will continue to use.
  2. One or more additional WordPress pages created for your level-specific terms. Each page should be published before activating the snippet.
  3. The page ID for each custom TOS page, visible in the URL when editing the page in WordPress admin. (post=123)
  4. The membership level ID for each level that needs its own terms, found under Memberships > Settings > Levels.

About the Code Recipe

The option_pmpro_tospage filter intercepts the TOS page ID that PMPro retrieves from site settings. This recipe runs that filter only on the checkout page (confirmed with pmpro_is_checkout()), then retrieves the level the member is checking out for using pmpro_getLevelAtCheckout().

If the level matches a specified ID, the recipe swaps in the custom TOS page ID. If the page does not exist or is not published, the filter falls back to the default TOS page.

All other levels will see the default TOS page.

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.

How to Customize This Recipe

Add more levels: Duplicate the if block on line 31 and change the $level->id and $custom_tospage_id values for each additional level that needs its own “Terms of Service” page.



Was this article helpful?
YesNo

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