WC_Product_Variation::get_length()
Returns the product length.
Method of the class: WC_Product_Variation{}
Hooks from the method
Return
String
.
Usage
$WC_Product_Variation = new WC_Product_Variation(); $WC_Product_Variation->get_length( $context );
- $context(string)
- What the value is for. Valid values are view and edit.
Default: 'view'
WC_Product_Variation::get_length() WC Product Variation::get length code WC 9.7.1
public function get_length( $context = 'view' ) { $value = $this->get_prop( 'length', $context ); // Inherit value from parent. if ( 'view' === $context && empty( $value ) ) { $value = apply_filters( $this->get_hook_prefix() . 'length', $this->parent_data['length'], $this ); } return $value; }