Paid Memberships Pro Documentation

repository·dev·Indexed 19 days ago

https://github.com/strangerstudios/paid-memberships-pro

A WordPress plugin for starting, managing, and growing membership sites. It includes tools for membership level selection, checkout processes, content restriction, and member self-service. The codebase integrates Action Scheduler for background processing, a CRON expression parser for scheduling, and PHP libraries for Braintree and Stripe payment gateways.

Tokens
20.2K
Snippets
77
Records
106
Agent score
66%

What's inside Paid Memberships Pro

  1. Overview of Paid Memberships Pro features

    dev

    Paid Memberships Pro is an open-source membership platform for WordPress that provides tools for content restriction, membership management, and recurring payments.

    Core Capabilities

    • Content Restriction: Protect default content, specific posts, courses, videos, or forums. Supports 'metered' access (limiting views) and 'content dripping' (releasing content over time).
    • Membership Management: Supports unlimited levels, multiple memberships per user (v3.0+), group memberships (parent/child accounts), and custom user fields by level.
    • Ecommerce & Payments: Built-in support for Stripe and PayPal. Supports flexible pricing (free, one-time, or recurring), customizable trials, proration, and discount/gift codes.
    • Member Experience: Provides front-end registration, login, password recovery, user profiles, and account dashboards.
    • Developer Tools: Extensible via REST API, extensive action and filter hooks, and compatibility with major page builders (Elementor, Divi, etc.) and LMS platforms (LearnDash, LifterLMS).
  2. What is Action Scheduler?

    dev

    Action Scheduler is a scalable, traceable job queue designed for background processing large sets of actions in WordPress. It is specifically built to be distributed within WordPress plugins to handle resource-intensive tasks without impacting site performance.

    It functions as an extension to the standard WordPress do_action() mechanism by adding the ability to:

    • Delay a hook to run at a specific time in the future.
    • Repeat a hook on a recurring schedule.
    • Pass unique data to each scheduled hook, allowing callbacks to perform specific operations based on that data.

    It is used by high-scale plugins like WooCommerce Subscriptions to process millions of payments and webhooks.

  3. What is Action Scheduler and how does it work?

    dev

    Action Scheduler is a scalable, traceable job queue designed for background processing large sets of actions in WordPress. It is intended to be distributed within WordPress plugins to handle resource-intensive tasks without impacting normal site operations.

    Conceptually, it acts as an extension to the standard WordPress do_action() function by adding the ability to delay and repeat hooks. It works by triggering an action hook to run at a specified time in the future. Each scheduled hook can include unique data, allowing callbacks to perform specific operations on that data. Hooks can also be scheduled to run on multiple occasions.

  4. Extend Paid Memberships Pro with Add Ons

    dev

    You can extend the core functionality of PMPro using a library of over 65 Add Ons. Common use cases include:

    • Email Marketing: Integrate with platforms like Mailchimp.
    • Social Login: Allow members to join using social media profiles.
    • Affiliate Management: Manage affiliates via native Add Ons or third-party systems like AffiliateWP.
    • Events: Manage members-only events using integrations with Events Manager, The Events Calendar, or Sugar Calendar.
    • Page Builders: Enhanced design capabilities for Elementor, Beaver Builder, and others.
  5. Configure WordPress Multisite for memberships

    dev

    Paid Memberships Pro can be used in a WordPress Multisite network in several ways:

    1. Standalone Mode: By default, PMPro acts as a standalone plugin for each site in the network, with independent levels, members, and settings.
    2. Member Network Sites Add On: Allows members to choose a site name and title during checkout, automatically setting up a new network site for them.
    3. Multisite Membership Add On: Allows you to manage memberships at the 'Main' Network site and use those memberships to provide or restrict access on other Network Subsites.
  6. Install and set up Paid Memberships Pro

    dev

    To install Paid Memberships Pro, download the plugin from the official website and install it on your WordPress site.

    After activation, follow these steps:

    1. Run the Setup Wizard: A brief wizard will appear immediately after activation to guide you through the initial configuration.
    2. Configure Membership Levels: Define your pricing and access levels.
    3. Set up Payment Gateways: Configure your preferred gateway (e.g., Stripe or PayPal) to accept payments.

    For detailed instructions, refer to the Initial Setup Tutorial.

  7. External Documentation for Action Scheduler

    dev

    For deep technical implementation, refer to the official documentation at ActionScheduler.org:

    • Usage Guide: Instructions for installing and using the library in your plugin.
    • WP CLI Guide: Instructions for managing and running actions at scale via the command line.
    • API Reference: A complete reference for all available API functions.
    • Administration Guide: How to manage scheduled actions via the WordPress admin screen.
    • Background Processing at Scale: Guidance on running the queue via the default WP Cron runner.
  8. Learn more about Action Scheduler

    dev

    For detailed implementation and management, refer to the official documentation at ActionScheduler.org. Key resources include:

    • Usage guide: Instructions for installing and using Action Scheduler in your plugin.
    • WP CLI guide: Instructions for running Action Scheduler at scale via WP CLI.
    • API Reference: A complete reference guide for all API functions.
    • Administration Guide: How to manage scheduled actions via the WordPress administration screen.
    • Guide to Background Processing at Scale: Instructions for running Action Scheduler at scale using the default WP Cron queue runner.
  9. Resolve SSL/TLS 1.2 compatibility issues

    dev

    Stripe requires TLS 1.2. If your system defaults to older versions (common on older CentOS/RHEL), you will receive an invalid_request_error. You can force TLS 1.2 by passing the CURLOPT_SSLVERSION option to a custom CurlClient.

    $curl = new \Stripe\HttpClient\CurlClient([CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1]);
    \Stripe\ApiRequestor::setHttpClient($curl);