Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created September 14, 2020 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/8ff76a4ae97ebe3ccc596f9c6d3316ca to your computer and use it in GitHub Desktop.
Save lorenzocaum/8ff76a4ae97ebe3ccc596f9c6d3316ca to your computer and use it in GitHub Desktop.
function add_pp_args($args){

	$ppamt = $args['amount_1'] + $args['tax_cart'];
	$ppamt = ( ($ppamt * .026) + .30 ); 
	$ppamt = number_format((float)$ppamt, 2, '.', '');
	//remove debug
	foreach($args as $key => $val) if( substr($key,-2) == '_2' ) unset($args[$key]);
	$args['item_name_2'] = "Booking and Service Fee";
	$args['amount_2'] = $ppamt;
	$args['quantity_2'] = 1;
	return $args;
}

add_filter('FHEE__EEG_Paypal_Standard__set_redirection_info__arguments','add_pp_args');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment