mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Pass the PaymentSettings model instance.
We need to pass the PaymentSettings model instance to use it in some helpers. Once the new settings module is permanently enabled, this model can be passed as a dependency to the appropriate helper classes. For now, we must pass it this way to avoid errors when the new settings module is disabled.
This commit is contained in:
parent
e2d6ccfb0b
commit
e83dba1506
1 changed files with 10 additions and 0 deletions
|
@ -172,6 +172,16 @@ return array(
|
|||
$container->get( 'settings.data.settings' ),
|
||||
$subscription_map_helper->map()
|
||||
),
|
||||
/**
|
||||
* We need to pass the PaymentSettings model instance to use it in some helpers.
|
||||
* Once the new settings module is permanently enabled,
|
||||
* this model can be passed as a dependency to the appropriate helper classes.
|
||||
* For now, we must pass it this way to avoid errors when the new settings module is disabled.
|
||||
*/
|
||||
new SettingsMap(
|
||||
$container->get( 'settings.data.payment' ),
|
||||
array()
|
||||
),
|
||||
);
|
||||
},
|
||||
'compat.settings.settings_map_helper' => static function( ContainerInterface $container ) : SettingsMapHelper {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue