woocommerce_paypal_args
Usage
add_filter( 'woocommerce_paypal_args', 'wp_kama_woocommerce_paypal_args_filter', 10, 2 );
/**
* Function for `woocommerce_paypal_args` filter-hook.
*
* @param $array_merge
* @param $order
*
* @return
*/
function wp_kama_woocommerce_paypal_args_filter( $array_merge, $order ){
// filter...
return $array_merge;
}
- $array_merge
- -
- $order
- -
Where the hook is called
woocommerce_paypal_args
woocommerce_paypal_args
woocommerce/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php 286-293
return apply_filters( 'woocommerce_paypal_args', array_merge( $this->get_transaction_args( $order ), $this->get_line_item_args( $order, true ) ), $order );
woocommerce/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php 311-318
$paypal_args = apply_filters( 'woocommerce_paypal_args', array_merge( $this->get_transaction_args( $order ), $this->get_line_item_args( $order, $force_one_line_item ) ), $order );