ProductSchema
ProductSchema class.
Description Description
Source Source
File: packages/woocommerce-blocks/src/StoreApi/Schemas/ProductSchema.php
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
Methods Methods
- __construct — Constructor.
- filter_valid_attribute — Returns true if the given attribute is valid.
- filter_variation_attribute — Returns true if the given attribute is valid and used for variations.
- get_attributes — Get list of product attributes and attribute terms.
- get_images — Get list of product images.
- get_item_response — Convert a WooCommerce product into an object suitable for the response.
- get_low_stock_remaining — If a product has low stock, return the remaining stock amount for display.
- get_price_function_from_tax_display_mode — WooCommerce can return prices including or excluding tax; choose the correct method based on tax display mode.
- get_price_range — Get price range from certain product types.
- get_product_quantity_limit — Get the quantity limit for an item in the cart.
- get_properties — Product schema properties.
- get_remaining_stock — Gets remaining stock amount for a product.
- get_tax_display_mode — WooCommerce can return prices including or excluding tax; choose the correct method based on tax display mode.
- get_term_list — Returns a list of terms assigned to the product.
- get_variations — Get variation IDs and attributes from the DB.
- prepare_product_attribute_taxonomy_value — Prepare an attribute term for the response.
- prepare_product_attribute_value — Prepare an attribute term for the response.
- prepare_product_price_response — Get an array of pricing data.