From db39c223b09031cd83c9cb99d69de59391b8bfe7 Mon Sep 17 00:00:00 2001 From: Eivin Landa Date: Fri, 29 Jan 2016 14:58:12 +0100 Subject: [PATCH] Added code to use the get_price method for child products. fixes #10217 --- includes/class-wc-product-grouped.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-product-grouped.php b/includes/class-wc-product-grouped.php index 944046ec20e..a8a25459bdf 100644 --- a/includes/class-wc-product-grouped.php +++ b/includes/class-wc-product-grouped.php @@ -133,8 +133,10 @@ class WC_Product_Grouped extends WC_Product { $tax_display_mode = get_option( 'woocommerce_tax_display_shop' ); $child_prices = array(); - foreach ( $this->get_children() as $child_id ) - $child_prices[] = get_post_meta( $child_id, '_price', true ); + foreach ( $this->get_children() as $child_id ) { + $child = wc_get_product( $child_id ); + $child_prices[] = $child->get_price(); + } $child_prices = array_unique( $child_prices ); $get_price_method = 'get_price_' . $tax_display_mode . 'uding_tax';