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.

Хуков нет.

Возвращает

Массив. The purchasable child products keyed by ID.

Использование

wc_interactivity_api_load_purchasable_child_products( $consent_statement, $parent_id ): array;
$consent_statement(строка) (обязательный)
The consent statement acknowledging this is an experimental API.
$parent_id(int) (обязательный)
The parent product ID.

Заметки

  • Смотрите: plugins/woocommerce/client/blocks/assets/js/base/stores/woocommerce/README.md

Код wc_interactivity_api_load_purchasable_child_products() WC 11.0.1

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 );
}