WC_Product::has_childpublicWC 1.0

Returns whether or not the product has any child product.

Method of the class: WC_Product{}

No Hooks.

Returns

true|false.

Usage

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

WC_Product::has_child() code WC 10.5.0

public function has_child() {
	return 0 < count( $this->get_children() );
}