I have a basic question that has always stumped me. I’m trying to move the Star Rating into the comment meta, which will help me style it. Here’s the template file review.php
section:
<div class="comment-text">
<?php
/**
* The woocommerce_review_before_comment_meta hook.
*
* @hooked woocommerce_review_display_rating - 10 //Want to unhook this.
*/
do_action('woocommerce_review_before_comment_meta', $comment);
/**
* The woocommerce_review_meta hook.
*
* @hooked woocommerce_review_display_meta - 10
*/
do_action('woocommerce_review_meta', $comment);
do_action('woocommerce_review_before_comment_text', $comment);
/**
* The woocommerce_review_comment_text hook
*
* @hooked woocommerce_review_display_comment_text - 10
*/
do_action('woocommerce_review_comment_text', $comment);
do_action('woocommerce_review_after_comment_text', $comment);
?>
</div>
I was thinking I could add the following to my functions.php:
remove_action('woocommerce_review_display_rating', 10);
And add it back in the review-meta.php, but I can’t remove / unhook the star rating. What am I doing wrong?