Format parent stock qty on read

Fixes #14759
This commit is contained in:
Mike Jolley 2017-05-29 10:03:35 +01:00
parent 62bcca6cce
commit f1d718d38a
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
'sku' => get_post_meta( $product->get_parent_id(), '_sku', true ),
'manage_stock' => get_post_meta( $product->get_parent_id(), '_manage_stock', true ),
'backorders' => get_post_meta( $product->get_parent_id(), '_backorders', true ),
'stock_quantity' => get_post_meta( $product->get_parent_id(), '_stock', true ),
'stock_quantity' => wc_stock_amount( get_post_meta( $product->get_parent_id(), '_stock', true ) ),
'weight' => get_post_meta( $product->get_parent_id(), '_weight', true ),
'length' => get_post_meta( $product->get_parent_id(), '_length', true ),
'width' => get_post_meta( $product->get_parent_id(), '_width', true ),