get_meta( self::META ); if ( '' === $type && $product->get_parent_id() ) { $parent = wc_get_product( $product->get_parent_id() ); $type = $parent ? (string) $parent->get_meta( self::META ) : ''; } if ( ! in_array( $type, self::TYPES, true ) ) { $type = $product->needs_shipping() ? Line::GOODS : Line::DIGITAL; } $filtered = apply_filters( 'vatright_supply_type', $type, $product ); return in_array( $filtered, self::TYPES, true ) ? $filtered : $type; } }