mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
♻️ Refactor conditions inside services.php
This commit is contained in:
parent
22ddf2597f
commit
7d2b0694d9
4 changed files with 12 additions and 13 deletions
|
@ -125,8 +125,8 @@ return array(
|
|||
}
|
||||
}
|
||||
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
if ( $state->current_state() !== State::STATE_ONBOARDED ) {
|
||||
$is_connected = $container->get( 'settings.flag.is-connected' );
|
||||
if ( ! $is_connected ) {
|
||||
return new DisabledSmartButton();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue