woocommerce-paypal-payments/modules/ppcp-paylater-configurator/extensions.php

75 lines
2.4 KiB
PHP
Raw Normal View History

2023-12-21 09:55:57 +02:00
<?php
/**
* The Pay Later configurator module extensions.
*
* @package WooCommerce\PayPalCommerce\PayLaterConfigurator
*/
declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\PayLaterConfigurator;
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
return array(
'wcgateway.settings.fields' => function ( ContainerInterface $container, array $fields ): array {
$old_fields = array(
'pay_later_messaging_locations',
'pay_later_enable_styling_per_messaging_location',
'pay_later_general_message_layout',
'pay_later_general_message_logo',
'pay_later_general_message_position',
'pay_later_general_message_color',
'pay_later_general_message_flex_color',
'pay_later_general_message_flex_ratio',
'pay_later_general_message_preview',
'pay_later_product_messaging_heading',
'pay_later_product_message_layout',
'pay_later_product_message_logo',
'pay_later_product_message_position',
'pay_later_product_message_color',
'pay_later_product_message_flex_color',
'pay_later_product_message_flex_ratio',
'pay_later_product_message_preview',
'pay_later_cart_messaging_heading',
'pay_later_cart_message_layout',
'pay_later_cart_message_logo',
'pay_later_cart_message_position',
'pay_later_cart_message_color',
'pay_later_cart_message_flex_color',
'pay_later_cart_message_flex_ratio',
'pay_later_cart_message_preview',
'pay_later_checkout_messaging_heading',
'pay_later_checkout_message_layout',
'pay_later_checkout_message_logo',
'pay_later_checkout_message_position',
'pay_later_checkout_message_color',
'pay_later_checkout_message_flex_color',
'pay_later_checkout_message_flex_ratio',
'pay_later_checkout_message_preview',
'pay_later_shop_messaging_heading',
'pay_later_shop_message_layout',
'pay_later_shop_message_logo',
'pay_later_shop_message_position',
'pay_later_shop_message_color',
'pay_later_shop_message_flex_color',
'pay_later_shop_message_flex_ratio',
'pay_later_shop_message_preview',
'pay_later_home_messaging_heading',
'pay_later_home_message_layout',
'pay_later_home_message_logo',
'pay_later_home_message_position',
'pay_later_home_message_color',
'pay_later_home_message_flex_color',
'pay_later_home_message_flex_ratio',
'pay_later_home_message_preview',
2024-02-13 18:19:26 +04:00
'pay_later_messaging_enabled',
);
foreach ( $old_fields as $old_field ) {
unset( $fields[ $old_field ] );
}
return $fields;
},
);