Coverwick
- Plugin page: https://plogins.com/coverwick/
- Documentation: https://plogins.com/coverwick/docs/
- Author: WPPoland.com
- WordPress.org contributor: motylanogha
- Source: https://github.com/wppoland/coverwick
Coverwick is for WooCommerce shops that sell boards, panels or tiles by the piece while customers think in square metres. The shopper types the area, the plugin works out the number of pieces, and the area travels with the line to the cart, the checkout and the order. Paid samples let the shopper see the colour first.
Set the coverage on a product
Section titled “Set the coverage on a product”On the product edit screen, General tab, fill in Coverage per unit: the area one sellable unit covers, for example 0.76 for a board or 0.72 for a pack of tiles. A comma or a dot both work as the decimal sign. Leave the field empty to turn the calculator off for that product.
Variations have their own Coverage per unit field. A variation without its own value uses the value from the General tab.
The calculator on the product page
Section titled “The calculator on the product page”Products with a coverage value get an Area field above the quantity field. The two are linked:
- Type the square metres and the number of pieces is calculated, rounded up to a whole piece. When the field loses focus, the area is corrected to what those pieces really cover.
- Change the number of pieces and the area follows.
- On a variable product the area field stays empty until the shopper picks a variation, then uses that variation’s coverage. An area the shopper typed is kept and sized again when the variation changes.
Rounding is always up: 7.6 m2 at 0.76 m2 per board gives exactly 10 boards, 7.7 m2 gives 11. There is no waste or cutting allowance; add it to the coverage value if your shop works with one.
Price per area unit
Section titled “Price per area unit”The price per area unit shows under the product price, following the shop’s tax display setting. Variable products show the lowest one with “from”.
The lowest price per area unit of each product is also saved in the _coverage_price_per_m2 product meta (dot decimal), so catalogue filters can read it. It is updated when a product or variation is saved, deleted, trashed or restored, and when a scheduled sale starts or ends.
Cart, checkout and orders
Section titled “Cart, checkout and orders”The covered area shows on the cart line and at checkout, on the classic cart and checkout pages and in the Cart and Checkout blocks. It is always derived from the quantity, so changing the quantity in the cart updates it. Order items store the area and show it in emails, My Account and the order screen.
Paid samples
Section titled “Paid samples”Tick Sample available on a product to give its page an “Order a sample” button. The button shows also when the product is out of stock.
- Each sample is a separate cart line named after the product (and variant), with its own price: the default price from the settings, or the product’s own Sample price. The button shows the price with or without tax, as the shop displays prices.
- On a variable product the shopper picks the options first, then orders a sample of that variant.
- Each product (and variation) can be sampled once per cart. The settings set the maximum number of sample lines in one cart.
- Sample quantities cannot be changed, also not in the Cart block.
- Samples are sold through one hidden internal product, “Sample (internal product used by Coverwick, do not delete)”, so the stock and sales figures of the real product stay untouched. That product cannot be added to the cart directly and is kept out of the shop pages, search, the product RSS feed, the WordPress sitemap and the public REST product listings. If it is deleted, it is created again the next time a shopper orders a sample. Past orders keep their sample lines.
Settings
Section titled “Settings”WooCommerce > Coverwick:
| Setting | What it does |
|---|---|
| Area unit | Shown next to area values, default m2. A trailing 2 or 3 is displayed as a superscript. |
| Enable samples | Shows the sample button on products marked Sample available. |
| Default sample price | Used when a product does not set its own sample price. |
| Samples per order | Maximum number of sample lines in one cart. |
| Sample shipping class | Applied to sample lines in the cart, for example a cheap letter or parcel rate. |
For developers
Section titled “For developers”- PHP: the
coverage/bootedaction fires after the plugin has booted. - JavaScript: the calculator box dispatches a bubbling
coverage:changeevent with{ area, pieces, perUnit, price, productId, variationId }.
Uninstall
Section titled “Uninstall”Deleting the plugin removes the hidden sample product and its options (coverage_settings, coverage_db_version, coverage_sample_product_id), on every site of a multisite network. Product coverage values and the area saved on past orders stay.
Coverwick Pro
Section titled “Coverwick Pro”Coverwick Pro is a paid add-on in preparation. It requires the free plugin and adds a Complete the set box to the product: accessory rows (a product or a variation), units per area unit and pack size. On the product page the accessories show under “Choose the remaining installation elements”, with quantities in packs worked out as area x units per area unit / pack size, rounded up, and recalculated live from the coverage:change event. “Add the whole set to cart” adds the board and the accessories in one request; every line is checked first (purchasable, stock including the cart, WooCommerce add-to-cart validation) and the cart is restored if an add still fails.
Requirements
Section titled “Requirements”WordPress 6.5 or newer, PHP 8.1 or newer, WooCommerce 8.0 or newer.