pmpro_checkout_start_date

The Paid Memberships Pro pmpro checkout start date hook.

Description

apply_filters( 'pmpro_checkout_start_date', (string) $current_time_mysql, (unknown) $morder_user_id, (unknown) $morder_membership_level ); 

Parameters (3)

0. $current_time_mysql (string) => "'" . current_time('mysql') . "'"
The current time mysql.
1. $morder_user_id (unknown)
The morder user id.
2. $morder_membership_level (unknown)
The morder membership level.

Usage

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

Defined (4)

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

/services/twocheckout-ins.php  
  1. $startdate = apply_filters("pmpro_checkout_start_date", "'" . current_time('mysql') . "'", $morder->user_id, $morder->membership_level); 
/services/ipnhandler.php  
  1. $startdate = apply_filters( "pmpro_checkout_start_date", "'" . current_time( 'mysql' ) . "'", $morder->user_id, $morder->membership_level ); 
/preheaders/checkout.php  
  1. $startdate = apply_filters( "pmpro_checkout_start_date", $startdate, $user_id, $pmpro_level ); 
/includes/updates/upgrade_1_8_9_3.php  
  1. $filtered_startdate = apply_filters( "pmpro_checkout_start_date", $startdate, $user_id, $pmpro_level );