wc_interactivity_api_load_purchasable_child_products()WC 1.0

Load all purchasable child products of a parent product into the interactivity API state.

This is an experimental API and may change in future versions.

No Hooks.

Returns

Array. The purchasable child products keyed by ID.

Usage

wc_interactivity_api_load_purchasable_child_products( $consent_statement, $parent_id ): array;
$consent_statement(string) (required)
The consent statement acknowledging this is an experimental API.
$parent_id(int) (required)
The parent product ID.

wc_interactivity_api_load_purchasable_child_products() code WC 10.7.0

function wc_interactivity_api_load_purchasable_child_products( string $consent_statement, int $parent_id ): array {
	return ProductsStore::load_purchasable_child_products( $consent_statement, $parent_id );
}