'Master Card', 'VISA' => 'Visa', 'AMEX' => 'American Express', 'JCB' => 'Japan Credit Bureau', 'CLICK_TO_PAY' => 'Click to pay', ]; public function boot() { $this->blackBins = require_once(Main::ROOT_PATH . '/includes/blackBins.php'); $this->brands = \array_keys($this->supported_brands); unset($this->form_fields['hyper_pay_brands']); } public function renderPaymentForm(WC_Order $order, $result) { parent::renderPaymentForm($order,$result); wp_enqueue_script('CLICK_TO_PAY_JS', HYPERPAY_PLUGIN_DIR . '/src/assets/js/click_to_pay.js', ['jquery'], '1.0.0', true); wp_localize_script('CLICK_TO_PAY_JS', 'hyperpay_dataObj_click_to_pay', ["email" => $order->get_billing_email()]); } public function iconSrc() { $img = HYPERPAY_PLUGIN_DIR . '/src/assets/images/default.png'; if (file_exists(Main::ROOT_PATH . '/assets/images/click-to-pay.png')) $img = HYPERPAY_PLUGIN_DIR . '/src/assets/images/click-to-pay.png'; return [$img]; } }