Skip to content
Sign in Get started
Menu
Developer docs menu

Companion's blocks

Applies to Companion 1.0.3 Updated 5 November 2026 View as Markdown

Companion adds blocks for what WooCommerce does not have. Companion inserts them with Block Hooks next to WooCommerce's blocks, so the theme works without Companion. A few the theme's patterns hold themselves, and only while Companion is active (the pattern checks that the block is registered): lanternwp/contact-form in the contact page's panel, lanternwp/value-details in the product details' Materials & care, and lanternwp/product-posts after the reviews on the product page with options to configure.

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 colors a product comes in, from a WooCommerce attribute of the Color / image type, at least two
lanternwp/product-hover-image As the first child of woocommerce/product-image in a product list The product's second photo, the first of its gallery that is not its image, over the image while a pointer hovers
lanternwp/option-guide After woocommerce/add-to-cart-with-options-variation-selector-attribute-name, beside the option the product's guide is for (any global attribute, such as pa_size) The guide's link (Size guide, or the guide's own text) that opens the product's guide (Products → Size & option guides, post type lanternwp_guide) in a dialog, with a cm/in switch
lanternwp/how-it-fits After woocommerce/add-to-cart-with-options-variation-selector of a variable product, and before woocommerce/product-stock-indicator in the simple product's part (simple-product-add-to-cart-with-options) How the product fits: a sentence and the height and size of the person in its photos, from Product data → How it fits
lanternwp/fit-scale Where lanternwp/how-it-fits stands, right after it, while Fit in reviews is on; a page may insert it too Where the product's reviews say it fits, from runs small to runs large, while Fit in reviews is on and one of the product's attributes has Ask how it fits in reviews checked (Products → Attributes); or one answer (fit: small, true, large, set in the block's sidebar)
lanternwp/sets Before the theme's related products section on a product page: in a template before the reference to its pattern (core/pattern with lanternwp/product-related or -detailed), where the section was written into the template before its group (core/group with lanternwp-product-related); with align wide and heading Complete the set. Last in the theme's Product sets section (core/group with lanternwp-home-sets, pattern lanternwp/home-sets) that holds no lanternwp/sets yet, with align wide The product sets (Products → Product sets, post type lanternwp_set) chosen in sets, in that order, or on a product page the one set the product shows (the one it names, then one with it on its photo, then the newest), elsewhere the two newest; heading over them when set; on a photo with points, or as a list, the products with their options and quantities, and a button that adds the chosen products in one Store API batch. A set with fewer than two products that can be added does not show; a Product sets section whose blocks show no set is left out, its heading too
lanternwp/notify-me Before woocommerce/add-to-cart-with-options-quantity-selector, in the row of the quantity and the button, while Back-in-stock emails is on The back-in-stock form in Add to cart's place, for a sold-out product or while a sold-out variation is chosen, which asks for one email when it is back
lanternwp/quick-view After woocommerce/product-image in a product list, while Quick view is on in Appearance → LanternWP → Features The Quick view button, which opens the product in a dialog
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
lanternwp/value-details In the theme's product details (lanternwp/product-details), in the Materials & care item before Shipping & returns, while Companion is active; any product template may insert it For each option of a variable product, the chosen value's Description and Facts from its term (Products → Attributes → Configure terms), the default value's until the shopper chooses; it follows the choice. A value with neither shows nothing for its option, and the theme hides the item while no chosen value has either
lanternwp/product-posts After the reviews in the theme's product page with options to configure (lanternwp/single-product-configure), with align wide and heading From the journal, while Companion is active; any product template may insert it The published posts whose Shop the story (post meta lanternwp_story_products) holds the product, newest first, count of them (1 to 3, 2 by default), under heading with a link to the blog; the journal's cards under LanternWP. Nothing while no post holds the product

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; the feature's row in Appearance → LanternWP → Features then says Removed from templates, and Restore in templates there (POST /wp-json/lanternwp/v1/features/<id>/restore, Features API) takes the block's name out of the anchors' metadata.ignoredHookedBlocks again. The feature of each placed block has a switch in its row: turned off, its block is placed in no template, a new one included, and a copy saved in a template renders nothing. The blocks inside WooCommerce's Add to Cart + Options parts (lanternwp/notify-me, lanternwp/option-guide, lanternwp/how-it-fits, lanternwp/fit-scale) render a sample in the editor. To keep one out everywhere in code instead, unhook it 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' ] ) );
} );