WC_Product::set_widthpublicWC 3.0.0

Set the product width.

Method of the class: WC_Product{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_width( $width );
$width(float|string) (required)
Total width.

Changelog

Since 3.0.0 Introduced.

WC_Product::set_width() code WC 10.6.2

public function set_width( $width ) {
	$this->set_prop( 'width', '' === $width ? '' : wc_format_decimal( $width ) );
}