diff --git a/admin/post-types/writepanels/order-item-html.php b/admin/post-types/writepanels/order-item-html.php
index c985a1ee748..e3d00760ba4 100644
--- a/admin/post-types/writepanels/order-item-html.php
+++ b/admin/post-types/writepanels/order-item-html.php
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( $_product->get_sku() )
echo '
' . __( 'Product SKU:', 'woocommerce' ).' ' . esc_html( $_product->get_sku() );
- ?>">get_image(); ?>
+ ?>">get_image( 'shop_thumbnail', array( 'title' => '' ) ); ?>
diff --git a/classes/abstracts/abstract-wc-product.php b/classes/abstracts/abstract-wc-product.php
index b7aa545774a..c88cc3b5d63 100644
--- a/classes/abstracts/abstract-wc-product.php
+++ b/classes/abstracts/abstract-wc-product.php
@@ -1193,15 +1193,15 @@ abstract class WC_Product {
* @param string $size (default: 'shop_thumbnail')
* @return string
*/
- function get_image( $size = 'shop_thumbnail' ) {
+ function get_image( $size = 'shop_thumbnail', $attr = array() ) {
global $woocommerce;
$image = '';
if ( has_post_thumbnail( $this->id ) ) {
- $image = get_the_post_thumbnail( $this->id, $size );
+ $image = get_the_post_thumbnail( $this->id, $size, $attr );
} elseif ( ( $parent_id = wp_get_post_parent_id( $this->id ) ) && has_post_thumbnail( $parent_id ) ) {
- $image = get_the_post_thumbnail( $parent_id, $size );
+ $image = get_the_post_thumbnail( $parent_id, $size, $attr );
} else {
$image = woocommerce_placeholder_img( $size );
}
diff --git a/classes/class-wc-product-variation.php b/classes/class-wc-product-variation.php
index e48d19f83cb..415dd6b0655 100644
--- a/classes/class-wc-product-variation.php
+++ b/classes/class-wc-product-variation.php
@@ -289,17 +289,17 @@ class WC_Product_Variation extends WC_Product {
* @param string $size (default: 'shop_thumbnail')
* @return string
*/
- function get_image( $size = 'shop_thumbnail' ) {
+ function get_image( $size = 'shop_thumbnail', $attr = array() ) {
global $woocommerce;
$image = '';
if ( $this->variation_id && has_post_thumbnail( $this->variation_id ) ) {
- $image = get_the_post_thumbnail( $this->variation_id, $size );
+ $image = get_the_post_thumbnail( $this->variation_id, $size, $attr );
} elseif ( has_post_thumbnail( $this->id ) ) {
- $image = get_the_post_thumbnail( $this->id, $size );
+ $image = get_the_post_thumbnail( $this->id, $size, $attr );
} elseif ( $parent_id = wp_get_post_parent_id( $this->id ) && has_post_thumbnail( $parent_id ) ) {
- $image = get_the_post_thumbnail( $parent_id, $size );
+ $image = get_the_post_thumbnail( $parent_id, $size , $attr);
} else {
$image = woocommerce_placeholder_img( $size );
}
|