mirror of
https://github.com/10h30/woo-viet.git
synced 2026-07-11 10:46:14 +09:00
Handle OnePay options in the settings page better
If a payment gateway option is NOT checked, it should not echo any link to configuration pages.
This commit is contained in:
@@ -106,7 +106,9 @@ class WooViet_Admin_Page {
|
||||
if ( 'VND' == get_woocommerce_currency() ) {
|
||||
_e( 'OnePay can work on your site.', 'woo-viet' );
|
||||
echo '<br/>';
|
||||
if ( 'yes' == $settings['add_onepay_domestic']['enabled'] ) {
|
||||
echo sprintf( __( 'Please configure this gateway under <a href="%s">WooCommerce -> Settings -> Checkout</a>.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_domestic' ) );
|
||||
}
|
||||
} else {
|
||||
_e( '<span style="color: red" ">This gateway is not active on your site. Because OnePay supports VND only.</span>', '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 '<br/>';
|
||||
if ( 'yes' == $settings['add_onepay_international']['enabled'] ) {
|
||||
echo sprintf( __( 'Please configure this gateway under <a href="%s">WooCommerce -> Settings -> Checkout</a>.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_international' ) );
|
||||
}
|
||||
} else {
|
||||
_e( '<span style="color: red" ">This gateway is not active on your site. Because OnePay supports VND only.</span>', 'woo-viet' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user