WordPress at Your Fingertips
function is not described

WC_Product_Variable::get_visible_children() public WC 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.

{} It's a 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.

Code of WC_Product_Variable::get_visible_children() WC 5.8.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 );
}