Merge pull request #15334 from woocommerce/fix/15322

Ensure we have child before getting price
This commit is contained in:
Claudio Sanches 2017-05-29 12:02:01 -03:00 committed by GitHub
commit 7f4c650c87
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class WC_Product_Grouped extends WC_Product {
foreach ( $this->get_children() as $child_id ) {
$child = wc_get_product( $child_id );
if ( '' !== $child->get_price() ) {
if ( $child && '' !== $child->get_price() ) {
$child_prices[] = 'incl' === $tax_display_mode ? wc_get_price_including_tax( $child ) : wc_get_price_excluding_tax( $child );
}
}