woocommerce_wc_pf_apply

The WooCommerce Payment Fees woocommerce wc pf apply hook.

Description

apply_filters( 'woocommerce_wc_pf_apply', (unknown) $do_apply, (number) $extra_charge_amount, (number) $subtotal, (unknown) $current_gateway ); 

Parameters (4)

0. $do_apply (unknown)
The do apply.
1. $extra_charge_amount (number)
The extra charge amount.
2. $subtotal (number)
The subtotal.
3. $current_gateway (unknown)
The current gateway.

Usage

To run the hook, copy the example below.
  1. $do_apply = apply_filters( 'woocommerce_wc_pf_apply', $do_apply, $extra_charge_amount, $subtotal, $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_wc_pf_apply callback 
  2. function filter_woocommerce_wc_pf_apply( $do_apply, $extra_charge_amount, $subtotal, $current_gateway ) { 
  3. // make filter magic happen here... 
  4. return $do_apply
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_wc_pf_apply', 'filter_woocommerce_wc_pf_apply', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_wc_pf_apply', 'filter_woocommerce_wc_pf_apply', 10, 4 ); 

Defined (1)

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

/classes/class.wc-pf.php  
  1. $do_apply = apply_filters( 'woocommerce_wc_pf_apply' , $do_apply , $extra_charge_amount , $subtotal , $current_gateway );