diff --git a/includes/gateways/bacs/class-wc-gateway-bacs.php b/includes/gateways/bacs/class-wc-gateway-bacs.php index 1e155df98f2..dabc097e469 100644 --- a/includes/gateways/bacs/class-wc-gateway-bacs.php +++ b/includes/gateways/bacs/class-wc-gateway-bacs.php @@ -1,7 +1,12 @@ init_form_fields(); $this->init_settings(); - // Define user set variables + // Define user set variables. $this->title = $this->get_option( 'title' ); $this->description = $this->get_option( 'description' ); $this->instructions = $this->get_option( 'instructions' ); - // BACS account fields shown on the thanks page and in emails - $this->account_details = get_option( 'woocommerce_bacs_accounts', + // BACS account fields shown on the thanks page and in emails. + $this->account_details = get_option( + 'woocommerce_bacs_accounts', array( array( 'account_name' => $this->get_option( 'account_name' ), @@ -54,12 +63,12 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { ) ); - // Actions + // 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' ) ); add_action( 'woocommerce_thankyou_bacs', array( $this, 'thankyou_page' ) ); - // Customer Emails + // Customer Emails. add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 ); } @@ -69,27 +78,27 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { public function init_form_fields() { $this->form_fields = array( - 'enabled' => array( + 'enabled' => array( 'title' => __( 'Enable/Disable', 'woocommerce' ), 'type' => 'checkbox', 'label' => __( 'Enable bank transfer', 'woocommerce' ), 'default' => 'no', ), - 'title' => array( + 'title' => array( 'title' => __( 'Title', 'woocommerce' ), 'type' => 'text', 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ), 'default' => __( 'Direct bank transfer', 'woocommerce' ), 'desc_tip' => true, ), - 'description' => array( + 'description' => array( 'title' => __( 'Description', 'woocommerce' ), 'type' => 'textarea', 'description' => __( 'Payment method description that the customer will see on your checkout.', 'woocommerce' ), 'default' => __( 'Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account.', 'woocommerce' ), 'desc_tip' => true, ), - 'instructions' => array( + 'instructions' => array( 'title' => __( 'Instructions', 'woocommerce' ), 'type' => 'textarea', 'description' => __( 'Instructions that will be added to the thank you page and emails.', 'woocommerce' ), @@ -97,7 +106,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { 'desc_tip' => true, ), 'account_details' => array( - 'type' => 'account_details', + 'type' => 'account_details', ), ); @@ -112,27 +121,27 @@ class WC_Gateway_BACS extends WC_Payment_Gateway { ob_start(); - $country = WC()->countries->get_base_country(); - $locale = $this->get_country_locale(); + $country = WC()->countries->get_base_country(); + $locale = $this->get_country_locale(); - // Get sortcode label in the $locale array and use appropriate one + // Get sortcode label in the $locale array and use appropriate one. $sortcode = isset( $locale[ $country ]['sortcode']['label'] ) ? $locale[ $country ]['sortcode']['label'] : __( 'Sort code', 'woocommerce' ); ?>
:
+ : +
+