WordPress at Your Fingertips
function is not described

WC_Product::set_width() public WC 3.0.0

Set the product width.

{} It's a method of the class: WC_Product{}

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_width() WC 5.5.2

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