Merge pull request #15334 from woocommerce/fix/15322
Ensure we have child before getting price
This commit is contained in:
commit
7f4c650c87
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue