diff --git a/modules/ppcp-axo-block/src/AxoBlockModule.php b/modules/ppcp-axo-block/src/AxoBlockModule.php index 2a52e0510..669cc7cc5 100644 --- a/modules/ppcp-axo-block/src/AxoBlockModule.php +++ b/modules/ppcp-axo-block/src/AxoBlockModule.php @@ -102,7 +102,14 @@ class AxoBlockModule implements ServiceModule, ExtendingModule, ExecutableModule add_action( 'woocommerce_blocks_payment_method_type_registration', function( PaymentMethodRegistry $payment_method_registry ) use ( $c ): void { - $payment_method_registry->register( $c->get( 'axoblock.method' ) ); + /* + * Only register the method if we are not in the admin + * (to avoid two Debit & Credit Cards gateways in the + * checkout block in the editor: one from ACDC one from Axo). + */ + if ( ! is_admin() ) { + $payment_method_registry->register( $c->get( 'axoblock.method' ) ); + } } ); diff --git a/modules/ppcp-blocks/resources/js/advanced-card-checkout-block.js b/modules/ppcp-blocks/resources/js/advanced-card-checkout-block.js index 48df41935..cdce4fd87 100644 --- a/modules/ppcp-blocks/resources/js/advanced-card-checkout-block.js +++ b/modules/ppcp-blocks/resources/js/advanced-card-checkout-block.js @@ -7,7 +7,7 @@ registerPaymentMethod( { name: config.id, label:
, content: , - edit:
, + edit: , ariaLabel: config.title, canMakePayment: () => { return true;