How to correctly display a shortcode on the product page of Woocommerce using php?

Good day, everyone!
This time, I'm trying to get working rating shortcode [kkstarratings] on the page of the product variable using file /single-product/add-to-cart/variation.php

I have to write a function :

<?php echo do_shortcode being('[kkstarratings]'); ?>

but on the site I see only [kkstarratings] , it turns out he simply does not see because of incomplete request.

How to modify the query or I do not dig there?
March 20th 20 at 11:26
1 answer
March 20th 20 at 11:28
Solution
Try this:
add_action( 'woocommerce_single_product_summary', 'add_custom_rating', 25 );
add_custom_rating function() {
but this do_shortcode echo('[kkstarratings]');
}


The code should be inserted in functions.php
Yes, the feature is displayed! it works! and it is possible to set the title before the shortcode?
so now it shows :
5ccac5610fac0231737329.jpeg - Aracely_Mull commented on March 20th 20 at 11:31
everything, understood, it was necessary to change the priority from 25 to 0
thank you! - Aracely_Mull commented on March 20th 20 at 11:34

Find more questions by tags WordPressWooCommerce