mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ New services to check the onboarding status
This commit is contained in:
parent
70abceeee0
commit
11f3071579
2 changed files with 19 additions and 0 deletions
|
@ -86,6 +86,15 @@ return array(
|
|||
$container->get( 'settings.service.sanitizer' )
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Checks if valid merchant connection details are stored in the DB.
|
||||
*/
|
||||
'settings.flag.is-connected' => static function ( ContainerInterface $container ) : bool {
|
||||
$data = $container->get( 'settings.data.general' );
|
||||
assert( $data instanceof GeneralSettings );
|
||||
|
||||
return $data->is_merchant_connected();
|
||||
},
|
||||
'settings.rest.onboarding' => static function ( ContainerInterface $container ) : OnboardingRestEndpoint {
|
||||
return new OnboardingRestEndpoint( $container->get( 'settings.data.onboarding' ) );
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue