Browse the database of various hooks and filters available in Paid Memberships Pro. Select a hook or filter to view detailed information, examples, blog posts, and code recipes.


Show Hooks and Filters in:


pmpro_after_checkout

Action Hook: Use this hook to execute custom code after a user checks out, before any emails are sent. This hook passes the WordPress user’s id number and the membership order number.


pmpro_before_send_to_paypal_standard

Action Hook: This is executed at checkout before calling the sendToPayPal method on the order. The register helper plugin has been updated to update user meta fields during this hook in addition to the pmpro_after_checkout hook. (Because for PayPal Standard, when pmpro_after_checkout is called, the $_SESSION vars are unavailable to it. So other plugins relying on the pmpro_after_checkout hook may have issues with PayPal Standard.)


pmpro_before_send_to_twocheckout

Action Hook: Execute code before sending the order to 2Checkout. This hook passes the user ID of the order’s customer and the MemberOrder object.


pmpro_checkout_level

Filter Hook: This hook allows you to modify the membership level object before checkout.


pmpro_checkout_oldemail

Filter Hook: This hook controls whether or not to allow registrations with email addresses which have already been used. By default, PMPro does not allow multiple registrations with one email address and shows an error if the email address has already been used.


pmpro_checkout_order

Filter Hook: Used by integrated payment gateways to filter the order.


pmpro_checkout_signon_secure

Filter Hook: Force PMPro to login over http or https in case other plugins (like WordPress MU Domain Mapping) conflict with what should be chosen here


pmpro_checkout_start_date

Filter Hook: This hook pmpro_checkout_start_date allows you to change the start date of a membership before checkout.


pmpro_confirmation_url

Filter Hook: This filter changes the URL to redirect to on confirmation. By default, this redirects to the PMPro Confirmation page with pmpro_url("confirmation", "?level=" . $pmpro_level->id). It also passes the user ID of the current user and the level object.


pmpro_discount_code_level

Filter Hook: This filter modifies the level  given by a discount code.  It passes the level object and the discount code ID.


pmpro_paypalexpress_session_vars

Action Hook: Saves extra variables to the session for use in certain cases with PayPal Express.


pmpro_profile_start_date

Filter Hook: Filters the start date of a membership sent to the payment gateway. Can be used to create variable-length trials. Passes the start date and order object.


pmpro_registration_checks

Filter Hook: Executes custom code which runs after the order has passed validation, before the registration is continued. Can be used to add custom validation.


pmpro_required_billing_fields

Filter Hook: Filters the required fields for the Billing Address section on the checkout page. Passes the array of field names.


pmpro_required_user_fields

Filter Hook: Filters the required fields for the Account Information section on the checkout page. Passes the array of field names.


pmpro_send_checkout_emails

Filter Hook: Filter allows control of sending checkout emails


pmpro_show_discount_code

Filter Hook: Controls whether or not to show the “Apply Discount Code” field at checkout. By default, this field is only shown when there is a discount code which applies to this level.


pmpro_skip_account_fields

Filter Hook: This filter is used to determine if the username/password account fields should show up at checkout. By default, it is shown when the user is logged out and not shown when logged in. The hook allows you to return true or false to override this behavior. If the fields are skipped while no user is logged in a username and password will be automatically generated for the new user after checkout.


pmpro_stripe_verify_address

Filter Hook: Controls whether to verify the Billing Address fields at checkout when using the Stripe payment gateway.


pmpro_valid_gateways

Filter Hook: Modifies the list of valid gateways used by PMPro. By default, it returns the gateway set in Memberships > Payment Settings in the WordPress Dashboard.


pmpro_wp_new_user_notification

Filter Hook: Controls whether to send the default WordPress new user notifications when a user is created at checkout. By default, this is set to false.