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.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.