WC_Product_Variable::get_visible_children()publicWC 3.0.0

Return a products child ids - visible only.

This is lazy loaded as it's not used often and does require several queries.

Method of the class: WC_Product_Variable{}

Hooks from the method

Return

Array. Children ids

Usage

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

Changelog

Since 3.0.0 Introduced.

WC_Product_Variable::get_visible_children() code WC 8.7.0

public function get_visible_children() {
	if ( null === $this->visible_children ) {
		$children = $this->data_store->read_children( $this );
		$this->set_children( $children['all'] );
		$this->set_visible_children( $children['visible'] );
	}
	return apply_filters( 'woocommerce_get_children', $this->visible_children, $this, true );
}