/** * External dependencies */ import { __, _x } from '@wordpress/i18n'; import { ExternalLink, Path, SVG } from '@wordpress/components'; import { Fragment } from '@wordpress/element'; /** * Internal dependencies */ import edit from './edit'; import save from './save'; import { DEFAULT_CURRENCY } from './constants'; /** * Styles */ import './editor.scss'; export const name = 'simple-payments'; export const settings = { title: __( 'Simple Payments button', 'jetpack' ), description: (

{ __( 'Lets you create and embed credit and debit card payment buttons with minimal setup.', 'jetpack' ) }

{ __( 'Support reference', 'jetpack' ) }
), icon: ( ), category: 'jetpack', keywords: [ _x( 'shop', 'block search term', 'jetpack' ), _x( 'sell', 'block search term', 'jetpack' ), 'PayPal', ], attributes: { currency: { type: 'string', default: DEFAULT_CURRENCY, }, content: { type: 'string', default: '', }, email: { type: 'string', default: '', }, featuredMediaId: { type: 'number', default: 0, }, featuredMediaUrl: { type: 'string', default: null, }, featuredMediaTitle: { type: 'string', default: null, }, multiple: { type: 'boolean', default: false, }, price: { type: 'number', }, productId: { type: 'number', }, title: { type: 'string', default: '', }, }, transforms: { from: [ { type: 'shortcode', tag: 'simple-payment', attributes: { productId: { type: 'number', shortcode: ( { named: { id } } ) => { if ( ! id ) { return; } const result = parseInt( id, 10 ); if ( result ) { return result; } }, }, }, }, ], }, edit, save, supports: { className: false, customClassName: false, html: false, // Disabled due several problems because the block uses custom post type to store information // https://github.com/Automattic/jetpack/issues/11789 reusable: false, }, };