WordPress at Your Fingertips
function is not described

WC_Product_Variation::get_width() public WC 1.0

Returns the product width.

{} It's a 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_width( $context );
$context(string)
What the value is for. Valid values are view and edit.
Default: 'view'

Code of WC_Product_Variation::get_width() WC 5.7.0

public function get_width( $context = 'view' ) {
	$value = $this->get_prop( 'width', $context );

	// Inherit value from parent.
	if ( 'view' === $context && empty( $value ) ) {
		$value = apply_filters( $this->get_hook_prefix() . 'width', $this->parent_data['width'], $this );
	}
	return $value;
}