Woocommerce 3.1.0 Compatability
This commit is contained in:
parent
ce97bab35a
commit
fef3d20771
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Single Product Thumbnails
|
||||
* Updated for Understrap to maintain Woocommerce 3.0.3 compatability.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-thumbnails.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
|
@ -13,7 +13,7 @@
|
|||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.2
|
||||
* @version 3.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -28,10 +28,9 @@ if ( $attachment_ids && has_post_thumbnail() ) {
|
|||
foreach ( $attachment_ids as $attachment_id ) {
|
||||
$full_size_image = wp_get_attachment_image_src( $attachment_id, 'full' );
|
||||
$thumbnail = wp_get_attachment_image_src( $attachment_id, 'shop_thumbnail' );
|
||||
$image_title = get_post_field( 'post_excerpt', $attachment_id );
|
||||
|
||||
$attributes = array(
|
||||
'title' => $image_title,
|
||||
'title' => get_post_field( 'post_title', $attachment_id ),
|
||||
'data-caption' => get_post_field( 'post_excerpt', $attachment_id ),
|
||||
'data-src' => $full_size_image[0],
|
||||
'data-large_image' => $full_size_image[0],
|
||||
'data-large_image_width' => $full_size_image[1],
|
||||
|
|
Reference in New Issue