woocommerce_product_reviews_is_product_review_or_reply
Filters whether the object is a review or a reply to a review.
Usage
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|mixed)
- The object in context.
Changelog
Since 6.7.0 | Introduced. |
Where the hook is called
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 );