public
Created

WooCommerce Paypal snippet to convert checkout price with currency conversion rate. Written by: http://www.solagirl.net/

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8
add_filter('woocommerce_paypal_args', 'convert_rmb_to_usd');
function convert_rmb_to_usd($paypal_args){
if ( $paypal_args['currency_code'] == 'RMB'){
$convert_rate = 6.2116;
$paypal_args['amount_1'] = round( $paypal_args['amount_1'] / $convert_rate, 2);
}
return $paypal_args;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.