WC_Comments::add_review_comment_filter
Add Product Reviews filter for review comment type.
Method of the class: WC_Comments{}
No Hooks.
Returns
Array.
Usage
$result = WC_Comments::add_review_comment_filter( $comment_types ): array;
- $comment_types(array) (required)
- Array of comment type labels keyed by their name.
Changelog
| Since 6.0.0 | Introduced. |
WC_Comments::add_review_comment_filter() WC Comments::add review comment filter code WC 10.5.0
public static function add_review_comment_filter( array $comment_types ): array {
$comment_types['review'] = __( 'Product Reviews', 'woocommerce' );
return $comment_types;
}