Hello
My website has slightly messed up when I updated the Parent theme.
This is because I had made changes to the XSTORE parent theme folder- i am aware XSTORE and WordPress doesn’t recommend this and xstore says to modify the CHILD instead.
The file I have modified is in the PARENT theme folder (WP-Content > Theme > XSTORE > WooCommerce > Loop)
Is there a way to add this file to the CHILD folder? So next time I update the parent Theme there wouldn’t be this issue? The code for this file is below
Thanks
The code for the file i created in WP-Content > Themes > XSTORE > WooCommerce > Loop:
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $product;
if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' ) {
return;
}
$rating_count = $product->get_rating_count();
$review_count = $product->get_review_count();
$average = $product->get_average_rating();
if ( $rating_count > 0 ) : ?>
<?php echo wc_get_rating_html($average, $rating_count); ?>
<?php if ( comments_open() ): ?><a href="<?php echo get_permalink() ?>#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s',$review_count,'woocommerce' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a><?php endif ?>
<?php endif; ?>