diff --git a/inc/class-wooviet-admin-page.php b/inc/class-wooviet-admin-page.php
index 3f5dcc6..cb6c16b 100644
--- a/inc/class-wooviet-admin-page.php
+++ b/inc/class-wooviet-admin-page.php
@@ -106,7 +106,9 @@ class WooViet_Admin_Page {
if ( 'VND' == get_woocommerce_currency() ) {
_e( 'OnePay can work on your site.', 'woo-viet' );
echo '
';
- echo sprintf( __( 'Please configure this gateway under WooCommerce -> Settings -> Checkout.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_domestic' ) );
+ if ( 'yes' == $settings['add_onepay_domestic']['enabled'] ) {
+ echo sprintf( __( 'Please configure this gateway under WooCommerce -> Settings -> Checkout.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_domestic' ) );
+ }
} else {
_e( 'This gateway is not active on your site. Because OnePay supports VND only.', 'woo-viet' );
}
@@ -133,7 +135,9 @@ class WooViet_Admin_Page {
if ( 'VND' == get_woocommerce_currency() ) {
_e( 'OnePay can work on your site.', 'woo-viet' );
echo '
';
- echo sprintf( __( 'Please configure this gateway under WooCommerce -> Settings -> Checkout.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_international' ) );
+ if ( 'yes' == $settings['add_onepay_international']['enabled'] ) {
+ echo sprintf( __( 'Please configure this gateway under WooCommerce -> Settings -> Checkout.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_international' ) );
+ }
} else {
_e( 'This gateway is not active on your site. Because OnePay supports VND only.', 'woo-viet' );
}