CartController::sanitize_variation_data( array $variation_data, array $variable_product_attributes )
Format and sanitize variation data posted to the API.
Description Description
Labels are converted to names (e.g. Size to pa_size), and values are cleaned.
Parameters Parameters
- $variation_data
-
(Required) Key value pairs of attributes and values.
- $variable_product_attributes
-
(Required) Product attributes we're expecting.
Return Return
(array)
Source Source
File: packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php