WC_Product::has_dimensions │ public │ WC 1.0

Returns whether or not the product has dimensions set.

Метод класса: WC_Product{}

Хуков нет.

Возвращает

bool.

Использование

$WC_Product = new WC_Product();
$WC_Product->has_dimensions();

Код WC_Product::has_dimensions() WC 11.1.2

public function has_dimensions() {
	return ( $this->get_length() || $this->get_height() || $this->get_width() ) && ! $this->get_virtual();
}