WC_Product::set_length()publicWC 3.0.0

Set the product length.

Method of the class: WC_Product{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_length( $length );
$length(float|string) (required)
Total length.

Changelog

Since 3.0.0 Introduced.

WC_Product::set_length() code WC 8.6.1

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