Browse the database of various action and filter hooks available in Paid Memberships Pro. Select an action or filter to view detailed information, examples, and related articles with code recipes.

Show Action and Filter Hooks in:

Action Hook: Use this action 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.

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 (more...)

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.

Filter Hook: Check payment confirmation or replace it based on the order object passed. If an array is returned, parse order data.

Filter Hook: Change the end date for the membership and/or subscription.

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

Filter Hook: Change and/or modify the user data that is created for the user after checkout. This is useful for changing the user login, password, email, and other user data.

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.

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

Action Hook: Action to run extra preheader code before setting checkout level.

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

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

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.

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

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

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.

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.

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

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

Filter Hook: Filter allows control of sending checkout emails

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.

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 (more...)

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

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.

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.