Automattic\WooCommerce\Internal
Brands::is_enabled()
Ensures that the Brands feature is released initially only to 5% of users.
Метод класса: Brands{}
Хуков нет.
Возвращает
true|false
.
Использование
$result = Brands::is_enabled();
Код Brands::is_enabled() Brands::is enabled WC 9.5.1
public static function is_enabled() { $assignment = get_option( 'woocommerce_remote_variant_assignment', false ); if ( false === $assignment ) { return false; } return ( $assignment <= 6 ); // Considering 5% of the 0-120 range. }