WC_Product::is_virtual()publicWC 1.0

Checks if a product is virtual (has no shipping).

Method of the class: WC_Product{}

Hooks from the method

Return

true|false.

Usage

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

WC_Product::is_virtual() code WC 8.7.0

public function is_virtual() {
	return apply_filters( 'woocommerce_is_virtual', true === $this->get_virtual(), $this );
}