Skip to content

Commit

Permalink
Remove ACDC from the block checkout if Axo is present
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldudzic committed Sep 18, 2024
1 parent b0c43a0 commit c1c8c44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/ppcp-blocks/src/BlocksModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ function () {
'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' ) );
}
}
);

Expand Down

0 comments on commit c1c8c44

Please sign in to comment.