Created
December 24, 2012 09:49
-
-
Save rememberlenny/4368627 to your computer and use it in GitHub Desktop.
WooCommerce Paypal snippet to convert checkout price with currency conversion rate.
Written by: http://www.solagirl.net/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment