is_enabled()) { $this->show_terms_info = true; $this->icon = apply_filters('woocommerce_payu_icon', plugins_url( '/assets/images/card-visa-mc.svg', PAYU_PLUGIN_FILE )); add_action('wp_enqueue_scripts', [$this, 'include_payu_sf_scripts']); //refresh card iframe after checkout change if (!is_admin()) { add_action('wp_footer', [$this, 'minicart_checkout_refresh_script']); if (!$this->try_retrieve_banks()) { add_filter('woocommerce_available_payment_gateways', [$this, 'unset_gateway']); } } } } /** * @return null */ function minicart_checkout_refresh_script() { if (is_checkout() || is_wc_endpoint_url()) : ?> get_payu_response(); if (isset($response) && $response->getStatus() === 'SUCCESS') { $this->retrieve_methods($response); $this->agreements_field(); echo ''; } } /** * @param OpenPayU_Result $response * * @return null */ private function retrieve_methods($response) { $payMethods = $response->getResponse(); if ($payMethods->payByLinks) { $payByLinks = $this->process_pay_methods($payMethods->payByLinks); if ($payByLinks) { ?>