Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog
ApiController::is_authorized
Checks if the current user has the necessary permissions to access the API.
Метод класса: ApiController{}
Хуков нет.
Возвращает
true|false. True if the user has the necessary permissions, false otherwise.
Использование
$ApiController = new ApiController(); $ApiController->is_authorized();
Код ApiController::is_authorized() ApiController::is authorized WC 10.5.2
public function is_authorized() {
return is_user_logged_in() && (
current_user_can( 'manage_woocommerce' ) || current_user_can( 'manage_options' )
);
}