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