Yoast\WP\SEO\AI\Generator\User_Interface
Get_Usage_Route::is_free
Whether the current request should read the time-unbound free-usage bucket.
A user without the relevant paid subscription is on the free tier, whose usage is tracked in the free-usage bucket rather than per period.
Метод класса: Get_Usage_Route{}
Хуков нет.
Возвращает
true|false. True when the user is on the free tier for this request type.
Использование
$Get_Usage_Route = new Get_Usage_Route(); $Get_Usage_Route->is_free( $is_woo_product_entity ): bool;
- $is_woo_product_entity(true|false)
- Whether the request is for a WooCommerce product entity.
По умолчанию:false
Код Get_Usage_Route::is_free() Get Usage Route::is free Yoast 28.3
public function is_free( $is_woo_product_entity = false ): bool {
if ( $is_woo_product_entity ) {
return ! $this->addon_manager->has_valid_subscription( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG );
}
return ! $this->addon_manager->has_valid_subscription( WPSEO_Addon_Manager::PREMIUM_SLUG );
}