woocommerce_admin_dashboard_recent_reviews
Filters the product name for display in the latest reviews.
Usage
add_filter( 'woocommerce_admin_dashboard_recent_reviews', 'wp_kama_woocommerce_admin_dashboard_recent_reviews_filter', 10, 2 );
/**
* Function for `woocommerce_admin_dashboard_recent_reviews` filter-hook.
*
* @param string $product_title The product name.
* @param \stdClass $comment The comment.
*
* @return string
*/
function wp_kama_woocommerce_admin_dashboard_recent_reviews_filter( $product_title, $comment ){
// filter...
return $product_title;
}
- $product_title(string)
- The product name.
- $comment(\stdClass)
- The comment.
Changelog
| Since 2.1.0 | Introduced. |
Where the hook is called
woocommerce_admin_dashboard_recent_reviews
woocommerce/includes/admin/class-wc-admin-dashboard.php 460
$product_title = apply_filters( 'woocommerce_admin_dashboard_recent_reviews', $comment->post_title, $comment );