Automattic\WooCommerce\Admin\Features

LaunchYourStore::is_manager_or_admin()privateWC 1.0

User must be an admin or editor.

Method of the class: LaunchYourStore{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->is_manager_or_admin();

LaunchYourStore::is_manager_or_admin() code WC 9.7.1

private function is_manager_or_admin() {
	// phpcs:ignore
	if ( ! current_user_can( 'shop_manager' ) && ! current_user_can( 'administrator' ) ) {
		return false;
	}

	return true;
}