Yoast\WP\SEO\AI_Generator\User_Interface

Get_Usage_Route::get_action_pathpublicYoast 1.0

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() 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';
}