woocommerce_product_reviews_list_table_item_types
Sets the possible options used in the Product Reviews List Table's filter-by-review-type selector.
Использование
add_filter( 'woocommerce_product_reviews_list_table_item_types', 'wp_kama_woocommerce_product_reviews_list_table_item_types_filter' );
/**
* Function for `woocommerce_product_reviews_list_table_item_types` filter-hook.
*
* @param array $array Map of possible review types.
*
* @return array
*/
function wp_kama_woocommerce_product_reviews_list_table_item_types_filter( $array ){
// filter...
return $array;
}
- $array(массив)
- Map of possible review types.
Список изменений
| С версии 7.0.0 | Введена. |
Где вызывается хук
woocommerce_product_reviews_list_table_item_types
woocommerce/src/Internal/Admin/ProductReviews/ReviewsListTable.php 1354-1361
$item_types = apply_filters( 'woocommerce_product_reviews_list_table_item_types', array( 'all' => __( 'All types', 'woocommerce' ), 'comment' => __( 'Replies', 'woocommerce' ), 'review' => __( 'Reviews', 'woocommerce' ), ) );