Hello @Neil_Randle and @ppe29,
The updated PHP code to fix the issue is this:
// Woo Thumbnails Fix
// =============================================================================
function b_woocommerce_shop_product_thumbnails() {
GLOBAL $product;
$id = get_the_ID();
$thumb = 'woocommerce_thumbnail';
$rating = ( function_exists( 'wc_get_rating_html' ) ) ? wc_get_rating_html( $product->get_average_rating() ) : $product->get_rating_html();
woocommerce_show_product_sale_flash();
echo '<div class="entry-featured">';
echo '<a href="' . get_the_permalink() . '">';
echo has_post_thumbnail() ? get_the_post_thumbnail( $id, $thumb ) : '<img src="' . b_woocommerce_shop_placeholder_thumbnail() . '" class="x-shop-placeholder-thumbnail">';
if ( ! empty( $rating ) ) {
echo '<div class="star-rating-container aggregate">' . $rating . '</div>';
}
echo '</a>';
echo "</div>";
}
function b_woocommerce_shop_placeholder_thumbnail() {
$placeholder = x_get_option( 'x_woocommerce_shop_placeholder_thumbnail' );
if ( empty( $placeholder ) && function_exists( 'cornerstone_make_placeholder_image_uri' ) ) {
$sizes = wp_get_additional_image_sizes();
$image_size = apply_filters( 'single_product_archive_thumbnail_size', 'woocommerce_thumbnail' );
$size = isset($sizes[$image_size]) ? $sizes[$image_size] : array( 'height' => 300, 'width' => 300 );
$placeholder = cornerstone_make_placeholder_image_uri( 'transparent', $size['height'], $size['width'] );
}else{
$image_url = cs_resolve_image_source( $placeholder, 'woocommerce_thumbnail');
$placeholder = $image_url;
}
return $placeholder;
}
add_filter('init', function() {
remove_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_product_thumbnails', 10 );
});
add_action( 'woocommerce_before_shop_loop_item_title', 'b_woocommerce_shop_product_thumbnails', 10 );
// =============================================================================
//End
This has been reported as a bug so that our developers are aware of the issue. Hopefully this can be fixed in the newer versions of the theme.
Thanks for your understanding.