CartItemSchema
CartItemSchema class.
Description Description
Source Source
File: packages/woocommerce-blocks/src/StoreApi/Schemas/CartItemSchema.php
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
Methods Methods
- format_item_data_element — Remove HTML tags from cart item data and set the `hidden` property to `__experimental_woocommerce_blocks_hidden`.
- format_variation_data — Format variation data, for example convert slugs such as attribute_pa_size to Size.
- get_item_data — Format cart item data removing any HTML tag.
- get_item_response — Convert a WooCommerce cart item to an object suitable for the response.
- get_properties — Cart schema properties.
- get_remaining_stock — Returns the remaining stock for a product if it has stock.
- prepare_product_price_response — Get an array of pricing data.