The “My Memberships” section of the Account page is the primary place members go to access details about their membership. By default, this section includes action links like Renew, Update Billing Info, Change, and Cancel membership. However, there are cases where you may want to add custom links that give members with quick access to tools, resources, or benefits specific to their membership level.

This recipe shows you how to use the pmpro_member_action_links filter to add dynamic, conditional links to this section, making it easier for members to access the specific tools, courses, or archives available as part of their membership.

Banner Image for Add Conditional Action Links to the Membership Account Page

By default, the My Memberships section displays an individual card for each of the user’s active memberships. The following links are displayed in each card, when applicable:

  • Renew: Displays if the membership level is expiring soon.
  • Update Billing Info: Displays if the membership is tied to a subscription with a gateway that supports updating billing info.
  • Change: Displays if there are other available membership levels in their current level group to switch to.
  • Cancel: Displays a link to cancel the member’s current subscription and set an expiration date on their access.

These links provide essential account management options, but they are the same for all members regardless of their level.

Customizing these links based on membership levels allows you to:

  • Encourage Upgrades: Add upgrade paths to higher membership levels, targeting specific tiers.
  • Provide Direct Access: Give members quick access to premium tools, courses, or archives available with their membership.
  • Simplify Navigation: Tailor the Member Account page to help members find the most relevant resources based on their level.

For example:

  • Add an upgrade link for members at Level ID 2, directing them to Level ID 3.
  • Include a link to premium resources for members with higher-tier memberships.
  • Add a direct link to a single course that is offered as part of an a la carte course catalog.
Example Membership Account page with member action link to access exclusive bonuses for level ID 3.

How the Code Recipe Works

This code recipe uses the pmpro_member_action_links hook to insert additional links based on the level ID in the card. he code has a few working parts:

  1. Level Check: First, the code checks the card’s membership level using the $level_id parameter.
  2. Adding Links: Next, the code adds unique links based on the $level_id, including:
    • Adds an Upgrade link for level 2 members that directs them to checkout for Level ID 3.
    • Adds a Bonuses link for level 3 members that points to a custom bonuses page.
  3. Dynamic Display: Finally, these links are inserted into the array of links already added by PMPro so they can be displayed on the page.
Example Membership Account page with member action link CTA to upgrade membership.

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 Code Recipe

Here are additional ways you can extend action links:

  • Conditional Links for Expiration: Display a renewal discount link for expiring members.
  • Resource-Specific Links: Add direct links to courses, webinars, or downloads tied to specific membership levels.
  • Support Access: Include a link to contact support for higher-tier members.
  • Special Promotions: Add promotional links for limited-time offers.

By customizing the My Memberships section to include conditional links, you can make it easier for members to access the tools and resources they value most.

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