mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Merge pull request #2693 from woocommerce/PCP-3780-acdc-gateway-not-visible-on-block-checkout-for-logged-out-users
Fix ACDC gateway not visible on the block Checkout for logged-out users (3780)
This commit is contained in:
commit
a282260039
1 changed files with 3 additions and 1 deletions
|
@ -69,8 +69,10 @@ class BlocksModule implements ServiceModule, ExtendingModule, ExecutableModule {
|
|||
function( PaymentMethodRegistry $payment_method_registry ) use ( $c ): void {
|
||||
$payment_method_registry->register( $c->get( 'blocks.method' ) );
|
||||
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
|
||||
// Include ACDC in the Block Checkout only in case Axo doesn't exist or is not available or the user is logged in.
|
||||
if ( ! $c->has( 'axoblock.available' ) || ! $c->get( 'axoblock.available' ) || is_user_logged_in() ) {
|
||||
if ( ! $settings->get( 'axo_enabled' ) || is_user_logged_in() ) {
|
||||
$payment_method_registry->register( $c->get( 'blocks.advanced-card-method' ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue