@@ 1530-1532 (lines=3) @@ | ||
1527 | public function get_image( $size = 'shop_thumbnail', $attr = array(), $placeholder = true ) { |
|
1528 | if ( has_post_thumbnail( $this->id ) ) { |
|
1529 | $image = get_the_post_thumbnail( $this->id, $size, $attr ); |
|
1530 | } elseif ( ( $parent_id = wp_get_post_parent_id( $this->id ) ) && has_post_thumbnail( $parent_id ) ) { |
|
1531 | $image = get_the_post_thumbnail( $parent_id, $size, $attr ); |
|
1532 | } elseif ( $placeholder ) { |
|
1533 | $image = wc_placeholder_img( $size ); |
|
1534 | } else { |
|
1535 | $image = ''; |
@@ 365-367 (lines=3) @@ | ||
362 | $image = get_the_post_thumbnail( $this->variation_id, $size, $attr ); |
|
363 | } elseif ( has_post_thumbnail( $this->id ) ) { |
|
364 | $image = get_the_post_thumbnail( $this->id, $size, $attr ); |
|
365 | } elseif ( ( $parent_id = wp_get_post_parent_id( $this->id ) ) && has_post_thumbnail( $parent_id ) ) { |
|
366 | $image = get_the_post_thumbnail( $parent_id, $size , $attr); |
|
367 | } elseif ( $placeholder ) { |
|
368 | $image = wc_placeholder_img( $size ); |
|
369 | } else { |
|
370 | $image = ''; |