mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Add return type
This commit is contained in:
parent
1a5003770f
commit
e63e747f66
2 changed files with 2 additions and 2 deletions
|
@ -170,7 +170,7 @@ class ApplepayModule implements ServiceModule, ExtendingModule, ExecutableModule
|
||||||
|
|
||||||
add_filter(
|
add_filter(
|
||||||
'woocommerce_paypal_payments_selected_button_locations',
|
'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 ] ?? '';
|
$gateway = WC()->payment_gateways()->payment_gateways()[ ApplePayGateway::ID ] ?? '';
|
||||||
if ( $gateway && $gateway->enabled === 'yes' && $setting_name === 'smart_button_locations' ) {
|
if ( $gateway && $gateway->enabled === 'yes' && $setting_name === 'smart_button_locations' ) {
|
||||||
$locations[] = 'checkout';
|
$locations[] = 'checkout';
|
||||||
|
|
|
@ -220,7 +220,7 @@ class GooglepayModule implements ServiceModule, ExtendingModule, ExecutableModul
|
||||||
|
|
||||||
add_filter(
|
add_filter(
|
||||||
'woocommerce_paypal_payments_selected_button_locations',
|
'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 ] ?? '';
|
$gateway = WC()->payment_gateways()->payment_gateways()[ GooglePayGateway::ID ] ?? '';
|
||||||
if ( $gateway && $gateway->enabled === 'yes' && $setting_name === 'smart_button_locations' ) {
|
if ( $gateway && $gateway->enabled === 'yes' && $setting_name === 'smart_button_locations' ) {
|
||||||
$locations[] = 'checkout';
|
$locations[] = 'checkout';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue