Add a Membership Duration dropdown to Checkout and Offer a Discount for Extending Membership

Give your customers the option to select a membership duration and offer a discount for a longer term. This is a great way to collect a larger up-front payment from members and offer an incentive to pay for membership in advance.

Screenshot of the Membership Checkout page with code recipe


About the Recipe

This code will add a “Membership Duration” dropdown field to your checkout page. Once selected, the member’s expiration date and initial payment amount will be updated accordingly.

In the code recipe, there is a 20% discount when selecting a 2-year membership duration and a 25% discount for selecting a 3-year membership duration. The code recipe serves as an example for what is possible, you can alter the recipe to remove the discount or adjust the discount to suit your business.

You will need to input the Level ID that you want this code recipe to apply to. Only select membership levels that are billed on a yearly basis otherwise this will conflict with other level billing periods. Add your Membership Level ID to 'levels' => array( 8 )

This code recipe requires the Register Helper Add On to be installed and activated. If you need help altering this code to suit your needs, feel free to get in touch with one of our Support Engineers on our Member Support Forum.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Allow members to optionally exclude their profile from the Member Directory

This code will add an “Exclude my profile from the member directory” field at membership checkout when using the Member Directory and Profile Pages Add On for Paid Memberships Pro.

"Exclude my profile from the member directory" field at checkout.


About the Recipe

The Member Directory and Profile Page Add On includes functionality to allow members to remove their profile from display. This field is added by default as a field on the user’s WordPress Profile. The recipe below adds that field at membership checkout (note that this recipe requires the Register Helper Add On).


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Ask “How did you hear about us?” at Membership Checkout

This code recipe adds a field to ask new members how they were referred to your site via the Register Helper Add On. The member can select the referring source via dropdown or enter a custom “Referred by” value. The field is display in the User Profile and Members List Export for admins only.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Capture Default WP User Profile Fields at Membership Checkout using Register Helper

Our Register Helper Add On allows you to add new profile fields at membership checkout. This recipe will demonstrate how to use that add on to capture and populate the default fields in the WordPress User profile.

Default WP User fields at checkout


What are the default WordPress User fields?

The WP_User class has the following core fields that you may want to capture at membership checkout. It’s important to use the exact field “key” so that captured fields are properly matched to the default profile field.

Field Key Field Name
user_login Username*
first_name First Name
last_name Last Name
nickname Nickname
email Email Address*
url Website
description Biographical Info

* This field is already captured at Membership Checkout with a default Paid Memberships Pro setup.


Capture First and Last Name

You can skip the methods below and use the Add Name to Checkout Add On to instantly add the fields for First Name and Last Name on membership checkout. This method does not require Register Helper.

View the Add On

Use Billing Name as First and Last Name

This tutorial shows you how to synchronize fields from the Billing Information section of membership checkout with user meta fields, included custom fields added via the Register Helper Add On or fields core to the WordPress user object.

View the Tutorial

Capture Some Other Default User Meta Field

Below is the code to use the Register Helper Add On to capture the “Biographical Info” and “Website” fields at membership checkout.

Copy and paste this code recipe into a helper PMPro Customizations plugin.

Exploring Register Helper: Adding Conditional Fields to Member Profile and Checkout

Our Register Helper Add On allows you to add fields to the member profile and checkout process. This post highlights the ability to set one field as dependent on another field’s value.


For example…

Here’s a code demo using the “depends” attribute of the Register Helper Add On for a selection of “Cat” or “Dog”. It displays the text input field “Cat’s Name” or “Dog’s Name” based on the selection.

While this is a fairly simple example, it shows how you can build a robust form with conditional entries to capture additional information at checkout or on the member profile. These fields can be used in your Member Directory and Profile pages, added to your third party email platform for enhanced targeting, or even duplicated as a member’s BuddyPress xProfile fields.


The Code Recipe

You’ll need to update the recipe for your own conditional fields, but this provides the basic overview of how to set a conditional field. See more documentation on conditional fields here.

Sell Access to Post Categories “à la carte” Using Price-Adjusting Register Helper Fields

We blogged previously about synchronizing a post category with the purchase of an Addon Package.

This new recipe uses price-adjusting fields added via Register Helper to allow members to purchase individual post categories. And—unlike the previous method—this approach can update the recurring membership price.

pmpro_purchase_additional_access

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Display the Member’s Billing Address Fields on the Edit User Page for Admin Only

This code recipe (which requires the Register Helper Add On) will add the Member’s Billing Address fields from Membership Checkout to the “Edit User” admin page.

The fields are displayed for the administrator role only.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »