Post id property is obviously ID, not id

This commit is contained in:
Coen Jacobs 2013-05-13 11:42:10 +02:00
parent b4b3d1c790
commit ecb5edc9bd
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ function woocommerce_product_images_box() {
$product_image_gallery = get_post_meta( $post->ID, '_product_image_gallery', true );
} else {
// Backwards compat
$attachment_ids = get_posts( 'post_parent=' . $post->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 = get_posts( 'post_parent=' . $post->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() ) );
$product_image_gallery = implode( ',', $attachment_ids );
}