Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsCommentsOverrides::get_dismiss_capability()
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.
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.
ReviewsCommentsOverrides::get_dismiss_capability() ReviewsCommentsOverrides::get dismiss capability code WC 8.7.0
protected function get_dismiss_capability( $default_capability, $notice_name ) { return $notice_name === self::REVIEWS_MOVED_NOTICE_ID ? Reviews::get_capability() : $default_capability; }