WC_Product_Variation::get_height( string $context = 'view' )
Returns the product height.
Description Description
Parameters Parameters
- $context
-
(Optional) What the value is for. Valid values are view and edit.
Default value: 'view'
Return Return
(string)
Source Source
File: includes/class-wc-product-variation.php
public function get_height( $context = 'view' ) {
$value = $this->get_prop( 'height', $context );
// Inherit value from parent.
if ( 'view' === $context && empty( $value ) ) {
$value = apply_filters( $this->get_hook_prefix() . 'height', $this->parent_data['height'], $this );
}
return $value;
}