From 487038c0d3f0fc23431efac1b8258a69b81d344c Mon Sep 17 00:00:00 2001 From: Philipp Stracker Date: Fri, 13 Sep 2024 18:19:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20the=20Axo-specific=20ic?= =?UTF-8?q?ons=20from=20the=20gateway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ppcp-axo/services.php | 34 --------------------- modules/ppcp-axo/src/Gateway/AxoGateway.php | 17 +---------- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/modules/ppcp-axo/services.php b/modules/ppcp-axo/services.php index 0519e9209..44cd181c1 100644 --- a/modules/ppcp-axo/services.php +++ b/modules/ppcp-axo/services.php @@ -77,7 +77,6 @@ return array( $container->get( 'wcgateway.url' ), $container->get( 'wcgateway.order-processor' ), $container->get( 'axo.card_icons' ), - $container->get( 'axo.card_icons.axo' ), $container->get( 'api.endpoint.order' ), $container->get( 'api.factory.purchase-unit' ), $container->get( 'api.factory.shipping-preference' ), @@ -108,39 +107,6 @@ return array( ); }, - 'axo.card_icons.axo' => static function ( ContainerInterface $container ): array { - return array( - array( - 'title' => 'Visa', - 'file' => 'visa-light.svg', - ), - array( - 'title' => 'MasterCard', - 'file' => 'mastercard-light.svg', - ), - array( - 'title' => 'Amex', - 'file' => 'amex-light.svg', - ), - array( - 'title' => 'Discover', - 'file' => 'discover-light.svg', - ), - array( - 'title' => 'Diners Club', - 'file' => 'dinersclub-light.svg', - ), - array( - 'title' => 'JCB', - 'file' => 'jcb-light.svg', - ), - array( - 'title' => 'UnionPay', - 'file' => 'unionpay-light.svg', - ), - ); - }, - /** * The matrix which countries and currency combinations can be used for AXO. */ diff --git a/modules/ppcp-axo/src/Gateway/AxoGateway.php b/modules/ppcp-axo/src/Gateway/AxoGateway.php index 4fa80cd4a..fd1644b41 100644 --- a/modules/ppcp-axo/src/Gateway/AxoGateway.php +++ b/modules/ppcp-axo/src/Gateway/AxoGateway.php @@ -70,13 +70,6 @@ class AxoGateway extends WC_Payment_Gateway { */ protected $card_icons; - /** - * The AXO card icons. - * - * @var array - */ - protected $card_icons_axo; - /** * The order endpoint. * @@ -127,7 +120,6 @@ class AxoGateway extends WC_Payment_Gateway { * @param string $wcgateway_module_url The WcGateway module URL. * @param OrderProcessor $order_processor The Order processor. * @param array $card_icons The card icons. - * @param array $card_icons_axo The card icons. * @param OrderEndpoint $order_endpoint The order endpoint. * @param PurchaseUnitFactory $purchase_unit_factory The purchase unit factory. * @param ShippingPreferenceFactory $shipping_preference_factory The shipping preference factory. @@ -141,7 +133,6 @@ class AxoGateway extends WC_Payment_Gateway { string $wcgateway_module_url, OrderProcessor $order_processor, array $card_icons, - array $card_icons_axo, OrderEndpoint $order_endpoint, PurchaseUnitFactory $purchase_unit_factory, ShippingPreferenceFactory $shipping_preference_factory, @@ -156,7 +147,6 @@ class AxoGateway extends WC_Payment_Gateway { $this->wcgateway_module_url = $wcgateway_module_url; $this->order_processor = $order_processor; $this->card_icons = $card_icons; - $this->card_icons_axo = $card_icons_axo; $this->method_title = __( 'Fastlane Debit & Credit Cards', 'woocommerce-paypal-payments' ); $this->method_description = __( 'Fastlane accelerates the checkout experience for guest shoppers and autofills their details so they can pay in seconds. When enabled, Fastlane is presented as the default payment method for guests.', 'woocommerce-paypal-payments' ); @@ -299,12 +289,7 @@ class AxoGateway extends WC_Payment_Gateway { $icons = $this->card_icons; $icons_src = esc_url( $this->wcgateway_module_url ) . 'assets/images/'; - if ( $this->card_icons_axo ) { - $icons = $this->card_icons_axo; - $icons_src = esc_url( $this->wcgateway_module_url ) . 'assets/images/axo/'; - } - - if ( empty( $this->card_icons ) ) { + if ( ! $icons ) { return $icon; }