Helpful Developer Hooks

Drip Rule Hooks

  • This Filter provides access to modify array of drip rule types before display in add/edit drip rule screen in admin side.

  • Usage:
    add_filter( 'arm_drip_rule_types', 'your_function');
    function your_function($rule_types) {
        //$rule_types Drip Rule Types
        $rule_types['custom_type'] = 'Custom Type';
        return $rule_types;
    }
    
    Parameters:
    $rule_types
    Drip Rule Types
    Copied Copy
  • Display drip rule type text in admin side drip rule grid.

  • Usage:
    add_filter( 'arm_change_drip_content_in_admin', 'your_function', 10, 2);
    function your_function($rule_text, $drip_rule) {
        //$rule_text Drip Rule text
        //$drip_rule Drip Rule array
        if ($drip_rule['rule_type'] == 'custom_type') {
            $rule_text = 'Custom Type';
        }
        return $rule_text;
    }
    
    Parameters:
    $rule_text
    Drip Rule text
    $drip_rule
    Drip Rule array
    Copied Copy
  • This filter Checks if post, page or custom content is dripped or not according to rule options set form them.

  • Usage:
    add_filter( 'arm_is_dripped', 'your_function', 10, 3);
    function your_function($isDripped, $rule_type, $rule_options) {
        //$isDripped True if post/page is dripped, False if not dripped.
        //$rule_type Drip Rule Type.
        //$rule_options Drip Rule Options.
        if ($rule_type == 'custom_type') {
            $isDripped = false;
        }
        return $isDripped;
    }
    
    Parameters:
    $isDripped
    True if post/page is dripped, False if not dripped
    $rule_type
    Drip Rule Type
    $rule_options
    Drip Rule Options
    Copied Copy

Email Notification Hooks

  • This Filter provides access to modify email message/content before sending email to user.

  • Usage:
    add_filter( 'arm_change_email_content', 'your_function');
    function your_function($message) {
        //$message Email Content
        $message .= ' If you have any query, please contact site administrator.';
        return $message;
    }
    
    Parameters:
    $message
    Email Content
    Copied Copy
  • This Filter provides access to modify email message before new user registration email will get sent to admin.

  • Usage:
    add_filter( 'arm_change_registration_email_notification_to_admin', 'your_function');
    function your_function($message) {
        //$message Email Content
        $message .= ' If you have any query, please contact site administrator.';
        return $message;
    }
    
    Parameters:
    $message
    Email Content
    Copied Copy
  • This Filter will provide you access to modify email message before the event occur of sending message to user at time of new registration.

  • Usage:
    add_filter( 'arm_change_registration_email_notification_to_user', 'your_function');
    function your_function($message) {
        //$message Email Content
        $message .= ' If you have any query, please contact site administrator.';
        return $message;
    }
    
    Parameters:
    $message
    Email Content
    Copied Copy
  • This Filter provides access to modify an email content before new user registration notification will be sent to user.

  • Usage:
    add_filter( 'arm_change_verification_email_notification', 'your_function');
    function your_function($message) {
        //$message Email Content
        $message .= ' If you have any query, please contact site administrator.';
        return $message;
    }
    
    Parameters:
    $message
    Email Content
    Copied Copy
  • This Filter provides you access to modify automated email messages content before sending an email to user.

  • Usage:
    add_filter( 'arm_change_advanced_email_communication_email_notification', 'your_function', 10, 3);
    function your_function($content, $user_id, $user_plan) {
        //$content Email Content
        //$user_plan Plan id
        //$user_id User id
        $content = str_replace('{SOME_VARS}', "Some Value", $content);
        return $content;
    }
    
    Parameters:
    $content
    Email Content
    $user_plan
    User Plan id
    $user_id
    User id
    Copied Copy
  • This action will be executed just before any email notification will be sent.

  • Usage:
    add_action( 'arm_before_send_email_notification', 'your_function', 10, 5 );
    function your_function($from, $recipient, $subject, $message, $attachments) {
        //Do your action.
    }
    
    Parameters:
    $from
    From Email ID
    $recipient
    Recipient Email ID
    $subject
    Email Subject
    $message
    Email Message
    $attachments
    Email Attachment
    Copied Copy
  • This action will be executed just after any email notification will get sent.

  • Usage:
    add_action( 'arm_after_send_email_notification', 'your_function', 10, 5 );
    function your_function($from, $recipient, $subject, $message, $attachments) {
        //Do your action.
    }
    
    Parameters:
    $from
    From Email ID
    $recipient
    Recipient Email ID
    $subject
    Email Subject
    $message
    Email Message
    $attachments
    Email Attachment
    Copied Copy

Social Login Hooks

  • This Filter provides access to modify social settings array generated by the arm_get_social_settings() function.

  • Usage:
    add_filter( 'arm_get_social_settings', 'your_function');
    function your_function($social_settings) {
        //$social_settings Social Settings.
        return $social_settings;
    }
    
    Parameters:
    $social_settings
    Social Settings
    Copied Copy
  • This Filter provides you access to modify array of active social network options.

  • Usage:
    add_filter( 'arm_get_active_social_options', 'your_function');
    function your_function($active_opts) {
        //$active_opts Active Social Network Options.
        return $active_opts;
    }
    
    Parameters:
    $active_opts
    Active Social Network Options
    Copied Copy
  • This filter allows to add custom content before social login shortcode content buttons will display.

  • Usage:
    add_filter( 'arm_before_social_login_shortcode_content', 'your_function', 10, 2);
    function your_function($content, $args) {
        //$content Active Social Network Options.
        $content = 'Some Content ' . $content;
        return $content;
    }
    
    Parameters:
    $content
    Active Social Network Options
    $args
    Shortcode arguments
    Copied Copy
  • This filter allows you tom add custom content after social buttons will be displayed in front side.

  • Usage:
    add_filter( 'arm_after_social_login_shortcode_content', 'your_function', 10, 2);
    function your_function($content, $args) {
        //$content Active Social Network Options.
        $content = $content . ' Some Content';
        return $content;
    }
    
    Parameters:
    $content
    Active Social Network Options
    $args
    Short code arguments
    Copied Copy
  • This action will be executed when value of social settings will get updated.

  • Usage:
    add_action( 'arm_update_social_settings', 'your_function', 10, 2);
    function your_function($post_data = array(), $files = array()) {
        //Do Your Action.
        //$post_data Updated Social Settings Array.
        //$files Uploaded files array
    }
    
    Parameters:
    $post_data
    Updated Social Settings Array
    $files
    Uploaded files array
    Copied Copy

Opt-ins Hooks

  • This filter provides access to modify array of email marketing tools' settings prior to saving it.

  • Usage:
    add_filter( 'arm_change_optin_settings_before_save', 'your_function');
    function your_function($email_tools) {
        //$email_tools Email Tools Settings.
        $email_tools['some_tool'] = array();
        return $email_tools;
    }
    
    Parameters:
    $email_tools
    Email Tools Settings
    Copied Copy
  • This Filter provides access to modify an email marketing tools detail array, generated by the arm_get_email_tools() function.

  • Usage:
    add_filter( 'arm_get_optin_settings', 'your_function', 10, 2);
    function your_function($email_tools, $email_settings) {
        //$email_tools Email Tools Settings.
        //$email_settings All Email Settings.
        $email_tools['some_tool'] = array();
        return $email_tools;
    }
    
    Parameters:
    $email_tools
    Email Tools Settings
    $email_settings
    All Email Settings
    Copied Copy
  • This Filter will be useful to add custom email marketing tool options settings.

  • Usage:
    add_filter( 'arm_add_new_optin_settings', 'your_function', 10, 2);
    function your_function($content, $email_settings) {
        //$content Email Tool Options HTML.
        //$emailTools Email Tool Settings.
        $content = "Add Your Options HTML Here.";
    	return $content;
    }
    
    Parameters:
    $content
    Email Tool Options HTML
    $emailTools
    Email Tool Settings
    Copied Copy

Plugin Core Hooks

  • This hook is useful to display custom notices in ARMember plugin admin pages.

  • Usage:
    add_filter( 'arm_display_admin_notices', 'your_function');
    function your_function($notices = array()) {
        //$notices Array of success & error messages
        $notices[] = array('type' => 'error', 'message' => 'Your Message');
        return $notices;
    }
    
    Parameters:
    $notices
    Array of success & error messages
    Copied Copy
  • Plugin init action fires after WordPress init action. arm_init is useful for intercepting $_GET or $_POST triggers.

  • Usage:
    add_action( 'arm_init', 'your_function' );
    function your_function($obj) {
        // Do Your Action.
    }
    
    Parameters:
    $obj
    ARMember Main class object
    Copied Copy
  • This action hook is useful to display custom error, warning or success message on top of plugin pages in admin side.

  • Usage:
    add_action( 'arm_admin_messages', 'your_function' );
    function your_function($requested_page) {
        // Do Your Action.
        // print_r($requested_page); // Print current page slug.
    }
    
    Parameters:
    $requested_page
    current page slug
    Copied Copy
  • This action will be executed when the ARMember plugin is activated for the first time.

  • Usage:
    add_action( 'arm_after_install', 'your_function_after_install' );
    function your_function_after_install() {
        // Do Your Action.
    }
    
    Copied Copy
  • This action will be executed when plugin will get uninstalled.

  • Usage:
    add_action( 'arm_after_uninstall', 'your_function_after_uninstall' );
    function your_function_after_uninstall() {
        // Do Your Action.
    }
    
    Copied Copy
  • This action will be helpful to add custom add-on in the ARMember Add-on Page

  • Usage:
    add_action('arm_add_new_custom_add_on', 'your_function');
    function your_function() {
    //your custom functionality
    }
    
    Copied Copy
  • This action is useful to add custom messages while add on get activated from ARMember add-on page.

  • Usage:
    add_action('arm_update_feature_settings', 'your_function', 10, 1);
    function your_function($posted_data = array()){
    //your custom functionality
        return $posted_data;
    }
    
    Parameters:
    $posted_data
    Copied Copy

Content Restriction Hooks

  • This filter provides access to modify an array of restricted URL addresses before login process.

  • Usage:
    add_filter( 'arm_restricted_urls', 'your_function');
    function your_function($block_urls) {
        //$block_urls Array of blocked URLs.
        $block_urls[] = 'http://example.com';
        return $block_urls;
    }
    
    Parameters:
    $block_urls
    Array of blocked URLs
    Copied Copy
  • This filter provides access to modify/change redirection URL which is commonly set for restricted URLs.

  • Usage:
    add_filter( 'arm_restricted_url_redirect_url', 'your_function', 10, 2);
    function your_function($redirect_url, $wp) {
        //$redirect_url Redirection URL.
        //$wp Global WordPress Object
        $redirect_url = 'http://example.com';
        return $redirect_url;
    }
    
    Parameters:
    $redirect_url
    Redirection URL
    $wp
    Global WordPress Object
    Copied Copy
  • This Filter provides access to modify an array of page_id of pages which are only allowed to access when all other content of a site is restricted.

  • Usage:
    add_filter( 'arm_restricted_site_access_allow_pages', 'your_function');
    function your_function($page_ids) {
        //$page_ids Array of allowed page ids.
        $page_ids[] = 31;
        return $page_ids;
    }
    
    Parameters:
    $page_ids
    Array of allowed page ids
    Copied Copy
  • This Filter is useful to check whether the user has right to access site or not. This filter function argument and return value is true/false if the current user can/cannot access the site.

  • Usage:
    add_filter( 'arm_is_allow_access', 'your_function', 10, 2);
    function your_function($allowed = true, $extraVars = array()) {
        //$allowed True if allowed access, False if not allowed.
        //$extraVars Array of User information like User ID & Plan ID
        if ($extraVars['current_user_id'] == 42) {
            $allowed = true;
        }
        return $allowed;
    }
    
    Parameters:
    $allowed
    True if allowed access, False if not allowed
    $extraVars
    Array of User information like User ID & Plan ID
    Copied Copy
  • This Filter can be used to override special pages access rules.

  • Usage:
    add_filter( 'arm_special_page_access', 'your_function', 10, 3);
    function your_function($allowed = true, $current_page_type, $sp_rules) {
        //$allowed True if allowed access, False if not allowed.
        //$current_page_type Array of current page type
        //$sp_rules Special Pages Rules Array
        if (in_array('home', $current_page_type)) {
            $allowed = true;
        }
        return $allowed;
    }
    
    Parameters:
    $allowed
    True if allowed access, False if not allowed
    $current_page_type
    Array of current page type
    $sp_rules
    Special Pages Rules Array
    Copied Copy
  • This Filter allows to customize content of the post which is being displayed with notification when RSS feeds are restricted.

  • Usage:
    add_filter( 'arm_restricted_feed_content_posts', 'your_function');
    function your_function($posts) {
        //$posts Posts Object. Display post content when feed is restricted.
        return $posts;
    }
    
    Parameters:
    $posts
    Posts Object. Display post content when feed is restricted.
    Copied Copy
  • This filter provides access to modify the array of all records displayed in grid column of access rule page grid - admin side.

  • Usage:
    add_filter( 'arm_prepare_rule_data', 'your_function', 10, 2);
    function your_function($rule_records, $args) {
        //$rule_records Array of access rule items.
        //$args Array of filter arguments for grid listing
        return $rule_records;
    }
    
    Parameters:
    $rule_records
    Array of access rule items
    $args
    Array of filter arguments for grid listing
    Copied Copy
  • This Filter can be used to add custom access rule type in admin side access rule grid only but not add rules for this custom type. So use this filter with other filters like arm_prepare_custom_rule_data, arm_before_update_custom_access_rules to add rules for newly added custom type for access rules...

  • Usage:
    add_filter( 'arm_custom_rule_types', 'your_function');
    function your_function($rule_types = array()) {
        //$rule_types Custom Access Rule Types.
        $rule_types['custom_rule'] = 'Custom Rules';
        return $rule_types;
    }
    
    Parameters:
    $rule_types
    Custom Access Rule Types
    Copied Copy
  • This Filter can be used to prepare array of custom access rule records to display in admin side access rule grid.

  • Usage:
    add_filter( 'arm_prepare_custom_rule_data', 'your_function', 10, 2);
    function your_function($rule_records, $args) {
        //$rule_records Array of access rule items.
        //$args Array of filter arguments for grid listing
        global $arm_access_rules;
        if ($args['slug'] == 'custom_rule') {
            $dbrules = $arm_access_rules->arm_get_custom_access_rules('custom_rule');
            $protection = (!empty($dbrules['custom_item']['protection'])) ? $dbrules['custom_item']['protection'] : '0';
            $plans = (!empty($dbrules['custom_item']['plans'])) ? $dbrules['custom_item']['plans'] : array();
            $rule_records['custom_item'] = array(
               'id' => 'custom_item',
                'title' => 'Custom Item',
                'description' => 'This is Custom Item',
                'protection' => $protection,
                'plans' => $plans,
            );
        }
        return $rule_records;
    }
    
    Parameters:
    $rule_records
    Array of access rule items
    $args
    Array of filter arguments for grid listing
    Copied Copy
  • This Filter applied to custom access rule array, prior to saving to the database.

  • Usage:
    add_filter( 'arm_before_update_custom_access_rules', 'your_function', 10, 3);
    function your_function($custom_rules = array(), $type_slug, $arm_rules) {
        //$custom_rules Array of old custom rules.
        //$type_slug Access Rule Type.
        //$arm_rules New Access Rules.
        if ($type_slug == 'custom_rule') {
            foreach ($arm_rules as $item_id => $item_rule) {
                $item_rule = (array) $item_rule;
                if (empty($item_rule['protection']) || $item_rule['protection'] == '0') {
                    unset($item_rule['plans']);
                } else {
                    $item_rule['plans'] = (array) $item_rule['plans'];
                    $item_rule['plans'] = array_keys($item_rule['plans']);
                }
                $custom_rules['custom_rule'][$item_id] = $item_rule;
    	}
        }
        return $custom_rules;
    }
    
    Parameters:
    $custom_rules
    Array of old custom rules
    $type_slug
    Access Rule Type
    $arm_rules
    New Access Rules
    Copied Copy
  • This Filter is applied to check current user is accessible for restricted content shortcode or not .

  • Usage:
    add_filter( 'arm_restrict_content_shortcode_hasaccess', 'your_function', 10, 2);
    function your_function($hasaccess, $args) {
        //$hasaccess Array of access rule items.
        //$args Shortcode Arguments.
        return $hasaccess;
    }
    
    Parameters:
    $hasaccess
    Array of access rule items
    $args
    Shortcode Arguments
    Copied Copy
  • This action hook will be executed when site access restricted for non logged in users.

  • Usage:
    add_action( 'arm_restrict_site_access_handling', 'your_function');
    function your_function($wp) {
        //Do Your Action.
        //$wp WordPress Object from 'parse_request' hook.
    }
    
    Parameters:
    $wp
    WordPress Object from 'parse_request' hook
    Copied Copy
  • This action will be executed before redirection process will occur for restricted content of a site.

  • Usage:
    add_action( 'arm_restrict_site_access_handling', 'your_function', 10, 2);
    function your_function($redirect_url, $wp) {
        //Do Your Action.
        //$redirect_url Redirection URL.
        //$wp WordPress Object from 'parse_request' hook.
    }
    
    Parameters:
    $redirect_url
    Redirection URL
    $wp
    WordPress Object from 'parse_request' hook
    Copied Copy

Membership Setup Hooks

  • This filter allows to modify setup details before membership setup shortcode content will be displayed in front side.

  • Usage:
    add_filter( 'arm_setup_data_before_setup_shortcode', 'your_function', 10, 2);
    function your_function($setup_data, $atts) {
        //$setup_data Array of Membership Setup Detail.
        //$atts Shortcode Arguments.
        $setup_data['setup_name'] = 'My Form';
        return $setup_data;
    }
    
    Parameters:
    $setup_data
    Array of Membership Setup Detail
    $atts
    Shortcode Attributes
    Copied Copy
  • This action will be executed before membership setup shortcode will be displayed in front side.

  • Usage:
    add_action( 'arm_before_render_membership_setup_form', 'your_function', 10, 2 );
    function your_function($setup_data, $atts) {
        //Do Your Action
        //$setup_data Array of Membership Setup Detail.
        //$atts Shortcode Attributes
        echo "Setup Form Starts From Here";
    }
    
    Parameters:
    $setup_data
    Array of Membership Setup Detail
    $atts
    Shortcode Attributes
    Copied Copy
  • This action will be executed before membership setup form get submitted.

  • Usage:
    add_action( 'arm_before_setup_form_action', 'your_function', 10, 2);
    function your_function($setup_id, $post_data) {
        //Do Your Action.
        //$setup_id Membership setup id.
        //$post_data Posted membership setup form data.
    }
    
    Parameters:
    $setup_id
    Membership setup id
    $post_data
    Posted membership setup form data
    Copied Copy
  • This filter provides access to add/modify membership setup shortcode content before setup form will be displayed in front side.

  • Usage:
    add_filter( 'arm_before_setup_form_content', 'your_function', 10, 3);
    function your_function($content, $setupID, $setup_data) {
        //$content Membership Setup Shortcode Content.
        //$setupID Setup ID.
        //$setup_data Membership Setup Details.
        return $content;
    }
    
    Parameters:
    $content
    Membership Setup Shortcode Content
    $setupID
    Setup ID
    $setup_data
    Membership Setup Details
    Copied Copy
  • Apply filter to membership setup shortcode content before redeem coupon code section.

  • Usage:
    add_filter( 'arm_before_redeem_coupon_section', 'your_function');
    function your_function($content) {
        //$content Redeem Coupon HTML Content.
        return $content;
    }
    
    Parameters:
    $content
    Redeem Coupon HTML Content
    Copied Copy
  • This Filter allows to add/modify custom content after the membership setup shortcode content will be displayed in front side.

  • Usage:
    add_filter( 'arm_after_setup_form_content', 'your_function', 10, 3);
    function your_function($content, $setupID, $setup_data) {
        //$content Membership Setup Shortcode Content.
        //$setupID Setup ID.
        //$setup_data Membership Setup Details.
        return $content;
    }
    
    Parameters:
    $content
    Membership Setup Shortcode Content
    $setupID
    Setup ID
    $setup_data
    Membership Setup Details. return $content
    Copied Copy
  • Apply filter to add content after membership setup shortcode content.

  • Usage:
    add_filter( 'arm_after_setup_plan_section', 'your_function', 10, 3);
    function your_function($module_content, $setupID, $setup_data) {
        //$module_content Membership Setup Shortcode Module Content.
        //$setupID $setupID.
        //$setup_data Membership Setup Details.
        return $module_content;
    }
    
    Parameters:
    $module_content
    Membership Setup Shortcode Module Content
    $setupID
    Setup ID
    $setup_data
    Membership Setup Details
    Copied Copy
  • Apply this filter to membership setup shortcode content after registration form section.

  • Usage:
    add_filter( 'arm_after_setup_reg_form_section', 'your_function', 10, 3);
    function your_function($module_content, $setupID, $setup_data) {
        //$module_content Membership Setup Shortcode Module Content.
        //$setupID Setup ID.
        //$setup_data Membership Setup Details.
        return $module_content;
    }
    
    Parameters:
    $module_content
    Membership Setup Shortcode Module Content
    $setupID
    Setup ID
    $setup_data
    Membership Setup Details
    Copied Copy
  • Apply this Filter to display custom payment gateway options in membership setup shortcode.

  • Usage:
    add_filter( 'arm_membership_setup_gateway_option', 'your_function', 10, 3);
    function your_function($gateway_fields, $gateway_key, $gateway_options) {
        //$gateway_fields Payment Gateway fields html.
        //$gateway_key Payment Gateway Key.
        //$gateway_options Payment Gateway Settings Array.
        if($gateway_key == 'custom_gateway') {
            $gateway_fields = "Your Gateway Fields Html.";
        }
        return $gateway_fields;
    }
    
    Parameters:
    $gateway_fields
    Payment Gateway fields html
    $gateway_key
    Payment Gateway Key
    $gateway_options
    Payment Gateway Settings Array
    Copied Copy
  • Apply filter to membership setup shortcode content after payment gateway section.

  • Usage:
    add_filter( 'arm_after_setup_gateway_section', 'your_function', 10, 3);
    function your_function($module_content, $setupID, $setup_data) {
        //$module_content Membership Setup Shortcode Module Content.
        //$setupID Setup ID.
        //$setup_data Membership Setup Details.
        return $module_content;
    }
    
    Parameters:
    $module_content
    Membership Setup Shortcode Module Content
    $setupID
    Setup ID
    $setup_data
    Membership Setup Details
    Copied Copy
  • This action will occur after membership setup wizard details will get saved.

  • Usage:
    add_action( 'arm_saved_membership_setup', 'your_function', 10, 2);
    function your_function($setup_id, $setup_data) {
        //Do Your Action.
        //$setup_id Added/Updated membership setup id.
        //$setup_data Added/Updated membership setup details.
    }
    
    Parameters:
    $setup_id
    Added/Updated membership setup id
    $setup_data
    Added/Updated membership setup details
    Copied Copy
  • This action will be executed after membership setup form will get submitted.

  • Usage:
    add_action( 'arm_after_setup_form_action', 'your_function', 10, 2);
    function your_function($setup_id, $post_data) {
        //Do Your Action.
        //$setup_id Membership setup id.
        //$post_data Posted membership setup form data.
    }
    
    Parameters:
    $setup_id
    Membership setup id
    $post_data
    Posted membership setup form data
    Copied Copy
  • This action is helpful for add/update membership setup details.

  • Usage:
    add_action( 'arm_save_membership_setups', 'your_function');
    function your_function($posted_data = array()) {
        //Do Your Action.
        //$posted_data Posted membership setup details.
    }
    
    Parameters:
    $posted_data
    Posted membership setup details
    Copied Copy
  • This action will take place after validation of membership setup form.

  • Usage:
    add_action( 'arm_after_setup_form_validate_action', 'your_function', 10, 2);
    function your_function($setup_id, $post_data) {
        //Do Your Action.
        //$setup_id Membership setup id.
        //$post_data Posted membership setup form data.
    }
    
    Parameters:
    $setup_id
    Membership setup id
    $post_data
    Posted membership setup form data
    Copied Copy
  • Apply filter to membership setup shortcode content after order detail section in front end.

  • Usage:
    add_filter( 'arm_after_setup_order_detail', 'your_function', 10, 3);
    function your_function($module_content, $setupID, $setup_data) {
        //$module_content Membership Setup Shortcode Module Content.
        //$setupID Setup ID.
        //$setup_data Membership Setup Details.
        return $module_content;
    }
    
    Parameters:
    $module_content
    Membership Setup Shortcode Module Content
    $setupID
    Setup ID
    $setup_data
    Membership Setup Details
    Copied Copy
  • Apply this filter to membership setup shortcode content after redeem coupon code section.

  • Usage:
    add_filter( 'arm_after_redeem_coupon_section', 'your_function');
    function your_function($content) {
        //$content Redeem Coupon HTML Content.
        return $content;
    }
    
    Parameters:
    $content
    Redeem Coupon HTML Content
    Copied Copy

General Setting Hooks

  • This filter hook is useful to update or change global options before saving it.

  • Usage:
    add_filter( 'arm_before_update_global_settings', 'your_function', 10, 2);
    function your_function($new_global_settings = array(), $posted_data) {
        //$new_global_settings New Global Settings
        //$posted_data Posted general setting form data
        return $new_global_settings;
    }
    
    Parameters:
    $new_global_settings
    Array - New Global Settings
    $posted_data
    Posted general setting form data
    Copied Copy
  • This filter provides access to modify page settings before saving it.

  • Usage:
    add_filter( 'arm_before_update_page_settings', 'your_function', 10, 2);
    function your_function($new_global_settings = array(), $posted_data) {
        //$new_global_settings New Global Settings
        //$posted_data Posted page setting form data
        return $new_global_settings;
    }
    
    Parameters:
    $new_global_settings
    Array - New Global Settings
    $posted_data
    Posted page setting form data
    Copied Copy
  • This filter hook can be used to update or change security settings prior to saving it.

  • Usage:
    add_filter( 'arm_before_update_block_settings', 'your_function', 10, 2);
    function your_function($post_block_settings = array(), $posted_data) {
        //$post_block_settings New security settings
        //$posted_data Posted security setting form data
        return $post_block_settings;
    }
    
    Parameters:
    $post_block_settings
    Array - New security settings
    $posted_data
    Posted security setting form data
    Copied Copy
  • This filter hook can be used to update or change common messages prior to saving it.

  • Usage:
    add_filter( 'arm_before_update_common_message_settings', 'your_function', 10, 2);
    function your_function($common_message = array(), $posted_data) {
        //$common_message New common messages
        //$posted_data Posted common messages form data
        return $common_message;
    }
    
    Parameters:
    $common_message
    New common messages
    $posted_data
    common messages form data
    Copied Copy
  • This Filter provides access to modify global settings array generated by the arm_get_all_global_settings() function.

  • Usage:
    add_filter( 'arm_get_all_global_settings', 'your_function');
    function your_function($global_settings = array()) {
        //$global_settings All Global Settings
        $global_settings['general_settings']['some_option'] = "Option Value";
        return $global_settings;
    }
    
    Parameters:
    $global_settings
    Array -All Global Settings
    Copied Copy
  • This filter provides access to modify block settings array generated by the arm_get_all_block_settings() function.

  • Usage:
    add_filter( 'arm_get_all_block_settings', 'your_function');
    function your_function($all_block_settings = array()) {
        //$all_block_settings All Security Settings.
        $all_block_settings['some_option'] = "Option Value";
        return $all_block_settings;
    }
    
    Parameters:
    $all_block_settings
    Array - All Security Settings
    Copied Copy
  • This Filter provides access to modify a common messages array generated by the arm_get_all_common_message_settings() function. Which is basically an array of all common messages set in admin side.

  • Usage:
    add_filter( 'arm_get_all_common_message_settings', 'your_function');
    function your_function($common_messages = array()) {
        //$common_messages Array of common messages.
        $common_messages['some_option'] = "Some Message";
        return $common_messages;
    }
    
    Parameters:
    $common_messages
    Array - Array of common messages
    Copied Copy
  • This filter can be used to set custom user avatar(profile) image just prior to display.

  • Usage:
    add_filter( 'arm_change_user_avatar', 'your_function', 10, 5);
    function your_function($avatar, $id_or_email, $size, $default, $alt) {
        //Filter user avatar.
        if ($id_or_email == '26') {
            //pass your custom image url in src.
            $avatar = ''.$alt.'';
        }
        return $avatar;
    }
    
    Parameters:
    $avatar
    Whole img tag to be returned
    $id_or_email
    user id or email address
    $size
    Image height and width
    $default
    Default Avtar image tag
    $alt
    Image alt value
    Copied Copy
  • This filter provides access to modify an array of blocked IP addresses before login process.

  • Usage:
    add_filter( 'arm_restrict_user_before_login', 'your_function');
    function your_function($blocked_ips) {
        //$blocked_ips Blocked IP Addresses.
        $blocked_ips[] = '255.255.255.1';
        return $blocked_ips;
    }
    
    Parameters:
    $blocked_ips
    Array - Blocked IP Addresses
    Copied Copy
  • This filter provides access to modify body of the Email message, using user details before sending an email.

  • Usage:
    add_filter( 'arm_change_email_content_with_user_detail', 'your_function', 10, 2);
    function your_function($mailcontent, $user_id) {
        //$mailcontent Email Content.
        //$user_id User ID.
        $mailcontent = $mailcontent." Extra Mail Content.";
        return $mailcontent;
    }
    
    Parameters:
    $mailcontent
    Email Content
    $user_id
    User ID
    Copied Copy
  • It provides you array of available currencies in general settings.

  • Usage:
    add_filter( 'arm_available_currencies', 'your_function');
    function your_function($currencies) {
        //$currencies Array of currencies
        $currencies['USD'] = '$';
        return $currencies;
    }
    
    Parameters:
    $currencies
    Array - Array of currencies
    Copied Copy
  • Runs just before the general options is rendered in general setting admin page.

  • Usage:
    add_action( 'arm_before_global_settings_html', 'your_function' );
    function your_function($general_settings) {
        echo "Your options HTML.";
    }
    
    Parameters:
    $general_settings
    Array of general Settings
    Copied Copy
  • This Action will be executed just after the general options will be rendered in general setting - admin side page.

  • Usage:
    add_action( 'arm_after_global_settings_html', 'your_function' );
    function your_function($general_settings) {
        echo "Your options HTML.";
    }
    
    Parameters:
    $general_settings
    Array of General Settings
    Copied Copy
  • This action will be executed just after the common message options will get rendered in general settings(Common Messages) admin page.

  • Usage:
    add_action( 'arm_after_common_messages_settings_html', 'your_function' );
    function your_function($common_messages) {
        echo "Your options HTML.";
    }
    
    Parameters:
    $common_messages
    Array of Common Messages
    Copied Copy
  • This action will be executed just after the default page options is rendered in general settings(Page Setup) admin page.

  • Usage:
    add_action( 'arm_after_page_settings_html', 'your_function' );
    function your_function($page_settings) {
        echo "Your options HTML.";
    }
    
    Parameters:
    $page_settings
    Array of Page Settings
    Copied Copy

Form Builder Hooks

  • This filter provides access to modify a form content, form values object, shortcode attributes after form will get displayed in front side. You can add custom content as well.

  • Usage:
    add_filter( 'arm_change_content_after_display_form', 'your_function', 10, 3);
    function your_function($content, $form, $atts) {
        //$content Form Content.
        //$form Form Object.
        //$atts Shortcode Arguments.
        $content = $content . 'Some Extra Content';
        return $content;
    }
    
    Parameters:
    $content
    Form HTML Content
    $form
    Form Object
    $atts
    Shortcode Arguments
    Copied Copy
  • This filter provide access to modify array of form field options before form HTML will get rendered in front side.

  • Usage:
    add_filter( 'arm_change_field_options', 'your_function');
    function your_function($field_options) {
        //$field_options Form Field Options Array.
        $field_options['some_option'] = 'Some Value';
        return $field_options;
    }
    
    Parameters:
    $field_option
    Array - Form Field Options Array
    Copied Copy
  • This filter will apply to form content before particular fields html will render.

  • Usage:
    add_filter( 'arm_change_content_before_field', 'your_function', 10, 2);
    function your_function($field_content, $form) {
        //$field_content Form Field Html.
        //$form Form object.
        $field_content = '
    ' . $field_content; return $field_content; }
    Parameters:
    $field_content
    Form Field HTML
    $form
    Form object
    Copied Copy
  • This filter is useful to add/modify content of form shortcode that will render in front side.

  • Usage:
    add_filter( 'arm_change_content_before_display_form', 'your_function', 10, 3);
    function your_function($content, $form, $atts) {
        //$content Form Content.
        //$form Form Object.
        //$atts Shortcode Arguments.
        $content = 'Some Link ' . $content;
        return $content;
    }
    
    Copied Copy
  • This filter provides facility to validate all fields of front side form (user meta details) before the form will get submitted.

  • Usage:
    add_filter( 'arm_validate_field_value_before_form_submission', 'your_function', 10, 3);
    function your_function($return, $form, $posted_data) {
        //$return True or error message array if any.
        //$form Form Object.
        //$posted_data Posted form details.
        if($posted_data['some_key'] == '') {
            if(!is_array($return)) { $return = array(); }
            $return['some_key'] = 'Error message goes here';
        }
        return $return;
    }
    
    Parameters:
    $return
    True or error message array if any
    $form
    Form Object
    $posted_data
    Posted form details
    Copied Copy
  • This filter provides access to modify user details prior to saving into user meta.

  • Usage:
    add_filter( 'arm_change_user_meta_before_save', 'your_function', 10, 2);
    function your_function($posted_data, $user_ID) {
        //$posted_data Posted form details.
        //$user_ID User ID.
        $posted_data['some_key'] = 'Some Value';
        return $posted_data;
    }
    
    Parameters:
    $posted_data
    Posted form details
    $user_ID
    User ID
    Copied Copy
  • This filter provides access to add content after any particular form field's HTML of a from shown in front side .

  • Usage:
    add_filter( 'arm_change_content_after_field', 'your_function', 10, 2);
    function your_function($field_content, $form) {
        //$field_content Form Field Html.
        //$form Form object.
        $field_content = $field_content . '
    '; return $field_content; }
    Parameters:
    $field_content
    Form Field Html
    $form
    Form object
    Copied Copy
  • This action will be executed before a registration / login / forgot password / change password / edit profile form will get submitted.

  • Usage:
    add_action( 'arm_before_form_submit_action', 'your_function' );
    function your_function($armform) {
        //Do Your Action
        //$armform Form Object.
    }
    
    Parameters:
    $armform
    Form Object
    Copied Copy
  • This will be executed after a registration / login / forgot password / change password / edit profile form submission action process completed.

  • Usage:
    add_action( 'arm_after_form_submit_action', 'your_function' );
    function your_function($armform) {
        //Do Your Action
        //$armform Form Object.
    }
    
    Parameters:
    $armform
    Form Object
    Copied Copy
  • This action will be executed when the submitted form details get successfully validated.

  • Usage:
    add_action( 'arm_after_form_validate_action', 'your_function', 10, 2 );
    function your_function($armform, $posted_data) {
        //Do Your Action
        //$armform Form Object.
        //$posted_data Posted Form Details.
    }
    
    Parameters:
    $armform
    Form Object
    $posted_data
    Posted Form Details
    Copied Copy
  • This action run to update user meta details when users create or update their profile.

  • Usage:
    add_action( 'arm_member_update_meta', 'your_function', 10, 2 );
    function your_function($user_id, $posted_data) {
        //Do Your Action
        //$user_id User ID.
        //$posted_data Posted Form Details.
    }
    
    Parameters:
    $user_id
    User ID
    $posted_data
    Posted Form Details
    Copied Copy
  • This action will be executed when a user's password will get changed.

  • Usage:
    add_action( 'arm_user_password_changed', 'your_function');
    function your_function($user) {
        //Do Your Action
        //$user User Object.
    }
    
    Parameters:
    $user
    User Object
    Copied Copy
  • This the action to save/update buddypress fields which are mapped with armember registration form.

  • Usage:
    add_action( 'arm_buddypress_xprofile_field_save', 'your_function', 10, 3);
    function your_function($user_id, $posted_data = array(), $action) {
        //Do Your Action
        //$user_id User ID.
        //$posted_data Posted Form Data.
        //$action Form Action. Possible values: 'add' or 'update'
    }
    
    Parameters:
    $user_id
    User ID
    $posted_data
    Posted Form Data
    $action
    Form Action. Possible values: 'add' or 'update'
    Copied Copy
  • This action will be executed just after the process of closing the user account get completed.

  • Usage:
    add_action( 'arm_after_close_account', 'your_function', 10, 2);
    function your_function($user_id, $user) {
        //Do Your Action
        //$user_id User ID.
        //$user User Object.
    }
    
    Parameters:
    $user_id
    User ID
    $user
    User Object
    Copied Copy
  • This action will be executed before the form shortcode will be rendered in front side. You can add custom content before the form as well.

  • Usage:
    add_action( 'arm_before_render_form', 'your_function', 10, 2 );
    function your_function($form, $atts) {
        //Do Your Action
        //$form Form Object.
        //$atts Shortcode Attributes
        echo "Form Starts From Here";
    }
    
    Parameters:
    $form
    Form Object
    $atts
    Shortcode Attributes
    Copied Copy
  • This action will allow to add custom content before the content of edit profile shortcode will take place.

  • Usage:
    add_action( 'arm_before_render_edit_profile_form', 'your_function', 10, 2 );
    function your_function($form, $atts) {
        //Do Your Action
        //$form Form Object.
        //$atts Shortcode Attributes
        echo "Form Starts From Here";
    }
    
    Parameters:
    $form
    Form Object
    $atts
    Shortcode Attributes
    Copied Copy
  • This action will be executed before close account shortcode will be displayed in front side.

  • Usage:
    add_action( 'arm_before_render_close_account_form', 'your_function' );
    function your_function($atts) {
        //Do Your Action
        //$atts Shortcode Attributes
        echo "Close Account Form Starts From Here";
    }
    
    Parameters:
    $atts
    Shortcode Attributes
    Copied Copy
  • This filter allows to modify form object before displaying edit profile shortcode in front side.

  • Usage:
    add_filter( 'arm_form_data_before_edit_profile_shortcode', 'your_function', 10, 2);
    function your_function($form, $atts) {
        //$form Form Object.
        //$atts Shortcode Arguments.
        $form->settings['style']['color_scheme'] = 'default';
        return $form;
    }
    
    Parameters:
    $form
    Form Object
    $atts
    Shortcode Attributes
    Copied Copy
  • This filter allows to modify form object before display form shortcode in front side.

  • Usage:
    add_filter( 'arm_form_data_before_form_shortcode', 'your_function', 10, 2);
    function your_function($form, $atts) {
        //$form Form Object.
        //$atts Shortcode Arguments.
        $form->label = 'My Form';
        return $form;
    }
    
    Parameters:
    $form
    Form Object
    $atts
    Shortcode Attributes
    Copied Copy
  • This filter allows to modify redirect URL after login redirecting page in front side.

  • Usage:
    add_filter( 'arm_modify_redirection_page_external', 'your_function', 10, 1);
    function your_function($redirect_url) {
        //$redirect_url Redirect URL for the login form.
        return $redirect_url;
    }
    
    Parameters:
    $redirect_url
    Redirect URL
    Copied Copy

Membership Plan Hooks

  • This action will be executed before saving a plan whenever it will be created or updated .

  • Usage:
    add_action( 'arm_save_subscription_plans', 'your_function');
    function your_function($posted_data) {
        //Do Your Action
        //$posted_data Posted Subscription Plan Details.
    }
    
    Parameters:
    $posted_data
    Posted Subscription Plan Details
    Copied Copy
  • This action will be executed after the membership plan is saved.

  • Usage:
    add_action( 'arm_saved_subscription_plan', 'your_function', 10, 2);
    function your_function($plan_id, $plan_data) {
        //Do Your Action
        //$plan_id Added/Updated Plan ID.
        //$plan_data Added/Updated Plan Details.
    }
    
    Parameters:
    $plan_id
    Added/Updated Plan ID
    $plan_data
    Added/Updated Plan Details
    Copied Copy
  • This action will be executed after a membership plan has been deleted.

  • Usage:
    add_action( 'arm_deleted_subscription_plan', 'your_function', 10, 2);
    function your_function($plan_id, $plan_data) {
        //Do Your Action
        //$plan_id Deleted Plan ID.
        //$plan_data Deleted Plan Details.
    }
    
    Parameters:
    $plan_id
    Deleted Plan ID
    $plan_data
    Deleted Plan Details
    Copied Copy
  • This action will be executed immediately when specific action occurs like 'cancel payment', 'failed payment by payment gateway' or 'membership plan expires'.

  • Usage:
    add_action( 'arm_user_plan_status_action_failed_payment', 'your_function', 10, 2);
    add_action( 'arm_user_plan_status_action_cancel_payment', 'your_function', 10, 2);
    add_action( 'arm_user_plan_status_action_eot', 'your_function', 10, 2);
    function your_function($args, $plan_detail) {
        //Do Your Action
        //$args Array of plan_id, user_id & action. action: 'failed_payment', 'cancel_payment', & 'eot'.
        //$plan_detail Plan Details.
    }
    
    Parameters:
    $args
    Array of plan_id, user_id & action. action: 'failed_payment', 'cancel_payment', & 'eot'(end of term)
    $plan_detail
    Plan Details
    Copied Copy
  • This action will be executed just before user's membership plan will get updated.

  • Usage:
    add_action( 'arm_before_update_user_subscription', 'your_function', 10, 2);
    function your_function($user_id = 0, $new_plan_id=0) {
        //Do Your Action
        //$user_id User ID.
        //$new_plan_id New Plan ID.
    }
    
    Parameters:
    $user_id
    User ID
    $new_plan_id
    New Plan ID
    Copied Copy
  • This action can be used to assign a plan directly to existing user.

  • Usage:
    do_action( 'arm_apply_plan_to_member', $plan_id, $user_id);
    
    Parameters:
    $plan_id
    Membership Plan ID
    $user_id
    Existing User ID to whom you want to assign a new membership plan.
    Copied Copy

Coupon Hooks

  • This action will be executed just before coupon code applied for membership plan amount.

  • Usage:
    add_action( 'arm_before_apply_coupon_code', 'your_function', 10, 2);
    function your_function($coupon_code, $plan_id) {
        //Do Your Action
        //$coupon_code Applied Coupon Code
        //$plan_id Plan ID.
    }
    
    Parameters:
    $coupon_code
    Applied Coupon Code
    $plan_id
    Plan ID
    Copied Copy
  • This action will be executed just after coupon code applied to membership plan amount.

  • Usage:
    add_action( 'arm_after_apply_coupon_code', 'your_function', 10, 2);
    function your_function($coupon_code, $plan_id) {
        //Do Your Action
        //$coupon_code Applied Coupon Code
        //$plan_id Plan ID.
    }
    
    Parameters:
    $coupon_code
    Applied Coupon Code
    $plan_id
    Plan ID
    Copied Copy

Payment Gateway Hooks

  • This Filter provides access to modify payment gateway settings array before saving it.

  • Usage:
    add_filter( 'arm_save_payment_gateway_settings', 'your_function', 10, 2);
    function your_function($pg_settings, $posted_data) {
        //$pg_settings Payment Gateway Settings Array.
        //$posted_data Payment gateway form posted data.
        $pg_settings['paypal']['some_key'] = 'jr738ds4dj8fh5dk27djdn';
        return $pg_settings;
    }
    
    Parameters:
    $pg_settings
    Payment Gateway Settings Array
    $posted_data
    Payment Gateway form posted data
    Copied Copy
  • This Filter provides access to modify all payment gateway settings array generated by arm_get_all_payment_gateways() function.

  • Usage:
    add_filter( 'arm_get_payment_gateways', 'your_function');
    function your_function($pg_settings) {
        //$pg_settings Payment Gateway Settings Array.
        $pg_settings['custom_gateway']['gateway_name'] = 'Custom Payment Gateway';
        return $pg_settings;
    }
    
    Parameters:
    $pg_settings
    Payment Gateway Settings Array
    Copied Copy
  • This Filter is useful to check whether the payment gateway has credit card fields support or not.

  • Usage:
    add_filter( 'arm_payment_gateway_has_ccfields', 'your_function', 10, 3);
    function your_function($pgHasCCFields, $gateway_key, $gateway_options) {
        //$pgHasCCFields Payment Gateway has credit card field of not.
        //$gateway_key Payment Gateway Key.
        //$gateway_options Payment Gateway Settings Array.
        if($gateway_key == 'custom_gateway') {
            $pgHasCCFields = true;
        }
        return $pgHasCCFields;
    }
    
    Parameters:
    $pgHasCCFields
    Payment Gateway has credit card field of not
    $gateway_key
    Payment Gateway Key
    $gateway_options
    Payment Gateway Settings Array
    Copied Copy
  • This Filter used to validate payment gateway fields in membership setup form action.

  • Usage:
    add_filter( 'arm_validate_payment_gateway_fields', 'your_function', 10, 4);
    function your_function($pg_errors, $post_data, $gateway_key, $gateway_options) {
        //$pg_errors True OR error message.
        //$post_data Posted membership setup form data.
        //$gateway_key Payment Gateway Key.
        //$gateway_options Payment Gateway Settings Array.
        if($gateway_key == 'custom_gateway') {
            if($post_data[$gateway_key]['card_number'] == '') {
                $pg_errors = 'Please fill required fields';
            } else {
                $pg_errors = true;
            }
        }
        return $pg_errors;
    }
    
    Parameters:
    $pg_errors
    True OR error message
    $post_data
    Posted membership setup form data
    $gateway_key
    Payment Gateway Key
    $gateway_options
    Payment Gateway Settings Array
    Copied Copy
  • Display tooltip information for specific payment gateways in admin setting page. You can add custom tooltip.

  • Usage:
    add_filter( 'arm_change_payment_gateway_tooltip', 'your_function', 10, 3);
    function your_function($titleTooltip, $gateway_key, $gateway_options) {
        //$titleTooltip Tooltip Content.
        //$gateway_key Payment Gateway Key.
        //$gateway_options Payment Gateway Settings Array.
        if($gateway_key == 'custom_gateway') {
            $titleTooltip = 'Configure custom payment gateway from your example.com account.';
        }
        return $titleTooltip;
    }
    
    Parameters:
    $titleTooltip
    Tooltip Content
    $gateway_key
    Payment Gateway Key
    $gateway_options
    Payment Gateway Settings Array
    Copied Copy
  • This action hook is useful to add custom payment gateway options html in admin payment gateway section.

  • Usage:
    add_action( 'arm_after_payment_gateway_listing_section', 'your_function', 10, 2);
    function your_function($gateway_name, $gateway_options) {
        //Do Your Action
        //$gateway_name Payment Gateway Name
        //$gateway_options Default/Saved Payment Gateway settings.
    }
    
    Parameters:
    $gateway_name
    Payment Gateway Name
    $gateway_options
    Default/Saved Payment Gateway settings
    Copied Copy
  • Handle payment gateway action when membership setup form submitted (In case of paid membership plan only).

  • Usage:
    add_action( 'arm_payment_gateway_validation_from_setup', 'your_function', 10, 4);
    function your_function($gateway_name, $gateway_options, $posted_data, $entry_id=0) {
        //Do Your Action
        //$gateway_name Payment Gateway Name
        //$gateway_options Payment Gateway settings.
        //$posted_data Posted membership setup details.
        //$entry_id Entry details ID.
    }
    
    Parameters:
    $gateway_name
    Payment Gateway Name
    $gateway_options
    Payment Gateway settings
    $posted_data
    Posted membership setup details
    $entry_id
    Entry details ID
    Copied Copy
  • This action will be executed whenever a recurring membership plan cancelled by admin or user.

  • Usage:
    add_action( 'arm_cancel_subscription_gateway_action', 'your_function', 10, 2);
    function your_function($user_id, $old_plan_id) {
        //Do Your Action
        //$user_id User ID.
        //$old_plan_id Plan ID.
    }
    
    Parameters:
    $user_id
    User ID
    $old_plan_id
    Plan ID
    Copied Copy
  • This filter will be useful to modify allowed payment gateways in a particular plan.

  • Usage:
    add_filter( 'arm_allowed_payment_gateways', 'your_function', 10, 2);
    function your_function($allowed_gateways,$plan_obj,$plan_options){
    //your custom functionality
        return $allowed_gateway;
    }
    
    Parameters:
    $allowed_gateways
    Array of allowed gateways
    $plan_obj
    Object of plan.
    $plan_options
    Array of plan options.
    Copied Copy
  • This filter will be useful to modify existing payment gateway name or add new payment gateway name.

  • Usage:
    add_filter( 'arm_filter_gateway_names', 'your_function', 10, 2);
    function your_function($pgname) {
    //your custom functionality
        return $pgname;
    }
    
    Parameters:
    $pgname
    array of payment gateway name
    Copied Copy
  • This action will be helpful to add new payment related message options in ARMember->global_settings->common_messages under payment related message section.

  • Usage:
    add_action( 'arm_payment_related_common_message', 'your_function');
    function your_function($common_messages) {
        //Do Your Action.
    }
    
    Parameters:
    $common_messages
    Array of common messages
    Copied Copy
  • This action will be helpful to add notice when selected plan is not supported with recurring billing option.

  • Usage:
    add_action( 'arm_show_payment_gateway_recurring_notice', 'your_function');
    function your_function($plan_options) {
        //Do Your Action.
    }
    
    Parameters:
    $plan_options
    Array of plan options
    Copied Copy
  • This action will be helpful to add notice in plan setup page under trial duration section.

  • Usage:
    add_action( 'arm_set_geteway_warning_in_plan_with_recurring', 'your_function');
    function your_function() {
        //Do Your Action.
    }
    
    Copied Copy
  • This filter is useful to add custom payment gateway in list of payment gateway shown in "Gateway" filter dropdown in Manage Members and Payment History page in admin panel.

  • Usage:
    apply_filters('arm_get_payment_gateways_in_filters', 'your_function', 10, 1);
    function your_function($default_payment_gateway_list = array()){
       // do something with $default_payment_gateway_list
       // for ex. if you want to add custom gateway with slug 'custom_gateway_slug' to list then, use code as below.				
       $default_payment_gateway['custom_gateway'] = array('gateway_name' => $arm_payment_gateways->arm_gateway_name_by_key('custom_gateway_slug'));
       return $default_payment_gateway_list;
    }
    
    Parameters:
    $default_payment_gateway_list
    Array of default payment gateways
    Copied Copy
  • This filter is useful to add custom gateway supported currency in list of default ARMember currency list.

  • Usage:
    apply_filters('arm_add_currency_in_default_list', 'your_function', 10, 1);
    function your_function($all_currency = array()){
       // do something with $all_currency
       $all_currency['AUD'] = '$';
       return $all_currency;
    }
    
    Parameters:
    $all_currency
    Array of all currency
    Copied Copy
  • This action is used to do action only after user paid 0 amount for subscription type of plan with Manual ( Semi Automatic ) payment mode using 2Checkout payment gateway.

  • Usage:
    add_action( 'arm_after_twocheckout_free_manual_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for paid finite OR paid Infinite type of plan using Authorize.net payment gateway.

  • Usage:
    add_action( 'arm_after_authorize_net_free_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for paid finite OR paid Infinite type of plan using 2Checkout payment gateway.

  • Usage:
    add_action( 'arm_after_twocheckout_free_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for paid finite OR paid Infinite type of plan using Paypal payment gateway.

  • Usage:
    add_action( 'arm_after_paypal_free_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for paid finite OR paid Infinite type of plan using Stripe payment gateway.

  • Usage:
    add_action( 'arm_after_stripe_free_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for subscription type of plan with Manual ( Semi Automatic ) payment mode using Authorize.net payment gateway.

  • Usage:
    add_action( 'arm_after_authorize_net_free_manual_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for subscription type of plan with Manual ( Semi Automatic ) payment mode using Paypal payment gateway.

  • Usage:
    add_action( 'arm_after_paypal_free_manual_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters 
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid 0 amount for subscription type of plan with Manual ( Semi Automatic ) payment mode using stripe payment gateway.

  • Usage:
    add_action( 'arm_after_stripe_free_manual_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_log_id = 0 , $arm_is_trial = 0, $coupon_code = '', $extraParam = array()) {
         //Do Your Action
        //$plan plan object
        //$payment_log_id Payment ID
        //$arm_is_trial Is this payment of trial period?
        //$coupon_code Coupon code 
        //$extraParam Array of extra parameters
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_log_id
    ID of row of database table where payment history added.
    $arm_is_trial
    Whether user paid for trial period or not?
    $coupon_code
    Coupon Code used while payment.
    $extraParam
    Array of extra parameters like plan_amount, paid_amount, coupon_amount etc.
    Copied Copy
  • This action is used to do action only after user paid using Bank Transfer payment gateway.

  • Usage:
    add_action( 'arm_after_bank_transfer_payment', 'your_function', 10, 5);
    function your_function($plan, $payment_mode= '' , $amount= 0, $coupon_code= '', $arm_is_trial= 0) {
         //Do Your Action
        //$plan plan object
        //$payment_mode Payment Method 'Auto' OR 'Manual'
        //$amount Plan Amount
        //$coupon_code Coupon code 
        //$arm_is_trial Whether user paid for trial period or not?
       
        
    }
    Parameters:
    $plan
    Plan Object
    $payment_mode
    Payment Method 'Auto' OR 'Manual'
    $amount
    Plan Amount
    $coupon_code
    Coupon Code used while payment.
    $arm_is_trial
    Whether user paid for trial period or not?
    Copied Copy
  • This action is used to do action directly after recurring payment of subscription type of plan is failed.

  • Usage:
    add_action( 'arm_after_recurring_payment_failed_outside', 'your_function', 10, 5);
    function your_function($user_id= 0, $plan_id= 0 , $payment_gateway= '', $payment_mode= '', $user_subdata= array()) {
         //Do Your Action
         //$user_id User ID
        //$plan_id Plan ID
        //$payment_gateway Payment Gateway
        //$payment_mode Payment Method 'Auto' OR 'Manual'
       //$user_subdata Array of payment data like subscription ID, Customer ID, Token
       
        
    }
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    $payment_gateway
    Payment Gateway
    $payment_mode
    Payment Method 'Auto' OR 'Manual'
    $user_subdata
    Array of payment data like subscription ID, Customer ID, Token.
    Copied Copy
  • This action is used to do action directly after recurring payment of subscription type of plan is completed.

  • Usage:
    add_action( 'arm_after_recurring_payment_success_outside', 'your_function', 10, 5);
    function your_function($user_id= 0, $plan_id= 0 , $payment_gateway= '', $payment_mode= '', $user_subdata= array()) {
         //Do Your Action
         //$user_id User ID
        //$plan_id Plan ID
        //$payment_gateway Payment Gateway
        //$payment_mode Payment Method 'Auto' OR 'Manual'
       //$user_subdata Array of payment data like subscription ID, Customer ID, Token
       
        
    }
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    $payment_gateway
    Payment Gateway
    $payment_mode
    Payment Method 'Auto' OR 'Manual'
    $user_subdata
    Array of payment data like subscription ID, Customer ID, Token.
    Copied Copy
  • This action is used to do action directly after all AUTO recurring payment of subscription type of plan is finished.

  • Usage:
    add_action( 'arm_after_recurring_payment_completed_outside', 'your_function', 10, 5);
    function your_function($user_id= 0, $plan_id= 0 , $payment_gateway= '', $payment_mode= '', $user_subdata= array()) {
         //Do Your Action
         //$user_id User ID
        //$plan_id Plan ID
        //$payment_gateway Payment Gateway
        //$payment_mode Payment Method 'Auto' OR 'Manual'
       //$user_subdata Array of payment data like subscription ID, Customer ID, Token
       
        
    }
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    $payment_gateway
    Payment Gateway
    $payment_mode
    Payment Method 'Auto' OR 'Manual'
    $user_subdata
    Array of payment data like subscription ID, Customer ID, Token.
    Copied Copy
  • This filter is used to modify the payment data after submitting the purchase plan form.

  • Usage:
    add_filter('arm_after_prepare_payment_data', 'arm_change_final_payable_amount_func', 10, 4);
    function arm_change_final_payable_amount_func($arm_purchase_arr, $payment_gateway, $posted_data, $entry_id)
    {
        //$arm_purchase_arr Membership plan payment array as submitted form.
        //$payment_gateway Selected payment gateway.
        //$posted_data form posted data array.
        //$entry_id Entry ID of the submitted form.
        
        //For change the purchase amount of plan change the value of key 'arm_payable_amount'
        $arm_purchase_arr['arm_payable_amount'] = 110; // Modify the amount which you want to pass for the membership plan purchase and payment gateway
    
        return $arm_purchase_arr;
    }
    
    Parameters:
    $arm_purchase_arr
    Membership plan payment array as submitted form.
    $payment_gateway
    Selected payment gateway.
    $posted_data
    Form Posted data as array.
    $entry_id
    Entry ID of the submitted form.
    Copied Copy

Member Related Hooks

  • Filter to check member's status before login process.

  • Usage:
    add_filter( 'arm_check_member_status_before_login', 'your_function', 10, 2);
    function your_function($user_status = true, $user_id) {
        //$user_status True OR error message.
        //$user_id User ID.
        if($user_id == 14) {
            global $arm_errors;
            $arm_errors->add('access_denied', 'You are not authorize to login.');
            $user_status = $arm_errors;
        }
        return $user_status;
    }
    
    Parameters:
    $user_status
    True OR error message
    $user_id
    User ID
    Copied Copy
  • This action will be executed immediately when user's membership plan will be cancelled.

  • Usage:
    add_action( 'arm_cancel_subscription', 'your_function', 10, 2);
    function your_function($user_id=0, $plan_id=0) {
        //Do Your Action
        //$user_id User ID.
        //$plan_id New Plan ID.
    }
    
    Parameters:
    $user_id
    User ID
    $plan_id
    New Plan ID
    Copied Copy
  • This action will be executed before a new user notification email will get sent to the user.

  • Usage:
    add_action( 'arm_before_new_user_notification', 'your_function');
    function your_function($user) {
        //Do Your Action
        //$user User Object.
    }
    
    Parameters:
    $user
    User Object
    Copied Copy
  • This action will be executed after a new user registration notification email will be sent.

  • Usage:
    add_action( 'arm_after_new_user_notification', 'your_function');
    function your_function($user) {
        //Do Your Action
        //$user User Object.
    }
    
    Parameters:
    $user
    User Object
    Copied Copy
  • This action will be executed before user signup completion notification email will be sent.

  • Usage:
    add_action( 'arm_before_signup_complete_notification', 'your_function');
    function your_function($user) {
        //Do Your Action
        //$user User Object.
    }
    
    Parameters:
    $user
    USer Object
    Copied Copy
  • This action will be executed on add/update member - action occur in admin side.

  • Usage:
    add_action( 'arm_admin_save_member_details', 'your_function');
    function your_function($member_data = array()) {
        //Do Your Action
        //$member_data Posted Member Data.
    }
    
    Parameters:
    $member_data
    Posted Member Data
    Copied Copy
  • This action will be executed before member listing action occur in admin side.

  • Usage:
    add_action( 'arm_before_listing_members', 'your_function');
    function your_function() {
        //Do Your Action OR Print Your Content.
    }
    
    Copied Copy
  • This action will be executed after member listing action occur in admin side.

  • Usage:
    add_action( 'arm_after_listing_members', 'your_function');
    function your_function() {
        //Do Your Action OR Print Your Content.
    }
    
    Copied Copy
  • This action will be executed each time in loop when a single user get imported from the list of users.

  • Usage:
    add_action( 'arm_after_user_import', 'your_function');
    function your_function($user_id) {
        //Do Your Action.
        //$user_id User ID.
    }
    
    Parameters:
    $user_id
    User ID
    Copied Copy
  • This action will be executed after all users will get imported to the system.

  • Usage:
    add_action( 'arm_after_all_users_import', 'your_function', 10, 2);
    function your_function($user_ids, $errors) {
        //Do Your Action.
        //$user_ids Imported User IDs.
        //$errors Array of Errors while importing users.
    }
    
    Parameters:
    $user_ids
    Imported User IDs
    $errors
    Array of Errors while importing users
    Copied Copy
  • This action will be executed when new plan is assigned to user or user's plan is changed.

  • Usage:
    add_action( 'arm_after_user_plan_change', 'arm_after_user_plan_change_func', 10, 2);
        function arm_after_user_plan_change_func($user_id, $plan_id) {
            // Do Your Action.
        }
    
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    Copied Copy
  • This action will be executed when user renews plan.

  • Usage:
    add_action( 'arm_after_user_plan_renew', 'arm_after_user_plan_renew_func', 10, 2);
        function arm_after_user_plan_renew_func($user_id, $plan_id) {
            // Do Your Action.
        }
    
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    Copied Copy
  • This action is used to assign membership to alredy existing wordpress users.

  • Usage:
    add_action( 'arm_add_user_to_armember', 'arm_add_user_to_armember_func', 10, 3);
        functionarm_add_user_to_armember_func($user_id, $blog_id, $plan_id) {
            // Do Your Action.
        }
    
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    $blog_id
    blog id in case of multisite
    Copied Copy
  • This action is used to do action directly after user is registered in the system through front end ARMember registration form.

  • Usage:
    add_action( 'arm_after_add_new_user', 'arm_after_add_new_user_func', 10, 2);
        function arm_after_add_new_user_func($user_id = 0, $posted_register_data = array()) {
            // Do Your Action.
        }
    
    Parameters:
    $user_id
    User ID
    $posted_register_data
    Posted data from registration form submission
    Copied Copy
  • This filter hook can be used to change cancel action prior to user's plan is cancelled.

  • Usage:
    add_filter( 'arm_before_cancel_subscription', 'your_function', 10, 3);
    function your_function($cancel_plan_action, $plan, $user_id=0) {
        //Do Your Action
    //$cancel_plan_action Cancel Subscription Action(By User) which is set in plan
    //$user_id User ID.
    //$plan Plan Object.
    }
    Parameters:
    $cancel_plan_action
    Cancel Subscription Action(By User) which is set in plan
    $user_id
    User ID
    $plan
    Plan Object
    Copied Copy
  • This action is used to do action directly after user's plan is cancelled.

  • Usage:
    add_action( 'arm_after_cancel_subscription', 'your_function', 10, 3);
    function your_function($user_id=0, $plan, $cancel_plan_action=0) {
         //Do Your Action
    //$cancel_plan_action Cancel Subscription Action(By User) which is set in plan
    //$user_id User ID.
    //$plan Plan Object.
    }
    Parameters:
    $cancel_plan_action
    Cancel Subscription Action(By User) which is set in plan
    $user_id
    User ID
    $plan
    Plan Object
    Copied Copy
  • This action is used to do action directly before user's plan is renewed.

  • Usage:
    add_action( 'arm_before_renew_user_plans', 'your_function', 10, 4);
    function your_function($user_id=0, $old_plan_id_array = 0, $new_plan_id = 0, $new_plan_object) {
         //Do Your Action
        //$user_id User ID.
        //$old_plan_id_array Array of user's old plan IDs.
        //$new_plan_id Plan New plan ID.
        //$new_plan_object New Plan Object. 
    }
    Parameters:
    $user_id
    User ID
    $old_plan_id_array
    Array of user's old plan IDs
    $new_plan_id
    New Plan ID
    $new_plan_object
    New Plan Object
    Copied Copy
  • This action is used to do action directly before user's plan is changed OR new plan is added in plan list.

  • Usage:
    add_action( 'arm_before_change_user_plans', 'your_function', 10, 4);
    function your_function($user_id=0, $old_plan_id_array = 0, $new_plan_id = 0, $new_plan_object) {
         //Do Your Action
        //$user_id User ID.
        //$old_plan_id_array Array of user's old plan IDs.
        //$new_plan_id Plan New plan ID. 
        //$new_plan_object New Plan Object. 
    }
    Parameters:
    $user_id
    User ID
    $old_plan_id_array
    Array of user's old plan IDs
    $new_plan_id
    New Plan ID
    $new_plan_object
    New Plan Object
    Copied Copy
  • This action is used to do action directly after user's password is changed

  • Usage:
    add_action( 'arm_change_password_external', 'your_function', 10, 2 );
    function your_function($user_id, $new_password) {
        //Do Your Action
        //$user_id User ID as String.
        //$new_password as String
    }
    
    Parameters:
    $user_id
    User ID as String..
    $new_password
    new_password as String.
    Copied Copy
  • This action is used to do action directly after user's ARMember Profile is updated

  • Usage:
    add_action( 'arm_update_profile_external', 'your_function', 10, 2 );
    function your_function($user_id, $form_data) {
        //Do Your Action
        //$user_id User ID as String.
        //$form_data as Array
    }
    
    Parameters:
    $user_id
    User ID as String..
    $form_data
    Array of form data posted.
    Copied Copy
  • This action will be executed when plan assigned to user or user's plan is changed from admin panel.

  • Usage:
    add_action( 'arm_after_user_plan_change_by_admin', 'arm_after_user_plan_change_by_admin_func', 10, 2);
        function arm_after_user_plan_change_by_admin_func($user_id, $plan_id) {
            // Do Your Action.
        }
    
    Parameters:
    $user_id
    User ID
    $plan_id
    Plan ID
    Copied Copy

Transaction History Hooks

  • This action will be executed before transaction log data will be saved.

  • Usage:
    add_action( 'arm_before_add_transaction', 'your_function');
    function your_function($log_data) {
        //Do Your Action.
        //$log_data Transaction Details.
    }
    
    Parameters:
    $log_data
    Transaction Details
    Copied Copy
  • This action will be executed after the action of transaction insertion get completed.

  • Usage:
    add_action( 'arm_after_add_transaction', 'your_function');
    function your_function($log_data) {
        //Do Your Action.
        //$log_data Transaction Details.
    }
    
    Parameters:
    $log_data
    Transaction Details
    Copied Copy
  • This action will be executed when payment details get added manually.

  • Usage:
    add_action( 'arm_save_manual_payment', 'your_function');
    function your_function($log_data = array()) {
        //Do Your Action.
        //$log_data Manual Payment Details.
    }
    
    Parameters:
    $log_data
    Manual Payment Details
    Copied Copy
  • This action will take place after completion of manual payment action.

  • Usage:
    add_action( 'arm_saved_manual_payment', 'your_function');
    function your_function($log_data = array()) {
        //Do Your Action.
        //$log_data Manual Payment Details.
    }
    
    Parameters:
    $log_data
    Manual Payment Details
    Copied Copy

Front Side Shortcodes Hooks

  • This Filter is helpful to add custom content before account detail shortcode content.

  • Usage:
    add_filter( 'arm_change_account_details_before_display', 'your_function', 10, 2);
    function your_function($content, $atts) {
        //$content Shortcode Content.
        //$atts Shortcode Arguments.
        $content = "Some Content " . $content;
        return $content;
    }
    
    Parameters:
    $content
    Shortcode Content
    $atts
    Shortcode Arguments
    Copied Copy
  • This Filter is helpful to add custom content after account detail shortcode content in front end.

  • Usage:
    add_filter( 'arm_change_account_details_after_display', 'your_function', 10, 2);
    function your_function($content, $atts) {
        //$content Shortcode Content.
        //$atts Shortcode Arguments.
        $content = $content . " Some Content";
        return $content;
    }
    
    Parameters:
    $content
    Shortcode Content
    $atts
    Shortcode Arguments
    Copied Copy

Member Profile & Directory Hooks

  • This Filter is useful to add custom content before the content of member profile / directory template shortcode.

  • Usage:
    add_filter( 'arm_change_content_before_display_profile_and_directory', 'your_function', 10, 2);
    function your_function($content, $atts) {
        //$content Shortcode Content.
        //$atts Shortcode Arguments.
        $content = " Some Content " . $content;
        return $content;
    }
    
    Parameters:
    $content
    Shortcode Content
    $atts
    Shortcode Arguments
    Copied Copy
  • This Filter is helpful to add custom content after the content of member profile / directory template shortcode in front side.

  • Usage:
    add_filter( 'arm_change_content_after_display_profile_and_directory', 'your_function', 10, 2);
    function your_function($content, $atts) {
        //$content Shortcode Content.
        //$atts Shortcode Arguments.
        $content = $content . " Some Content ";
        return $content;
    }
    
    Parameters:
    $content
    Shortcode Content
    $atts
    Shortcode Arguments
    Copied Copy
  • This Filter is helpful to add custom template by accessing default template values of member profile & directory templates.

  • Usage:
    add_filter( 'arm_change_profile_and_directory_settings', 'your_function');
    function your_function($templates) {
        //$templates Array of default profile & directory templates.
        $templates[] = array(
            'title' => __('Custom Profile Template', MEMBERSHIP_TXTDOMAIN),
            'slug' => 'customprofiletemplate', // Unique template slug.
            'type' => 'profile', // Possible values: 'profile' or 'directory'.
        );
        return $templates;
    }
    
    Parameters:
    $templates
    Array of default profile & directory templates
    Copied Copy
  • This Filter provides access to modify users detail before displaying it in profile or directory templates front side.

  • Usage:
    add_filter('arm_change_user_detail_before_display_in_profile_and_directory', 'your_function', 10, 2);
    function your_function($users, $args) {
        //$users Array of Users with details.
        //$args Shortcode Arguments.
        if ($args['type'] == 'directory') {
            //Filter Users Detail Array
        }
        return $users;
    }
    
    Parameters:
    $users
    Array of Users with details
    $args
    Shortcode Arguments
    Copied Copy
  • This Filter provides access to add/modify content that is displayed before user's profile fields in profile template.

  • Usage:
    add_filter('arm_profile_content_before_fields_outside', 'your_function', 10, 3);
    function your_function($content = '', $args = array(), $user= array()) {
        //$user Array of User with details.
        //$args Shortcode Argument.
        //$content content before user profile fields
       
        return $content;
    }
    
    Parameters:
    $content
    Content to display before user's profile fields section.
    $args
    Array of arguments of profile template shortcode.
    $user
    array of user detail.
    Copied Copy
  • This Filter provides access to modify content that is displayed after user's profile fields in profile template.

  • Usage:
    add_filter('arm_profile_content_after_fields_outside', 'your_function', 10, 3);
    function your_function($content = '', $args = array(), $user= array()) {
        //$user Array of User with details.
        //$args Shortcode Argument.
        //$content content after user profile fields
       
        return $content;
    }
    
    Parameters:
    $content
    Content to display after user's profile fields section.
    $args
    Array of arguments of profile template shortcode.
    $user
    array of user detail.
    Copied Copy