import { registerBlockType } from '@wordpress/blocks'; import Edit from './edit'; import save from './save'; const paypalIcon = ( ) const blockId = 'woocommerce-paypal-payments/paylater-messages'; registerBlockType( blockId, { icon: paypalIcon, edit: Edit, save, } ); document.addEventListener( 'DOMContentLoaded', () => { const { registerCheckoutFilters } = window.wc.blocksCheckout; // allow to add this block inside WC cart/checkout blocks registerCheckoutFilters( blockId, { additionalCartCheckoutInnerBlockTypes: ( defaultValue ) => { defaultValue.push( blockId ); return defaultValue; }, } ); } );