Better backwards compatibility with _woocommerce_exclude_image
As committed on master branch:
- 59db08d70b
This commit is contained in:
parent
bcc3dc2c3f
commit
86e03c1048
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue