woocommerce_product_reviews_is_product_review_or_reply
Filters whether the object is a review or a reply to a review.
Использование
add_filter( 'woocommerce_product_reviews_is_product_review_or_reply', 'wp_kama_woocommerce_product_reviews_is_review_or_reply_filter', 10, 2 ); /** * Function for `woocommerce_product_reviews_is_product_review_or_reply` filter-hook. * * @param bool $is_review_or_reply Whether the object in context is a review or a reply to a review. * @param WP_Comment|mixed $object The object in context. * * @return bool */ function wp_kama_woocommerce_product_reviews_is_review_or_reply_filter( $is_review_or_reply, $object ){ // filter... return $is_review_or_reply; }
- $is_review_or_reply(true|false)
- Whether the object in context is a review or a reply to a review.
- $object(WP_Comment|разное)
- The object in context.
Список изменений
С версии 6.7.0 | Введена. |
Где вызывается хук
woocommerce_product_reviews_is_product_review_or_reply
woocommerce/src/Internal/Admin/ProductReviews/Reviews.php 153
return (bool) apply_filters( 'woocommerce_product_reviews_is_product_review_or_reply', $is_review_or_reply, $object );