Skip to content

Commit

Permalink
Merge pull request #2622 from woocommerce/PCP-3692-hide-acdc-on-block…
Browse files Browse the repository at this point in the history
…-checkout-when-fastlane-is-active

Remove ACDC from the block checkout if Axo is present (3692)
  • Loading branch information
danieldudzic authored Sep 19, 2024
2 parents 304846e + 3ca879d commit 39531cf
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 39531cf

Please sign in to comment.