WordPress at Your Fingertips
function is not described

WC_Product::set_length() public WC 3.0.0

Set the product length.

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

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_length() WC 5.5.2

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