WC_Product_Variable::has_optionspublicWC 3.0.0

Returns whether or not the product has additional options that need selecting before adding to cart.

Method of the class: WC_Product_Variable{}

Hooks from the method

Returns

true|false.

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->has_options();

Changelog

Since 3.0.0 Introduced.

WC_Product_Variable::has_options() code WC 10.7.0

public function has_options() {
	return apply_filters( 'woocommerce_product_has_options', true, $this );
}