WC_Product_Variable::set_visible_children()publicWC 3.0.0

Sets an array of visible children only.

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_visible_children( $visible_children );
$visible_children(array) (required)
List of visible children products.

Changelog

Since 3.0.0 Introduced.

WC_Product_Variable::set_visible_children() code WC 9.3.3

public function set_visible_children( $visible_children ) {
	$this->visible_children = array_filter( wp_parse_id_list( (array) $visible_children ) );
}