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.

{} It's a method of the class: ReviewsCommentsOverrides{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_dismiss_capability( $default_capability, $notice_name );
$default_capability(string|mixed) (required)
The default required capability.
$notice_name(string|mixed) (required)
The notice name.

Code of ReviewsCommentsOverrides::get_dismiss_capability() WC 7.1.0

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