Add boilerplate for advanced card block integration

This commit is contained in:
Emili Castells Guasch 2024-04-16 12:05:06 +02:00
parent ffe3a0b958
commit 7c90031c4f
5 changed files with 103 additions and 0 deletions

View file

@ -0,0 +1,12 @@
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
const config = wc.wcSettings.getSetting('ppcp-credit-card-gateway_data');
registerPaymentMethod({
name: config.id,
label: <div dangerouslySetInnerHTML={{__html: config.title}}/>,
content: <p>content</p>,
edit: <p>edit...</p>,
ariaLabel: config.title,
canMakePayment: () => {return true},
})