get_id(), '_children', $product->get_children( 'edit' ) ) ) { $child_prices = array(); foreach ( $product->get_children( 'edit' ) as $child_id ) { $child = wc_get_product( $child_id ); if ( $child ) { $child_prices[] = $child->get_price(); } } $child_prices = array_filter( $child_prices ); delete_post_meta( $product->get_id(), '_price' ); if ( ! empty( $child_prices ) ) { add_post_meta( $product->get_id(), '_price', min( $child_prices ) ); add_post_meta( $product->get_id(), '_price', max( $child_prices ) ); } $this->extra_data_saved = true; } parent::update_post_meta( $product ); } }