pmpro_applydiscountcode_return_js

The Paid Memberships Pro pmpro applydiscountcode return js hook.

Description

do_action( 'pmpro_applydiscountcode_return_js', (number) $discount_code, (number) $discount_code_id, (unknown) $level_id, (bool) $false ); 

Parameters (4)

0. $discount_code (number)
The discount code.
1. $discount_code_id (number)
The discount code id.
2. $level_id (unknown)
The level id.
3. $false (bool) => false
The false.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'pmpro_applydiscountcode_return_js', $discount_code, $discount_code_id, $level_id, $false ); 
The following example is for adding a hook callback.
  1. // define the pmpro_applydiscountcode_return_js callback 
  2. function action_pmpro_applydiscountcode_return_js( $discount_code, $discount_code_id, $level_id, $false ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'pmpro_applydiscountcode_return_js', 'action_pmpro_applydiscountcode_return_js', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'pmpro_applydiscountcode_return_js', 'action_pmpro_applydiscountcode_return_js', 10, 4 ); 

Defined (2)

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

/services/applydiscountcode.php  
  1. <?php do_action('pmpro_applydiscountcode_return_js', $discount_code, $discount_code_id, $level_id, false); ?> 
  1. do_action('pmpro_applydiscountcode_return_js', $discount_code, $discount_code_id, $level_id, $code_level);