Open OnePay for VND only

This commit is contained in:
htdat
2017-04-22 12:47:24 +07:00
parent 6c76275499
commit 8df0f11869
2 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -138,7 +138,9 @@ class WooViet {
$settings = self::get_settings();
// Check if "Add the OnePay Domestic Gateway" is enabled
if ( 'yes' == $settings['add_onepay_domestic']['enabled'] ) {
if ( 'yes' == $settings['add_onepay_domestic']['enabled']
AND 'VND' == get_woocommerce_currency()
) {
include( 'inc/class-wooviet-onepay-domestic.php' );
add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway_class' ) );