Yoast\WP\SEO\AI_Generator\User_Interface
Get_Usage_Route::get_action_path
Get action path for the request.
Метод класса: Get_Usage_Route{}
Хуков нет.
Возвращает
Строку. The action path.
Использование
$Get_Usage_Route = new Get_Usage_Route(); $Get_Usage_Route->get_action_path( $is_woo_product_entity ): string;
- $is_woo_product_entity(true|false)
- Whether the request is for a WooCommerce product entity.
По умолчанию:false
Код Get_Usage_Route::get_action_path() Get Usage Route::get action path Yoast 28.3
public function get_action_path( $is_woo_product_entity = false ): string {
$unlimited = '/usage/' . \gmdate( 'Y-m' );
if ( $is_woo_product_entity && $this->addon_manager->has_valid_subscription( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) ) {
return $unlimited;
}
if ( ! $is_woo_product_entity && $this->addon_manager->has_valid_subscription( WPSEO_Addon_Manager::PREMIUM_SLUG ) ) {
return $unlimited;
}
return '/usage/free-usages';
}