Beskrivelse
A basket can remain profitable while one product sells below its cost. JeyTech Below Cost Guard checks each product line after WooCommerce has calculated discounts, including fixed-cart coupons and stacked coupons.
Start in observation mode to review potential problems without stopping sales. Enable blocking when your product costs and settings are ready.
What it does
- Reads native WooCommerce Cost of Goods Sold (COGS) for simple products and variations, including inherited variation costs.
- Compares final product line revenue excluding tax against unit cost times quantity and your optional minimum margin.
- Handles native percent, fixed-product and fixed-cart coupons after allocation, including multiple coupons.
- Validates classic checkout and Checkout Blocks on the server, then checks the final order before the native payment processing hooks.
- Keeps advertised prices and coupon amounts unchanged.
- Shows a neutral customer message without disclosing costs or margin.
- Records merchant diagnostics in WooCommerce logs.
- Releases temporary stock and coupon holds when rejecting an unpaid order at the final validation step.
Requirements and setup
Requires WooCommerce 10.3 or newer and its native Cost of Goods Sold feature.
Enable COGS under WooCommerce > Settings > Advanced > Features and enter positive unit costs EXCLUDING TAX for every product you want to sell while blocking is enabled.
Configure the guard under WooCommerce > Settings > Advanced > Below Cost Guard.
Blocking is strict: it also refuses products with missing or zero costs, disabled COGS, order currencies different from the store currency, and discounts entered as negative fees that cannot be allocated to product lines.
Observation is the default. Inspect WooCommerce > Status > Logs and select source jeytech-below-cost-guard before enabling blocking.
Scope
This is a product margin floor. Shipping revenue and positive fees do not offset a losing product line. Shipping costs, gateway fees and operating expenses are not calculated. It is not a full profit guarantee or a legal resale-price compliance tool.
The supported scope is standard simple products and variations, native WooCommerce COGS, native coupons and the store currency. Cost plugins, currency conversion, bundles, subscriptions, deposits and third-party promotion engines require their own compatibility validation.
Validation runs before payment on the standard WooCommerce checkout hooks. Custom code or gateways changing charges afterwards are outside this scope. A rejected order can remain unpaid in the order list for review and retry; the plugin does not cancel it or refund paid orders.
No external service, account, subscription or telemetry is required. Logging uses WooCommerce’s local logging system.
Skjermbilder



Installasjon
- Install and activate with WooCommerce 10.3 or newer.
- Enable native Cost of Goods Sold and enter positive unit costs excluding tax.
- Open WooCommerce > Settings > Advanced > Below Cost Guard.
- Keep Observe and log selected while checking the log and representative carts.
- Select Block checkout payment when product costs and discounts are ready.
Ofte stilte spørsmål
-
What does the margin percentage mean?
-
Margin = (final product revenue excluding tax – product cost) / revenue.
A unit costing 80 with a minimum margin of 20% needs at least 100 in revenue excluding tax after discounts. Zero percent prevents covered lines from selling below their product cost. -
Does this change my coupon?
-
No. The guard checks the final calculated totals. Observation logs findings. Blocking refuses checkout payment without changing the price or coupon amount.
-
What happens when a cost is missing or zero?
-
Observation logs a coverage problem. Blocking refuses checkout. Enter a positive native unit cost or use observation. Zero-cost products are not covered in this version.
-
Where are the logs?
-
WooCommerce > Status > Logs, source jeytech-below-cost-guard. Cost and margin findings are merchant diagnostics and are not included in the customer error message.
-
Is Checkout Blocks supported?
-
Yes, using native Store API validation and a final order check before payment. Classic checkout and standard order-pay validation are also covered.
-
Does it work with third-party cost or discount plugins?
-
No compatibility is claimed for third-party cost fields, promotion engines, bundles, subscriptions, deposits or currency conversion. Validate your own integrations on a staging store.
-
Does observation stop sales?
-
No. It records findings without blocking payment and is selected by default.
Vurderinger
Det er ingen omtaler av denne utvidelsen.
Bidragsytere og utviklere
«JeyTech Below Cost Guard for WooCommerce» er programvare med åpen kildekode. Følgende personer har bidratt til denne utvidelsen:
BidragsytereOversett «JeyTech Below Cost Guard for WooCommerce» til ditt språk.
Interessert i utvikling?
Bla gjennom koden, sjekk ut SVN-repositoriet, eller abonner på utviklingsloggen med RSS.
Endringslogg
1.0.0
- Initial Free release: final line margin checks with native COGS and native coupons, observation and blocking, classic checkout and Checkout Blocks.
