Automattic\WooCommerce\Internal\StockNotifications
StockNotifications::is_alpha_enabled
Check whether the site opted in through the alpha constant.
Only bridges the gap until wc_update_1120_migrate_stock_notifications_alpha_constant() has copied the constant into the feature option. The database version is bumped after every 11.2.0 callback has run, so once it reaches 11.2.0 the Features screen toggle is the only switch.
Method of the class: StockNotifications{}
No Hooks.
Returns
bool.
Usage
$result = StockNotifications::is_alpha_enabled(): bool;
StockNotifications::is_alpha_enabled() StockNotifications::is alpha enabled code WC 11.2.1
private static function is_alpha_enabled(): bool {
if ( ! Constants::is_true( 'WOOCOMMERCE_BIS_ALPHA_ENABLED' ) ) {
return false;
}
return version_compare( (string) get_option( 'woocommerce_db_version', '0' ), '11.2.0', '<' );
}