mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Remove ACDC from the block checkout if Axo is present
This commit is contained in:
parent
b0c43a02d2
commit
c1c8c44af1
1 changed files with 5 additions and 1 deletions
|
@ -68,7 +68,11 @@ class BlocksModule implements ServiceModule, ExtendingModule, ExecutableModule {
|
|||
'woocommerce_blocks_payment_method_type_registration',
|
||||
function( PaymentMethodRegistry $payment_method_registry ) use ( $c ): void {
|
||||
$payment_method_registry->register( $c->get( 'blocks.method' ) );
|
||||
$payment_method_registry->register( $c->get( 'blocks.advanced-card-method' ) );
|
||||
|
||||
// Include ACDC in the Block Checkout only in case Axo doesn't exist or is not available.
|
||||
if ( !$c->has('axoblock.available' ) || !$c->get( 'axoblock.available' ) ) {
|
||||
$payment_method_registry->register( $c->get( 'blocks.advanced-card-method' ) );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue