diff --git a/classes/abstracts/abstract-wc-product.php b/classes/abstracts/abstract-wc-product.php index 846cc08d8d0..ce56cf29825 100644 --- a/classes/abstracts/abstract-wc-product.php +++ b/classes/abstracts/abstract-wc-product.php @@ -108,7 +108,8 @@ class WC_Product { function get_gallery_attachment_ids() { if ( ! isset( $this->product_image_gallery ) ) { // Backwards compat - $attachment_ids = array_diff( get_posts( 'post_parent=' . $this->id . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids' ), array( get_post_thumbnail_id() ) ); + $attachment_ids = get_posts( 'post_parent=' . $this->id . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids&meta_key=_woocommerce_exclude_image&meta_value=0' ); + $attachment_ids = array_diff( $attachment_ids, array( get_post_thumbnail_id() ) ); $this->product_image_gallery = implode( ',', $attachment_ids ); } diff --git a/readme.txt b/readme.txt index 6cc5f76caa0..2abe760117b 100644 --- a/readme.txt +++ b/readme.txt @@ -173,6 +173,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Fix - PayPal button should use classes 'button' and 'alt', not 'button-alt' * Fix - Have the remove_taxes() method set subtotal to subtotal_ex_tax * Fix - Allow layered nav to work with non pa_ prepended taxonomies +* Fix - Better backwards compatibility with _woocommerce_exclude_image = 2.0.9 - 02/05/2013 = * Feature - Added is_product_taxonomy() conditonal.