Skip to content

Instantly share code, notes, and snippets.

@bmoredrew
Forked from claudiosanches/functions.php
Last active August 29, 2015 14:20
Show Gist options
  • Save bmoredrew/58fb50c7471787ddf0bf to your computer and use it in GitHub Desktop.
Save bmoredrew/58fb50c7471787ddf0bf to your computer and use it in GitHub Desktop.
<?php
/**
* Custom PayPal Adaptive Payments args.
*
* @param array $args
* @param WC_Order $order
* @return array
*/
function custom_woocommerce_paypal_ap_payment_args( $args, $order ) {
$args['receiverList'] = array(
'receiver' => array(
array(
'amount' => '40.00',
'email' => '[email protected]',
// 'primary' => 'true' // use this only for Chained Payment.
)
),
'receiver' => array(
array(
'amount' => '15.00',
'email' => '[email protected]'
)
),
'receiver' => array(
array(
'amount' => '60.00',
'email' => '[email protected]'
)
)
);
return $args;
}
add_filter( 'woocommerce_paypal_ap_payment_args', 'custom_woocommerce_paypal_ap_payment_args', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment