WC_Product::has_weight()publicWC 1.0

Returns whether or not the product has weight set.

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

Хуков нет.

Возвращает

true|false.

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

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

Код WC_Product::has_weight() WC 8.7.0

public function has_weight() {
	return $this->get_weight() && ! $this->get_virtual();
}