/block.json. * * - extrova/extras Inner block of the Checkout (forced, lock.remove). * - extrova/free-shipping-bar Inner block of the Checkout (forced, lock.remove). * - extrova/order-extras Dynamic block for the order confirmation, inserted * with Block Hooks after the totals wrapper. * * @since 1.0.0 */ final class BlockRegistrar { public const CHECKOUT_INNER_BLOCKS = array( 'extrova/extras', 'extrova/free-shipping-bar', ); public const BLOCK_DIRS = array( 'extras', 'free-shipping-bar', 'order-extras' ); /** * Registers the block types (on `init`). */ public function register_blocks(): void { foreach ( self::BLOCK_DIRS as $dir ) { $path = EXTROVA_PATH . 'build/blocks/' . $dir; if ( is_readable( $path . '/block.json' ) ) { register_block_type( $path ); } } } }