mirror of
https://github.com/10h30/woo-viet.git
synced 2026-07-11 18:56:13 +09:00
Fix Order status error #37
This commit is contained in:
@@ -43,6 +43,9 @@ class WooViet_VND_PayPal_Standard {
|
|||||||
|
|
||||||
// Add the exchange rate info for this gateway in the checkout page before proceeding in the PayPal pages
|
// Add the exchange rate info for this gateway in the checkout page before proceeding in the PayPal pages
|
||||||
add_filter( 'option_woocommerce_paypal_settings', array( $this, 'add_exchange_rate_info' ), 11 );
|
add_filter( 'option_woocommerce_paypal_settings', array( $this, 'add_exchange_rate_info' ), 11 );
|
||||||
|
|
||||||
|
// Match currency of Paypal with local order
|
||||||
|
add_action( 'valid-paypal-standard-ipn-request', array( $this, 'match_currency_order' ), 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -107,4 +110,18 @@ class WooViet_VND_PayPal_Standard {
|
|||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Match response currency from Paypal IPN with the order
|
||||||
|
*
|
||||||
|
* Topic https://wordpress.org/support/topic/loi-order-bi-on-hold/
|
||||||
|
*
|
||||||
|
* @author Longkt
|
||||||
|
* @since 1.4
|
||||||
|
*/
|
||||||
|
public function match_currency_order($posted) {
|
||||||
|
if($posted['mc_currency']) {
|
||||||
|
$posted['mc_currency'] = $order->get_currency();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user