WC_Product_Variation::get_height PHP Method

get_height() public method

Returns the product height.
public get_height ( string $context = 'view' ) : string
$context string
return string
    public function get_height($context = 'view')
    {
        $value = $this->get_prop('height', $context);
        // Inherit value from parent.
        if ('view' === $context && empty($value)) {
            $value = $this->parent_data['height'];
        }
        return $value;
    }