mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Remove Axo from the Checkout block in the editor and add the ACDC card component in the editor view
This commit is contained in:
parent
5bae4d13c8
commit
763f6a431e
2 changed files with 8 additions and 2 deletions
|
@ -102,7 +102,13 @@ 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' ) );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ registerPaymentMethod( {
|
|||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <CardFields config={ config } />,
|
||||
edit: <div></div>,
|
||||
edit: <CardFields config={ config } />,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue