WC_Product_Variable::set_visible_children()publicWC 3.0.0

Sets an array of visible children only.

{} It's a method of the class: WC_Product_Variable{}

No Hooks.

Return

null. Nothing.

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.

Code of WC_Product_Variable::set_visible_children() WC 6.8.2

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