pmpro_format_phone

Change how phone numbers are formated. Param 1 is $r, the formatted phone number. Param 2 is $phone, the original phone number


apply_filters('pmpro_format_phone', $r, $phone);

pmpro_is_ready

Filter to determine if PMPro setup is complete or if notices or warnings need to be shown in the PMPro settings. Note: The filter should return true or false and also set the $pmpro_level_ready, $pmpro_gateway_ready,$pmpro_pages_ready global variables.


apply_filters('pmpro_is_ready', $r);

pmpro_format_price

Adjust the formatting of prices to support currency symbols after the price or to use commas instead of periods for separators


apply_filters('pmpro_format_price', $formatted, $price, $pmpro_currency, $pmpro_currency_symbol);

besecure

This filter changes the protocol used for URLs (https:// vs http://). If $besecure is set to true, the page will be loaded over HTTPS. For more information, read this blog post.


apply_filters( 'pmpro_besecure', bool $besecure );

pmpro_level_cost_text

Overrides how the cost is shown on the checkout page. The hook passes the text generated by the pmpro_getLevelCost($level) function and also a level object which is prepopulated with levels pricing and expiration settings already adjusted for any discount codes that may be in effect.


add_filter( 'pmpro_level_cost_text', string $r, object $level, bool $tags, bool $short

Be cautious not to abuse the filter by showing a different price than what will be charged. Note that if you change your level pricing you may also need to update your filter.

pmpro_level_expiration_text

Overrides how the expiration information is shown on the levels and checkout pages. Again don’t abuse this by showing a different expiration than is real. Be careful if you change your expiration settings to update your filter if needed. The hook passes the text generated by the pmpro_getLevelExpiration($level) function and also a level object which is prepopulated with levels pricing and expiration settings already adjusted for any discount codes that may be in affect.


apply_filters("pmpro_level_expiration_text", string $expiration_text, object $levels);

pmpro_has_membership_level

This filter can be used to override the output from the pmpro_hasMembershipLevel() function.  It passes the boolean true or false, user ID, and the array of required levels for that post passed to pmpro_hasMembershipLevel().


apply_filters("pmpro_has_membership_level", bool $return, int $user_id, array $levels);

pmpro_cancel_previous_subscriptions

This hook controls whether or not PMPro cancels a user’s previous membership level at checkout, which is enabled at default. This is dangerous, but is useful in certain cases like the PMPro Addon Packages plugin.


pmpro_check_discount_code_levels

This filter controls whether discount codes should only be applied to certain levels. By default, this is set to true, and discount codes are checked to see if they apply to the membership level passed. Return true if the code can be used with the level supplied or false if not.


apply_filters("pmpro_check_discount_code_levels", true, int $dbcode->id);

pmpro_field_classes

Use this to filter the CSS classes added to the fields on the checkout page. This is normally used to handle error highlighting with the “pmpro_error” class.
This returns the CSS classes and the current the current field name to be applied to.


apply_filters("pmpro_field_classes", string $classes, string $field);