ms_controller_membership_autodetect_membership

The WordPress Core ms controller membership autodetect hook.

Description

apply_filters( 'ms_controller_membership_autodetect_membership', (unknown) $membership_id, (unknown) $preferred, (unknown) $no_member_check ); 

Parameters (3)

0. $membership_id (unknown)
The membership id.
1. $preferred (unknown)
The preferred.
2. $no_member_check (unknown)
The no member check.

Usage

To run the hook, copy the example below.
  1. $membership_id = apply_filters( 'ms_controller_membership_autodetect_membership', $membership_id, $preferred, $no_member_check ); 
  2.  
  3. if ( !empty( $membership_id ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the ms_controller_membership_autodetect_membership callback 
  2. function filter_ms_controller_membership_autodetect_membership( $membership_id, $preferred, $no_member_check ) { 
  3. // make filter magic happen here... 
  4. return $membership_id
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'ms_controller_membership_autodetect_membership', 'filter_ms_controller_membership_autodetect_membership', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'ms_controller_membership_autodetect_membership', 'filter_ms_controller_membership_autodetect_membership', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/app/controller/class-ms-controller-membership.php  
  1. return apply_filters(