From bbd25d69830850bcab50e12a36b03c1e7bb9f0f0 Mon Sep 17 00:00:00 2001 From: Thuan Bui Date: Mon, 31 Oct 2022 00:41:46 +0000 Subject: [PATCH] Define user set variables --- vietnam-payment-gateways.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vietnam-payment-gateways.php b/vietnam-payment-gateways.php index 973be99..f964a19 100644 --- a/vietnam-payment-gateways.php +++ b/vietnam-payment-gateways.php @@ -37,6 +37,15 @@ function vnpg_init_gateway_class() { $this->init_form_fields(); $this->init_settings(); + // Define user set variables. + $this->title = $this->get_option( 'title' ); + $this->description = $this->get_option( 'description' ); + $this->account_name = $this->get_option( 'account_name' ); + $this->account_number = $this->get_option( 'account_number' ); + $this->template_id = $this->get_option( 'template_id' ); + $this->prefix = $this->get_option('prefix'); + $this->bank = $this->get_option('bank'); + // Actions. add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); //add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'save_account_details' ) );