WC_Product_Variable::set_children()publicWC 3.0.0

Sets an array of children for the product.

Method of the class: WC_Product_Variable{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->set_children( $children );
$children(array) (required)
Children products.

Changelog

Since 3.0.0 Introduced.

WC_Product_Variable::set_children() code WC 9.4.2

public function set_children( $children ) {
	$this->children = array_filter( wp_parse_id_list( (array) $children ) );
}