mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Add services for a new map helper
This commit is contained in:
parent
8e0bc6f2d2
commit
ddb80b5a89
1 changed files with 12 additions and 0 deletions
|
@ -11,6 +11,7 @@ namespace WooCommerce\PayPalCommerce\Compat;
|
|||
|
||||
use WooCommerce\PayPalCommerce\Compat\Assets\CompatAssets;
|
||||
use WooCommerce\PayPalCommerce\Compat\Settings\GeneralSettingsMapHelper;
|
||||
use WooCommerce\PayPalCommerce\Compat\Settings\PaymentMethodSettingsMapHelper;
|
||||
use WooCommerce\PayPalCommerce\Compat\Settings\SettingsMap;
|
||||
use WooCommerce\PayPalCommerce\Compat\Settings\SettingsMapHelper;
|
||||
use WooCommerce\PayPalCommerce\Compat\Settings\SettingsTabMapHelper;
|
||||
|
@ -145,6 +146,9 @@ return array(
|
|||
$general_map_helper = $container->get( 'compat.settings.general_map_helper' );
|
||||
assert( $general_map_helper instanceof GeneralSettingsMapHelper );
|
||||
|
||||
$payment_methods_map_helper = $container->get( 'compat.settings.payment_methods_map_helper' );
|
||||
assert( $payment_methods_map_helper instanceof PaymentMethodSettingsMapHelper );
|
||||
|
||||
return array(
|
||||
new SettingsMap(
|
||||
$container->get( 'settings.data.general' ),
|
||||
|
@ -182,6 +186,10 @@ return array(
|
|||
$container->get( 'settings.data.payment' ),
|
||||
array()
|
||||
),
|
||||
new SettingsMap(
|
||||
$container->get( 'settings.data.payment' ),
|
||||
$payment_methods_map_helper->map()
|
||||
),
|
||||
);
|
||||
},
|
||||
'compat.settings.settings_map_helper' => static function( ContainerInterface $container ) : SettingsMapHelper {
|
||||
|
@ -191,6 +199,7 @@ return array(
|
|||
$container->get( 'compat.settings.settings_tab_map_helper' ),
|
||||
$container->get( 'compat.settings.subscription_map_helper' ),
|
||||
$container->get( 'compat.settings.general_map_helper' ),
|
||||
$container->get( 'compat.settings.payment_methods_map_helper' ),
|
||||
$container->get( 'wcgateway.settings.admin-settings-enabled' )
|
||||
);
|
||||
},
|
||||
|
@ -206,4 +215,7 @@ return array(
|
|||
'compat.settings.general_map_helper' => static function() : GeneralSettingsMapHelper {
|
||||
return new GeneralSettingsMapHelper();
|
||||
},
|
||||
'compat.settings.payment_methods_map_helper' => static function() : PaymentMethodSettingsMapHelper {
|
||||
return new PaymentMethodSettingsMapHelper();
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue