WC_Product::has_weight
Returns whether or not the product has weight set.
Method of the class: WC_Product{}
No Hooks.
Returns
true|false.
Usage
$WC_Product = new WC_Product(); $WC_Product->has_weight();
WC_Product::has_weight() WC Product::has weight code WC 10.5.0
public function has_weight() {
return $this->get_weight() && ! $this->get_virtual();
}