For developers who need to change how approvals work beyond the level settings, the Approval Process for Membership Add On includes filter and action hooks. Use them to change who counts as approved, adjust the Approvals screen, add data to the approval emails, or run your own code when a member is approved, denied, or reset.

Level and Approval Status Filters

pmpro_approvals_level_requires_approval

Filters whether a membership level requires admin approval. Return a truthy value to require approval for a level, or a falsy value to skip approval.

apply_filters( 'pmpro_approvals_level_requires_approval', int $requires_approval, int $level_id );

Parameters

  • $requires_approval: int; 1 if the level is set to require admin approval, 0 if not.
  • $level_id: int; The membership level ID.

pmpro_approvals_level_restrict_checkout

Filters the level a member must be approved for before they can check out for this level. Return 0 to remove the requirement, for example to let specific users skip the application level.

apply_filters( 'pmpro_approvals_level_restrict_checkout', int $restrict_checkout, int $level_id );

Parameters

  • $restrict_checkout: int; The ID of the level that must be approved first, or 0 if there is no requirement.
  • $level_id: int; The ID of the level being checked out for.

pmproap_user_is_approved

Filters whether a member is approved for a membership level. Because content access is based on this check, returning true gives the member access to the level’s content.

apply_filters( 'pmproap_user_is_approved', bool $is_approved, int $user_id, int $level_id, array $user_approval );

Parameters

  • $is_approved: bool; Whether the member is approved for the level.
  • $user_id: int; The user ID.
  • $level_id: int; The membership level ID.
  • $user_approval: array; The saved approval record for this member and level, with the keys status, timestamp, who (approver user ID), and approver (approver username). When no decision has been saved, it only contains status.

pmproap_user_is_denied

Filters whether a member is denied for a membership level.

apply_filters( 'pmproap_user_is_denied', bool $is_denied, int $user_id, int $level_id, array $user_approval );

Parameters

  • $is_denied: bool; Whether the member is denied for the level.
  • $user_id: int; The user ID.
  • $level_id: int; The membership level ID.
  • $user_approval: array; The saved approval record for this member and level, with the keys status, timestamp, who (approver user ID), and approver (approver username). When no decision has been saved, it only contains status.

pmproap_user_is_pending

Filters whether a member is pending approval for a membership level.

apply_filters( 'pmproap_user_is_pending', bool $is_pending, int $user_id, int $level_id, array $user_approval );

Parameters

  • $is_pending: bool; Whether the member is pending approval for the level.
  • $user_id: int; The user ID.
  • $level_id: int; The membership level ID.
  • $user_approval: array; The saved approval record for this member and level, with the keys status, timestamp, who (approver user ID), and approver (approver username). When no decision has been saved, it only contains status.

pmpro_approvals_status_filter

Filters the approval status text for a member and level. Short statuses are approved, denied, or pending. Long statuses read like “Approved on [date] by [name]” or “Pending Approval for [Level]”. This is the status shown on the confirmation page and the application screen.

apply_filters( 'pmpro_approvals_status_filter', string $status, int $user_id, int $level_id );

Parameters

  • $status: string; The approval status text.
  • $user_id: int; The user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_show_level_confirmation_message

Filters whether to add the level’s own confirmation message to the confirmation page for levels that require approval. Return true to show it below the approval status.

apply_filters( 'pmpro_approvals_show_level_confirmation_message', bool $show, int $membership_id );

Parameters

  • $show: bool; Whether to show the level confirmation message. Default false.
  • $membership_id: int; The membership level ID for this checkout.

pmpro_approvals_email_confirmation_status

Filters whether a member has confirmed their email address. Only runs when the Email Confirmation Add On is active.

apply_filters( 'pmpro_approvals_email_confirmation_status', bool $confirmed );

Parameters

  • $confirmed: bool; Whether the member’s email address is confirmed.

pmpro_approvals_pbc_success_on_approval

Filters whether approving a member also marks their pending Pay by Check order as paid. Return true to turn this on. It only runs when the Pay by Check Add On is active, and only changes the member’s most recent pending order for the level if that order was paid by check.

apply_filters( 'pmpro_approvals_pbc_success_on_approval', bool $mark_paid );

Parameters

  • $mark_paid: bool; Whether to change the member’s last pending check order for the level to success. Default false.

Approvals Screen Filters

pmpro_approvals_user_row_actions

Filters the action links shown when you hover over a member’s row on the Approvals screen.

apply_filters( 'pmpro_approvals_user_row_actions', array $actions, WP_User $user_data, object $approval_user );

Parameters

  • $actions: array; The row action links, keyed by action name (for example pmpro_approvals_view, pmpro_approvals_approve, pmpro_approvals_deny, pmpro_approvals_reset, editmember, edituser).
  • $user_data: WP_User; The user for this row.
  • $approval_user: object; The database row for this member, including membership_id and membership (the level name).

pmpro_approvals_pending_approvals_sql_parts

Filters the parts of the SQL query that builds the list of members on the Approvals screen.

apply_filters( 'pmpro_approvals_pending_approvals_sql_parts', array $sql_parts, int|false $l, string $s, string $status, string $sortby, string $sortorder, int $pn, int $limit );

Parameters

  • $sql_parts: array; The query parts, with the keys SELECT, JOIN, WHERE, GROUP, ORDER, and LIMIT.
  • $l: int|false; The level ID being filtered by, or false for all levels that require approval.
  • $s: string; The search string.
  • $status: string; The approval status being filtered by: all, pending, approved, or denied.
  • $sortby: string; The column to sort by.
  • $sortorder: string; ASC or DESC.
  • $pn: int; The page number.
  • $limit: int; The number of results per page.

pmpro_approvals_pending_approvals_sql

Filters the full SQL query that builds the list of members on the Approvals screen.

apply_filters( 'pmpro_approvals_pending_approvals_sql', string $sqlQuery, int|false $l, string $s, string $status, string $sortby, string $sortorder, int $pn, int $limit );

Parameters

  • $sqlQuery: string; The full SQL query.
  • $l: int|false; The level ID being filtered by, or false for all levels that require approval.
  • $s: string; The search string.
  • $status: string; The approval status being filtered by: all, pending, approved, or denied.
  • $sortby: string; The column to sort by.
  • $sortorder: string; ASC or DESC.
  • $pn: int; The page number.
  • $limit: int; The number of results per page.

pmpro_approvals_approval_count_sql_parts

Filters the parts of the SQL query that counts members by approval status. This count is used for the pending badge in the admin menu and the item count on the Approvals screen.

apply_filters( 'pmpro_approvals_approval_count_sql_parts', array $sql_parts, string $approval_status, int|false $l, string $s );

Parameters

  • $sql_parts: array; The query parts, with the keys SELECT, JOIN, WHERE, GROUP, ORDER, and LIMIT.
  • $approval_status: string; The status being counted: pending, approved, denied, or all.
  • $l: int|false; The level ID being counted, or false for all levels that require approval.
  • $s: string; The search string.

pmpro_approvals_approval_count_sql

Filters the full SQL query that counts members by approval status.

apply_filters( 'pmpro_approvals_approval_count_sql', string $sqlQuery, string $approval_status, int|false $l, string $s );

Parameters

  • $sqlQuery: string; The full SQL query.
  • $approval_status: string; The status being counted: pending, approved, denied, or all.
  • $l: int|false; The level ID being counted, or false for all levels that require approval.
  • $s: string; The search string.

Email Filters

pmpro_approvals_after_approve_member_send_emails

Filters whether to send the Approval Approved emails to the member and admin when a member is approved. Return false to skip both emails.

apply_filters( 'pmpro_approvals_after_approve_member_send_emails', bool $send_emails, int $user_id, int $level_id, bool $force );

Parameters

  • $send_emails: bool; Whether to send the emails. Default true.
  • $user_id: int; The ID of the approved member.
  • $level_id: int; The approved level ID.
  • $force: bool; Whether the approval was forced in code, bypassing the permission check.

pmpro_approvals_member_approved_email_data

Filters the template variables for the Approval Approved email sent to the member. Add a key to this array to make a new variable available in that email.

apply_filters( 'pmpro_approvals_member_approved_email_data', array $data, WP_User $member, object $level );

Parameters

  • $data: array; The email template variables, keyed by variable name.
  • $member: WP_User; The member the email is about.
  • $level: object; The member’s membership level object for the level in this email.

pmpro_approvals_member_denied_email_data

Filters the template variables for the Approval Denied email sent to the member.

apply_filters( 'pmpro_approvals_member_denied_email_data', array $data, WP_User $member, object $level );

Parameters

  • $data: array; The email template variables, keyed by variable name.
  • $member: WP_User; The member the email is about.
  • $level: object; The member’s membership level object for the level in this email.

pmpro_approvals_admin_pending_email_data

Filters the template variables for the Approval Pending (admin) email.

apply_filters( 'pmpro_approvals_admin_pending_email_data', array $data, WP_User $member, WP_User|false $admin );

Parameters

  • $data: array; The email template variables, keyed by variable name.
  • $member: WP_User; The member the email is about.
  • $admin: WP_User|false; The WordPress user who owns the Administration Email Address, or false if that address doesn’t belong to a user. On Paid Memberships Pro versions before 3.4, this is a placeholder object when no user is found.

pmpro_approvals_admin_approved_email_data

Filters the template variables for the Approval Approved (admin) email.

apply_filters( 'pmpro_approvals_admin_approved_email_data', array $data, WP_User $member, WP_User|false $admin );

Parameters

  • $data: array; The email template variables, keyed by variable name.
  • $member: WP_User; The member the email is about.
  • $admin: WP_User|false; The WordPress user who owns the Administration Email Address, or false if that address doesn’t belong to a user. On Paid Memberships Pro versions before 3.4, this is a placeholder object when no user is found.

pmpro_approvals_admin_denied_email_data

Filters the template variables for the Approval Denied (admin) email.

apply_filters( 'pmpro_approvals_admin_denied_email_data', array $data, WP_User $member, WP_User|false $admin );

Parameters

  • $data: array; The email template variables, keyed by variable name.
  • $member: WP_User; The member the email is about.
  • $admin: WP_User|false; The WordPress user who owns the Administration Email Address, or false if that address doesn’t belong to a user. On Paid Memberships Pro versions before 3.4, this is a placeholder object when no user is found.

Actions

pmpro_approvals_before_approve_member

Fires before a member is approved for a level, before the approval is saved.

do_action( 'pmpro_approvals_before_approve_member', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_after_approve_member

Fires after a member is approved for a level, after the approval is saved and the emails are sent. Use this to run your own code on approval, such as adding the member to a list or granting a role.

do_action( 'pmpro_approvals_after_approve_member', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_before_deny_member

Fires before a member is denied for a level, before the denial is saved.

do_action( 'pmpro_approvals_before_deny_member', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_after_deny_member

Fires after a member is denied for a level, after the denial is saved and the emails are sent. Use this to run your own code on denial, such as cancelling the member’s level.

do_action( 'pmpro_approvals_after_deny_member', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_before_reset_member

Fires before a member’s approval is reset to pending.

do_action( 'pmpro_approvals_before_reset_member', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_after_reset_member

Fires after a member’s approval is reset to pending.

do_action( 'pmpro_approvals_after_reset_member', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_before_cleaned_approval_meta

Fires before a member’s pending approval record for a level is cleared, which happens when a pending member loses that level.

do_action( 'pmpro_approvals_before_cleaned_approval_meta', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_after_cleaned_approval_meta

Fires after a member’s pending approval record for a level is cleared.

do_action( 'pmpro_approvals_after_cleaned_approval_meta', int $user_id, int $level_id );

Parameters

  • $user_id: int; The member’s user ID.
  • $level_id: int; The membership level ID.

pmpro_approvals_list_extra_cols_header

Fires in the header row of the Approvals screen table, after the Email column. Echo one or more <th> cells to add columns. Pair it with pmpro_approvals_list_extra_cols_body.

do_action( 'pmpro_approvals_list_extra_cols_header', array $approval_users );

Parameters

  • $approval_users: array; The member rows shown on the current page of the Approvals screen.

pmpro_approvals_list_extra_cols_body

Fires in each member row of the Approvals screen table, after the Email cell. Echo one <td> cell for each header cell you added.

do_action( 'pmpro_approvals_list_extra_cols_body', WP_User $user_data );

Parameters

  • $user_data: WP_User; The user for this row.

Last updated on November 9, 2026


Was this article helpful?
YesNo