Companion's blocks
Companion adds three blocks for what WooCommerce does not have. The theme's templates and patterns never contain them, so the theme works without Companion; Companion inserts them with Block Hooks next to WooCommerce's blocks.
| Block | Placed | What it shows |
|---|---|---|
lanternwp/product-badges |
After woocommerce/product-sale-badge and after core/post-terms, where the product is known |
The product's Bestseller and New badges |
lanternwp/product-swatches |
Before woocommerce/product-rating |
The colours a product comes in, from a WooCommerce attribute of the Color / image type, at least two |
lanternwp/free-shipping-progress |
Before woocommerce/mini-cart-items-block and as the first child of woocommerce/cart-items-block |
How far the cart is from free shipping, from the Free shipping method of the customer's shipping zone |
The block names are in the public API; their markup and classes are not.
Move or remove one
In the Site Editor a hooked block shows like any other block: move it, or remove it from that template, and the change is saved with the template. To keep one out everywhere, unhook it in code with WordPress's hooked_block_types filter:
add_filter( 'hooked_block_types', function ( array $hooked ): array {
return array_values( array_diff( $hooked, [ 'lanternwp/free-shipping-progress' ] ) );
} );
Something wrong on this page? Report it. Something missing? Suggest it.