Merge pull request #14401 from woocommerce/fix/14389

Use read_downloads in variations
This commit is contained in:
Mike Jolley 2017-04-17 11:20:14 +01:00 committed by GitHub
commit d11337706e
1 changed files with 1 additions and 1 deletions

View File

@ -65,6 +65,7 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
'reviews_allowed' => 'open' === $post_object->comment_status,
) );
$this->read_downloads( $product );
$this->read_product_data( $product );
$this->read_extra_data( $product );
$product->set_attributes( wc_get_product_variation_attributes( $product->get_id() ) );
@ -238,7 +239,6 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
'shipping_class_id' => current( $this->get_term_ids( $id, 'product_shipping_class' ) ),
'virtual' => get_post_meta( $id, '_virtual', true ),
'downloadable' => get_post_meta( $id, '_downloadable', true ),
'downloads' => array_filter( (array) get_post_meta( $id, '_downloadable_files', true ) ),
'gallery_image_ids' => array_filter( explode( ',', get_post_meta( $id, '_product_image_gallery', true ) ) ),
'download_limit' => get_post_meta( $id, '_download_limit', true ),
'download_expiry' => get_post_meta( $id, '_download_expiry', true ),