=== MarginBeacon === Contributors: pluginkayvandra Tags: woocommerce, margin, coupon, cogs, risk Requires at least: 6.4 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Simulate native WooCommerce promotions before launch. Flag margin-risk orders after purchase. == Description == MarginBeacon is a WooCommerce extension that: * Helps merchants set up product costs using native WooCommerce COGS or MarginBeacon Cost * Simulates supported native coupons and sale prices before a campaign launches * Classifies promoted orders with a Promo Risk badge after purchase MarginBeacon does not create, modify, or apply coupons or discounts. It reads supported WooCommerce promotion configuration and order evidence to report gross product margin risk. Order risk evaluation may produce a preliminary result for unpaid statuses such as pending or on-hold, followed by a confirmed result after payment. Severity and payment lifecycle remain separate. Checkout remains non-blocking. MarginBeacon 1.0 is watch-only and does not enforce or block discounts. MarginBeacon calculates gross product margin estimates only. Results do not constitute financial or accounting advice. An optional MarginBeacon Pro companion plugin provides additional automation and advanced analysis features. MarginBeacon Free remains fully usable without the companion plugin. == Requirements == MarginBeacon requires: * WordPress 6.4 or later * PHP 7.4 or later * WooCommerce 8.0 or later * PHP BCMath extension The PHP BCMath extension is required for exact money calculations. If BCMath is unavailable, MarginBeacon will remain inactive and display an administrator notice instead of running financial calculations with reduced precision. == Installation == 1. Install and activate WooCommerce. 2. Make sure the PHP BCMath extension is available on the server. 3. Upload the `marginbeacon` folder to `/wp-content/plugins/`, or install the MarginBeacon ZIP through Plugins → Add Plugin → Upload Plugin. 4. Activate MarginBeacon from the Plugins screen. 5. Open WooCommerce → MarginBeacon. == Frequently Asked Questions == = Does MarginBeacon block checkout? = No. MarginBeacon 1.0 is watch-only. Checkout remains non-blocking. = Why do I see Unknown? = Safe is never assigned when required cost, currency, or promotion provenance data is incomplete. = How does Cost / COGS work? = One canonical cost source is active at a time: MarginBeacon Cost or WooCommerce COGS. Missing cost is never treated as zero. Migration to WooCommerce COGS copies only empty WooCommerce cost fields and switches only after a verified catalog pass. == Changelog == = 1.0.0 = * First public release of MarginBeacon Free. * Product cost setup with MarginBeacon Cost or WooCommerce native COGS, including admin list/edit fallbacks when the native COGS UI is unavailable. * Selected native-coupon preflight for campaign margin risk before launch. * Asynchronous Promo Risk badges on orders, with preliminary evaluation before payment confirmation and confirmed evaluation after payment. * Global margin thresholds, freshness tracking, acknowledgement, and operational health tools. * Hardened admin notice scoping and explicit native WooCommerce nonce validation for product and bulk COGS edits.