From e63e747f66b3c401e19b1e9e8836cf4684b8b99c Mon Sep 17 00:00:00 2001 From: Emili Castells Guasch Date: Mon, 4 Nov 2024 16:34:29 +0100 Subject: [PATCH] Add return type --- modules/ppcp-applepay/src/ApplepayModule.php | 2 +- modules/ppcp-googlepay/src/GooglepayModule.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-applepay/src/ApplepayModule.php b/modules/ppcp-applepay/src/ApplepayModule.php index 470334c45..c5cc6a1b9 100644 --- a/modules/ppcp-applepay/src/ApplepayModule.php +++ b/modules/ppcp-applepay/src/ApplepayModule.php @@ -170,7 +170,7 @@ class ApplepayModule implements ServiceModule, ExtendingModule, ExecutableModule add_filter( 'woocommerce_paypal_payments_selected_button_locations', - function( array $locations, string $setting_name ) { + function( array $locations, string $setting_name ): array { $gateway = WC()->payment_gateways()->payment_gateways()[ ApplePayGateway::ID ] ?? ''; if ( $gateway && $gateway->enabled === 'yes' && $setting_name === 'smart_button_locations' ) { $locations[] = 'checkout'; diff --git a/modules/ppcp-googlepay/src/GooglepayModule.php b/modules/ppcp-googlepay/src/GooglepayModule.php index 6412f5c49..a13ebf498 100644 --- a/modules/ppcp-googlepay/src/GooglepayModule.php +++ b/modules/ppcp-googlepay/src/GooglepayModule.php @@ -220,7 +220,7 @@ class GooglepayModule implements ServiceModule, ExtendingModule, ExecutableModul add_filter( 'woocommerce_paypal_payments_selected_button_locations', - function( array $locations, string $setting_name ) { + function( array $locations, string $setting_name ): array { $gateway = WC()->payment_gateways()->payment_gateways()[ GooglePayGateway::ID ] ?? ''; if ( $gateway && $gateway->enabled === 'yes' && $setting_name === 'smart_button_locations' ) { $locations[] = 'checkout';