membership_on_sub

The Membership 2 membership on sub hook.

Description

apply_filters( 'membership_on_sub', (bool) $false, (unknown) $sub_id, (unknown) $this_id ); 

Parameters (3)

0. $false (bool)
The false.
1. $sub_id (unknown)
The sub id.
2. $this_id (unknown)
The this id.

Usage

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

Defined (2)

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

/app_old/membershipincludes/classes/class.membership.php  
  1. return apply_filters('membership_on_sub', false, $sub_id, $this->ID); 
  1. return apply_filters('membership_on_sub', true, $sub_id, $this->ID);