woocommerce 3.6.1 template changes
This commit is contained in:
parent
a28c44d0ec
commit
c500160d12
|
@ -11,18 +11,17 @@
|
||||||
* the readme will list any important changes.
|
* the readme will list any important changes.
|
||||||
*
|
*
|
||||||
* @see https://docs.woocommerce.com/document/template-structure/
|
* @see https://docs.woocommerce.com/document/template-structure/
|
||||||
* @author WooThemes
|
|
||||||
* @package WooCommerce/Templates
|
* @package WooCommerce/Templates
|
||||||
* @version 3.1.0
|
* @version 3.6.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly.
|
||||||
}
|
}
|
||||||
|
|
||||||
global $product;
|
global $product;
|
||||||
|
|
||||||
if ( 'no' === get_option( 'woocommerce_enable_review_rating' ) ) {
|
if ( ! wc_review_ratings_enabled() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,8 +32,12 @@ $average = $product->get_average_rating();
|
||||||
if ( $rating_count > 0 ) : ?>
|
if ( $rating_count > 0 ) : ?>
|
||||||
|
|
||||||
<div class="woocommerce-product-rating">
|
<div class="woocommerce-product-rating">
|
||||||
<?php echo wc_get_rating_html( $average, $rating_count ); ?>
|
<?php echo wc_get_rating_html( $average, $rating_count ); // WPCS: XSS ok. ?>
|
||||||
<?php if ( comments_open() ) : ?><a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'understrap' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a><?php endif ?>
|
<?php if ( comments_open() ) : ?>
|
||||||
|
<?php //phpcs:disable ?>
|
||||||
|
<a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'understrap' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a>
|
||||||
|
<?php // phpcs:enable ?>
|
||||||
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Reference in New Issue