PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / templates / elementor / single-product / rating.php

rating.php in ShopBuilder – WooCommerce Builder For Elementor 3.2.6, at templates/elementor/single-product/rating.php

39 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template variables:
4 *
5 * @var $controllers array settings as array
6 * @var $content string
7 */
8
9 // Do not allow directly accessing this file.
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit( 'This script cannot be accessed directly.' );
12 }
13
14 use RadiusTheme\SB\Helpers\Fns;
15
16 global $product;
17 if ( empty( $product ) ) {
18 return;
19 }
20
21 if ( ! wc_review_ratings_enabled() ) {
22 return;
23 }
24
25 $rating_count = $product->get_rating_count();
26 $review_count = $product->get_review_count();
27 $average = $product->get_average_rating();
28 ?>
29 <div class="rtsb-product-rating">
30 <div class="woocommerce-product-rating">
31 <?php Fns::print_html( wc_get_rating_html( $average, $rating_count ) ); ?>
32 <?php if ( comments_open() ) : ?>
33 <?php //phpcs:disable ?>
34 <a href="#comments" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'shopbuilder' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a>
35 <?php // phpcs:enable ?>
36 <?php endif ?>
37 </div>
38 </div>
39