mirror of
https://github.com/10h30/woo-viet.git
synced 2026-06-05 15:09:49 +09:00
OnePay gateways: move Order Button text to payment settings
This commit is contained in:
@@ -39,7 +39,6 @@ abstract class WooViet_OnePay_Abstract extends WC_Payment_Gateway {
|
||||
public function __construct() {
|
||||
$this->id = strtolower( get_called_class() );
|
||||
$this->has_fields = false;
|
||||
$this->order_button_text = __( 'Proceed to OnePay', 'woo-viet' );
|
||||
$this->configure_payment();
|
||||
$this->supports = array(
|
||||
'products',
|
||||
@@ -50,11 +49,12 @@ abstract class WooViet_OnePay_Abstract extends WC_Payment_Gateway {
|
||||
$this->init_settings();
|
||||
|
||||
// Define user set variables.
|
||||
$this->title = $this->get_option( 'title' );
|
||||
$this->description = $this->get_option( 'description' )
|
||||
. sprintf( '<br/><div align="center" class="onepay-logo" id="%1$s"><img src="%2$s"></div>',
|
||||
$this->id . '_logo',
|
||||
apply_filters( $this->id . '_logo', WOO_VIET_URL . "assets/$this->id.png" ) );
|
||||
$this->title = $this->get_option( 'title' );
|
||||
$this->description = $this->get_option( 'description' )
|
||||
. sprintf( '<br/><div align="center" class="onepay-logo" id="%1$s"><img src="%2$s"></div>',
|
||||
$this->id . '_logo',
|
||||
apply_filters( $this->id . '_logo', WOO_VIET_URL . "assets/$this->id.png" ) );
|
||||
$this->order_button_text = $this->get_option( 'order_button_text' );
|
||||
|
||||
$this->testmode = 'yes' === $this->get_option( 'testmode', 'no' );
|
||||
$this->merchant_id = $this->get_option( 'merchant_id' );
|
||||
|
||||
@@ -21,7 +21,6 @@ return array(
|
||||
'label' => __( 'Enable OnePay sandbox (testing)', 'woocommerce' ),
|
||||
'default' => 'no',
|
||||
'description' => sprintf( __( 'OnePay sandbox can be used to test payments. See <a href="%s">the testing info</a>.', 'woocommerce' ), 'https://mtf.onepay.vn/developer/?page=modul_noidia' ),
|
||||
//@todo: add the logo https://mtf.onepay.vn/developer/?page=logo
|
||||
),
|
||||
'title' => array(
|
||||
'title' => __( 'Title', 'woo-viet' ),
|
||||
@@ -37,6 +36,13 @@ return array(
|
||||
'description' => __( 'This controls the description which the user sees during checkout.', 'woo-viet' ),
|
||||
'default' => __( 'With OnePay, you can make payment by using any local Vietnam ATM card.', 'woo-viet' )
|
||||
),
|
||||
'order_button_text' => array(
|
||||
'title' => __( 'Button text', 'woo-viet' ),
|
||||
'type' => 'text',
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'Button label in the checkout page.', 'woo-viet' ),
|
||||
'default' => __( 'Pay with ATM cards', 'woo-viet' )
|
||||
),
|
||||
'api_details' => array(
|
||||
'title' => __( 'API Credentials', 'woo-viet' ),
|
||||
'type' => 'title',
|
||||
|
||||
@@ -21,7 +21,6 @@ return array(
|
||||
'label' => __( 'Enable OnePay sandbox (testing)', 'woocommerce' ),
|
||||
'default' => 'no',
|
||||
'description' => sprintf( __( 'OnePay sandbox can be used to test payments. See <a href="%s">the testing info</a>.', 'woocommerce' ), 'https://mtf.onepay.vn/developer/?page=modul_quocte' ),
|
||||
//@todo: add the logo https://mtf.onepay.vn/developer/?page=logo
|
||||
),
|
||||
'title' => array(
|
||||
'title' => __( 'Title', 'woo-viet' ),
|
||||
@@ -37,6 +36,13 @@ return array(
|
||||
'description' => __( 'This controls the description which the user sees during checkout.', 'woo-viet' ),
|
||||
'default' => __( 'With OnePay, you can make payment by using any local international card such as Visa, Master, JCB, and Amex.', 'woo-viet' )
|
||||
),
|
||||
'order_button_text' => array(
|
||||
'title' => __( 'Button text', 'woo-viet' ),
|
||||
'type' => 'text',
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'Button label in the checkout page.', 'woo-viet' ),
|
||||
'default' => __( "Pay with international cards", 'woo-viet' )
|
||||
),
|
||||
'api_details' => array(
|
||||
'title' => __( 'API Credentials', 'woo-viet' ),
|
||||
'type' => 'title',
|
||||
|
||||
Reference in New Issue
Block a user