Skip to content

Instantly share code, notes, and snippets.

@vikas5914 vikas5914/noidea.php
Last active Dec 13, 2016

Embed
What would you like to do?
change currency_code and covert_rate
function woocommerce_paypal_args_for_noidea($paypal_args){
if ( $paypal_args['currency_code'] == 'curreny_Code'){
$convert_rate = 50;
if (isset($paypal_args['tax_cart'])) {
$paypal_args['tax_cart'] = round($paypal_args['tax_cart'] / $convert_rate, 2);
}
if (isset($paypal_args['shipping_1'])) {
$paypal_args['shipping_1'] = round($paypal_args['shipping_1'] / $convert_rate, 2);
}
}
return $paypal_args;
}
add_filter('woocommerce_paypal_args', 'woocommerce_paypal_args_for_noidea');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.