Automattic\WooCommerce\Internal\Admin\ProductReviews

ReviewsCommentsOverrides::get_dismiss_capability()protectedWC 1.0

Gets the capability required to dismiss the notice.

This is required so that users who do not have the manage_woocommerce capability (e.g. Editors) can still dismiss the notice displayed in the Comments page.

{} Это метод класса: ReviewsCommentsOverrides{}

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_dismiss_capability( $default_capability, $notice_name );
$default_capability(строка|разное) (обязательный)
The default required capability.
$notice_name(строка|разное) (обязательный)
The notice name.

Код ReviewsCommentsOverrides::get_dismiss_capability() WC 6.7.0

protected function get_dismiss_capability( $default_capability, $notice_name ) {
	return self::REVIEWS_MOVED_NOTICE_ID === $notice_name ? Reviews::get_capability() : $default_capability;
}