Tell me: in the file single-product.js there is such code:
// Star ratings for comments .on( 'init', '#rating', function() { $( '#rating' ).hide().before( '<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>' ); }) This code hides the select list and instead of a list of stars in the new block.
How can I undo this action? Those. so that the select list does not hide, and the new block is not created.
This js handler is in the folder with the woocommerce plugin. It can not be rewritten so that when updating the plug-in nothing is broken.
The <select> list that is hidden by the js handler looks like this:
<select name="rating" id="rating" aria-required="true" required style="display: none;"> Or tell me, how can I replace the block that the js-handler inserts ( <p class="stars">... )? Ie, how to insert <p class="stars"... instead <p class="stars"... another block, but in order to take into account product ratings remain workable?
How to correctly replace the feedback code with your own code and your own design? All code is in the comment_form () function, which passes parameters. It turns out you need to completely override this function?
id="rating"? - teran<select name="rating" id="rating" aria-required="true" required="" style="display: none;">- wordselectlooks. How critical it is for him to haveid="rating", because only because of this attribute does he hide and add asterisks. If you delete this part, the list will remain original - teranclass="no-stars", and in the handler, exclude iton('init', '#rating:not(.no-stars)', ..- teran