Aug 04, 2025 7:01 am
4 Replies
Aug 04, 2025 1:27 pm
Hi @zo-zo-lee
Check these links out, please.
https://wpdiscuz.com/docs/codex/filters/wpdiscuz_half_star_svg/
https://wpdiscuz.com/docs/codex/filters/wpdiscuz_full_star_svg/
Aug 05, 2025 1:33 am
Thank you!
However, the actual product rating should still be stars. Is there a way to change just one custom rating field.
Aug 05, 2025 3:38 pm
You can use the provided hooks and do something like this
add_filter('wpdiscuz_full_star_svg', function ($svg, $type, $icon) { if ($icon === 'fas fa-square') { $svg = '<svg width="100" height="100" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 10 H90 V90 H10 Z" fill="none" class="wpd-star"/></svg>'; } return $svg; }, 10, 3); add_filter('wpdiscuz_half_star_svg', function ($svg, $type, $icon) { if ($icon === 'fas fa-square') { $svg = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 10 H90 V90 H10 Z" fill="none" class="wpd-star"/><path d="M10 10 H17 V90 H10 Z" fill="none" class="wpd-star wpd-active"/></svg>'; } return $svg; }, 10, 3);
Aug 07, 2025 4:02 am
Ahh, now I get it. Thank you so much! 😊