wc_interactivity_api_load_product()
Load a product into the interactivity API state.
This is an experimental API and may change in future versions.
Хуков нет.
Возвращает
Массив. The product data.
Использование
wc_interactivity_api_load_product( $consent_statement, $product_id ): array;
- $consent_statement(строка) (обязательный)
- The consent statement acknowledging this is an experimental API.
- $product_id(int) (обязательный)
- The product ID to load.
Заметки
- Смотрите: plugins/woocommerce/client/blocks/assets/js/base/stores/woocommerce/README.md
Код wc_interactivity_api_load_product() wc interactivity api load product WC 10.9.1
function wc_interactivity_api_load_product( string $consent_statement, int $product_id ): array {
return ProductsStore::load_product( $consent_statement, $product_id );
}