Introductory Pricing: Save 50% on your first year of any plan. Use coupon code:

FIRSTYEAR50

  • Log In
  • Welcome
  • Features
  • Pricing
  • Documentation
  • Case Studies
  • Add Ons
  • Support
  • Learn
  • Events
  • Blog
  • Contact

Log In

Join Now | Lost Password?
Skip to content
Paid Memberships Pro WordPress Membership Plugin
  • Log In
  • Choose a Plan
  • Features
    • PMPro Platform
      • Plugin Features
      • Restrict Access
      • Register Members
      • Subscriptions
      • All Features
    • Payment Gateways
      • Stripe
      • PayPal Express
      • Paystack
      • CCBill
      • All Gateways
    • Add Ons
      • Integrations
      • Free Add Ons
      • Standard Add Ons
      • Plus Add Ons
      • All Add Ons

    Launch a Free Demo
    Explore PMPro in action with your own private demo site—preloaded with members, protected content, and premium Add Ons.

    Try PMPro Now
  • Use Cases
    • Associations
    • Blog and News
    • Communities
    • Courses
    • Directories
    • Paid Newsletters
    • Private Videos
    • Podcasting
  • Documentation
    • Download & Install
      • Download PMPro
      • Install Add Ons
      • Memberlite Theme
      • Setup WordPress
      • Staging Sites
      • Support
    • Initial Setup
      • Customize Pages
      • Payment Settings
      • Restrict Content
      • Membership Levels
      • Member Emails
      • User Fields
    • More Docs
      • Shortcodes & Blocks
      • Design Settings
      • Page Builders
      • Reporting
      • For Developers
      • All Docs

    Get your membership site up and running with Kim's help.

    Watch Initial Setup
  • Community
    • Engage & Learn
      • Upcoming Events
      • Courses
      • Videos
      • Step-by-Step Guides
      • Join Slack
      • Get Support
    • Blog
      • Case Studies
      • Product Comparison
      • Code Recipes
      • Release Notes
      • Migration Guides
      • All Blog Posts

    Join the Community
    Connect with other membership site creators who use PMPro to get paid.

    Join Slack
  • Pricing
Home  >  Blog  >  Process Membership Checkout in a Modal or Popover Window

Process Membership Checkout in a Modal or Popover Window

Estimated reading time: 4 minutes

TweetFacebookLinkedIn

Jason recently wrote up a simple recipe to allow membership checkout in a popup or modal window. This allows you to create a button (in any page, post, widget) that will instantly display the membership checkout form. Read on for more information, how to set it up, and some notes.

Banner Image for Process Membership Checkout in a Modal or Popover Window Code Recipe

How it Works

This recipe loads the membership checkout template in the footer of your pages, allowing you to add a link or button that triggers the form’s display. It works with every payment gateway included in Paid Memberships Pro or for a free level not requiring any payment. You can use User Fields to collect additional fields in the modal form or load a custom checkout template to further enhance the appearance.

Gif of using Register Helper Add On to collect additional fields

You will need to set a “default level” for membership checkout in the popover. This can be set to one sitewide level ID, or customized per page. For example, if you have a sales page for a level ID 2 membership, you can set the default to “2” for that page, and allow the default to be level 1 for all other pages.

To set up modal or popup checkout window, you will need to:

  1. Paste the code recipe into your PMPro Customizations plugin.
  2. Customize the default level for your modal window.
  3. Add a link to trigger the window in your posts, pages, or widgets.

The recipe is very lightweight and does not rely on any additional popup plugins or any JavaScript that is not native to WordPress .

Modal Popup Membership Checkout

Adding the Link to Trigger the Modal

The modal window relies on JavaScript and a specific element class name pmprocm_modal_btn to trigger its display. You can simply add a link, like the suggested links below, wherever you would like in your content.

//Button-style Link
<a class="pmpro_btn pmprocm_modal_btn" href="#">Buy Now</a>

//Text-style Link
<a class="pmprocm_modal_btn" href="#">Sign Up Now!</a>

The Code Recipe

Copy and paste this code recipe into a helper PMPro Customizations plugin. Adjust the PMPRO_MODAL_CHECKOUT_DEFAULT_LEVEL constant for your needs.


Customizing the Level Per Page

We know that this is a basic recipe that opens the doors to more advanced modal checkout features. For example, if you would like to change the level for membership checkout in the modal based on the page, here is a code block that you can use to replace the line defining the default level in the recipe above.

Copy and paste this code recipe into a helper PMPro Customizations plugin. Adjust the PMPRO_MODAL_CHECKOUT_DEFAULT_LEVEL constants and page checks for your needs.


Customizing the Modal Appearance

This recipe includes some basic CSS to adjust the appearance of the modal window. Some alternative styles you may want to consider include full width input elements or adjusted colors for the dimmed background. We can help with more appearance adjustments through the members-only forum.

To make the modal checkout even more streamlined, you may want to explore using a filter to not require a duplicate email address or password entry. You can also streamline checkout by not requiring a billing address.

See documentation on the pmpro_checkout_confirm_email and pmpro_checkout_confirm_password filters.

There are loads of options available, so please open a topic on the members-only forum to continue the conversation about your unique modal checkout needs.

Some Notes to Keep in Mind

  • It is important that your entire site loads over the https protocol if you plan to process membership checkout in this method.
  • If you are already using a popup plugin, see this post for some details on enabling membership logic and features in some popular plugins.
  • Again, this is a lightweight approach that can be used as a baseline for more advanced modal checkout features we hope to implement.
Kim Coleman

Author: Kim Coleman

Kim Coleman is the co-founder of Paid Memberships Pro, the most trusted membership platform, which powers over 90,000 membership sites worldwide. With over two decades of experience in development, management, and marketing, Kim plays a pivotal role in shaping the product and guiding the team.

She specializes in content creation, video tutorials, and frontend development for the core open-source plugin and its various Add Ons, helping businesses of all sizes build and grow their membership sites.

View more articles by Kim Coleman »

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.

Take Free Course Now
Featured Image for Membership Site Development Course: The Basics


Was this article helpful?
YesNo
Tagged: checkout, pmpro_checkout_confirm_email, pmpro_checkout_confirm_password, signup, wp_footer. Posted in Code Recipes, Premium Code Recipes. Bookmark the permalink. Last updated: January 8, 2018.
Post navigation
← Helping Rabbi Patrick Simplify and Manage Complex Online Learning Programs
Prevent users from using an email address as their username. →

Paid Memberships Pro is recommended by our customers and users

Plugin Reviews

4.3 out of 5

G2

4.8 out of 5

Capterra

5 out of 5

We’re 100% GPL

Our plugin's code is not obfuscated, runs on as many sites as you want and can be customized to fit your project's needs. We just ask that you follow the GPLv2 guidelines by applying the GPLv2 license to any altered or unaltered version of PMPro that you distribute. License Details »

GPL v2

Recent Articles and Updates

  • Featured image for code recipe 'Customize Login Error Messages to Boost Account Security'
    Customize Login Error Messages to Boost Account Security
  • Banner for Memberlite v6.0
    Introducing Memberlite v6.0
  • Screenshot of featured image for 'Capture User Fields for Google Analytics Integration Add On' code recipe post
    Capture User Fields as User Properties for Reporting in Google Analytics Integration Add On

Platform

  • Pricing
  • Features
  • Product Comparison
  • Reviews
  • Case Studies
  • Screenshots
  • Videos
  • Step-by-Step Guides

Use Cases

  • Associations
  • Blog & News
  • Community
  • Courses
  • Directory & Listing
  • Paid Newsletter
  • Podcast
  • Videos

Add Ons

  • Free
  • Standard
  • Plus
  • Admin
  • Integration
  • Payment
  • Third Party
  • View All

Get Help

  • Support
  • Documentation
  • Download & Install
  • Hosting
  • Developers
  • Blog
  • Slack Community
  • Contact Us

Company

  • About Us
  • Events
  • Brand Assets
  • Affiliates
  • Accessibility Statement
  • Sitemap
  • Privacy Policy
  • Terms of Service
Join Us On

© 2025 Paid Memberships Pro™. Paid Memberships Pro is a trademark of Stranger Studios, LLC. All Rights Reserved.

Open Office Hours: Ask Me Anything with Jason and Andrew • Thursday, May 15th at 11am ET. SEE DETAILS ▸