Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

ApiController::is_authorized │ public │ WC 1.0

Checks if the current user has the necessary permissions to access the API.

Метод класса: ApiController{}

Хуков нет.

Возвращает

bool. True if the user has the necessary permissions, false otherwise.

Использование

$ApiController = new ApiController();
$ApiController->is_authorized();

Код ApiController::is_authorized() WC 11.2.2

public function is_authorized() {
	return is_user_logged_in() && (
		current_user_can( 'manage_woocommerce' ) || current_user_can( 'manage_options' )
	);
}