Problema com as avalia??es pag Loja
-
Meu tema atual n?o permite que os comentários sejam visíveis na página da loja woocommerce. Ent?o eu adicionei um ghancho em php para adicionar esta op??o. Mas quando a pessoa avalia o produto, acrescenta a avalia??o padr?o do tema. Ent?o as 2 caixas com estrelas aparecem na loja.
Código.
add_action('woocommerce_shop_loop_item_title', 'add_star_rating' ); function add_star_rating() { global $woocommerce, $product; $average = $product->get_average_rating(); echo '<div class="star-rating"><span style="width:'.( ( $average / 5 ) * 100 ) . '%"><strong itemprop="ratingValue" class="rating">'.$average.'</strong> '.__( 'out of 5', 'woocommerce' ).'</span></div>'; }
- This topic was modified 2 years, 5 months ago by . Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problema com as avalia??es pag Loja’ is closed to new replies.