From 6f354828476769d87e4bb212d4833b7413c6fd98 Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Fri, 18 Oct 2024 11:29:07 +0200 Subject: [PATCH] Update icons, fix errors --- modules/ppcp-blocks/src/PayPalPaymentMethod.php | 12 ++++++------ modules/ppcp-wc-gateway/assets/images/paypal.png | Bin modules/ppcp-wc-gateway/assets/images/paypal.svg | 2 +- .../ppcp-wc-gateway/src/Gateway/PayPalGateway.php | 6 +++--- .../PayUponInvoice/PayUponInvoiceGateway.php | 7 +++---- 5 files changed, 13 insertions(+), 14 deletions(-) mode change 100755 => 100644 modules/ppcp-wc-gateway/assets/images/paypal.png diff --git a/modules/ppcp-blocks/src/PayPalPaymentMethod.php b/modules/ppcp-blocks/src/PayPalPaymentMethod.php index d6a617af0..3cb122cbc 100644 --- a/modules/ppcp-blocks/src/PayPalPaymentMethod.php +++ b/modules/ppcp-blocks/src/PayPalPaymentMethod.php @@ -248,13 +248,13 @@ class PayPalPaymentMethod extends AbstractPaymentMethodType { return array( 'id' => $this->gateway->id, 'title' => $this->gateway->title, - 'icon' => [ - [ - 'id' => 'paypal', + 'icon' => array( + array( + 'id' => 'paypal', 'alt' => 'PayPal', - 'src' => $this->gateway->icon - ] - ], + 'src' => $this->gateway->icon, + ), + ), 'description' => $this->gateway->description, 'enabled' => $this->settings_status->is_smart_button_enabled_for_location( $script_data['context'] ?? 'checkout' ), 'fundingSource' => $this->session_handler->funding_source(), diff --git a/modules/ppcp-wc-gateway/assets/images/paypal.png b/modules/ppcp-wc-gateway/assets/images/paypal.png old mode 100755 new mode 100644 diff --git a/modules/ppcp-wc-gateway/assets/images/paypal.svg b/modules/ppcp-wc-gateway/assets/images/paypal.svg index 0d82f0b74..9aa54566c 100644 --- a/modules/ppcp-wc-gateway/assets/images/paypal.svg +++ b/modules/ppcp-wc-gateway/assets/images/paypal.svg @@ -1,3 +1,3 @@ - + diff --git a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php index 3012d5885..aafb50cb2 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/PayPalGateway.php @@ -232,7 +232,7 @@ class PayPalGateway extends \WC_Payment_Gateway { * @param PaymentTokensEndpoint $payment_tokens_endpoint Payment tokens endpoint. * @param bool $vault_v3_enabled Whether Vault v3 module is enabled. * @param WooCommercePaymentTokens $wc_payment_tokens WooCommerce payment tokens. - * @param string $module_url The module URL + * @param string $module_url The module URL. */ public function __construct( SettingsRenderer $settings_renderer, @@ -279,8 +279,8 @@ class PayPalGateway extends \WC_Payment_Gateway { $this->payment_tokens_endpoint = $payment_tokens_endpoint; $this->vault_v3_enabled = $vault_v3_enabled; $this->wc_payment_tokens = $wc_payment_tokens; - $this->module_url = $module_url; - $this->icon = apply_filters('woocommerce_paypal_payments_paypal_gateway_icon', esc_url( $this->module_url ) . 'assets/images/paypal.svg'); + $this->module_url = $module_url; + $this->icon = apply_filters( 'woocommerce_paypal_payments_paypal_gateway_icon', esc_url( $this->module_url ) . 'assets/images/paypal.svg' ); $default_support = array( 'products', diff --git a/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoiceGateway.php b/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoiceGateway.php index a1a4e4113..69ae3b522 100644 --- a/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoiceGateway.php +++ b/modules/ppcp-wc-gateway/src/Gateway/PayUponInvoice/PayUponInvoiceGateway.php @@ -123,7 +123,7 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway { * @param CheckoutHelper $checkout_helper The checkout helper. * @param State $state The onboarding state. * @param RefundProcessor $refund_processor The refund processor. - * @param string $module_url The module URL + * @param string $module_url The module URL */ public function __construct( PayUponInvoiceOrderEndpoint $order_endpoint, @@ -166,9 +166,8 @@ class PayUponInvoiceGateway extends WC_Payment_Gateway { $this->transaction_url_provider = $transaction_url_provider; $this->pui_helper = $pui_helper; $this->checkout_helper = $checkout_helper; - $this->module_url = $module_url; - $this->icon = apply_filters('woocommerce_paypal_payments_pay_upon_invoice_gateway_icon', esc_url( $this->module_url ) . 'assets/images/ratepay.svg'); - + $this->module_url = $module_url; + $this->icon = apply_filters( 'woocommerce_paypal_payments_pay_upon_invoice_gateway_icon', esc_url( $this->module_url ) . 'assets/images/ratepay.svg' ); $this->state = $state; if ( $state->current_state() === State::STATE_ONBOARDED ) {