woocommerce_pay4pay_applyfor_<id>

The WooCommerce Pay for Payment woocommerce pay4pay applyfor id hook.

Description

apply_filters( 'woocommerce_pay4pay_applyfor_<id>', (unknown) $do_apply, (unknown) $cost, (unknown) $calculation_base, (unknown) $current_gateway ); 

Parameters (4)

0. $do_apply (unknown)
The do apply.
1. $cost (unknown)
The cost.
2. $calculation_base (unknown)
The calculation base.
3. $current_gateway (unknown)
The current gateway.

Usage

To run the hook, copy the example below.
  1. $do_apply = apply_filters( 'woocommerce_pay4pay_applyfor_{$id}', $do_apply, $cost, $calculation_base, $current_gateway ); 
  2.  
  3. if ( !empty( $do_apply ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_pay4pay_applyfor_<id> callback 
  2. function filter_woocommerce_pay4pay_applyfor_id( $do_apply, $cost, $calculation_base, $current_gateway ) { 
  3. // make filter magic happen here... 
  4. return $do_apply
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "woocommerce_pay4pay_applyfor_{$id}", 'filter_woocommerce_pay4pay_applyfor_id', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "woocommerce_pay4pay_applyfor_{$id}", 'filter_woocommerce_pay4pay_applyfor_id', 10, 4 ); 

Defined (1)

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

/woocommerce-payforpayment.php  
  1. $do_apply = apply_filters( "woocommerce_pay4pay_applyfor_{$current_gateway->id}" , $do_apply , $cost , $calculation_base , $current_gateway );