WordPress at Your Fingertips
function is not described

WC_Product_Variable::get_children() public WC 1.0

Return a products child ids.

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_children( $visible_only );
$visible_only(true|false|string)
Visible only.
Default: ''

Code of WC_Product_Variable::get_children() WC 5.7.1

public function get_children( $visible_only = '' ) {
	if ( is_bool( $visible_only ) ) {
		wc_deprecated_argument( 'visible_only', '3.0', 'WC_Product_Variable::get_visible_children' );

		return $visible_only ? $this->get_visible_children() : $this->get_children();
	}

	if ( null === $this->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->children, $this, false );
}