Cost of Goods) is * a Pro feature: the report view, CSV export, the historical-cost * recalculation tool, and the included-order-statuses setting. * * @package A1_WooCOG * @since 0.5.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } class A1WooCOG_License { /** * True if this site has an active Pro (paid or trial) license. * Falls back to `true` (unrestricted) if the Freemius SDK isn't loaded * yet - e.g. credentials still being wired up - so local testing/dev * never gets locked out by accident. */ public static function is_premium(): bool { if ( ! function_exists( 'a1woocog_fs' ) ) { return true; } return (bool) a1woocog_fs()->can_use_premium_code(); } /** Whether the Cost of Goods Report admin page is unlocked. */ public static function allow_reports(): bool { return self::is_premium(); } /** User-facing message for the reports-page upsell. */ public static function reports_upsell_message(): string { return __( 'The Cost of Goods Report is a Pro feature. Upgrade to A1 Profit Reports for WooCommerce Pro to see profit summaries, per-product breakdowns, CSV export, and historical cost recalculation.', 'a1-profit-reports-for-woocommerce' ); } }