use helpers

This commit is contained in:
Mike Jolley 2017-02-17 15:52:47 +00:00
parent 6201c7e22b
commit 1b268d2f63
1 changed files with 2 additions and 2 deletions

View File

@ -251,8 +251,8 @@ class WC_Product_Variable extends WC_Product {
'display_price' => wc_get_price_to_display( $variation ), 'display_price' => wc_get_price_to_display( $variation ),
'display_regular_price' => wc_get_price_to_display( $variation, array( 'price' => $variation->get_regular_price() ) ), 'display_regular_price' => wc_get_price_to_display( $variation, array( 'price' => $variation->get_regular_price() ) ),
'dimensions' => wc_format_dimensions( $variation->get_dimensions( false ) ), 'dimensions' => wc_format_dimensions( $variation->get_dimensions( false ) ),
'min_qty' => 1, 'min_qty' => $variation->get_min_purchase_quantity(),
'max_qty' => $variation->backorders_allowed() ? '' : $variation->get_stock_quantity(), 'max_qty' => $variation->get_max_purchase_quantity(),
'backorders_allowed' => $variation->backorders_allowed(), 'backorders_allowed' => $variation->backorders_allowed(),
'is_in_stock' => $variation->is_in_stock(), 'is_in_stock' => $variation->is_in_stock(),
'is_downloadable' => $variation->is_downloadable(), 'is_downloadable' => $variation->is_downloadable(),