| @@ -116,8 +116,13 @@ | ||
| 116 | 116 | $variantFields = [ |
| 117 | 117 | 'id' => true, |
| 118 | 118 | 'primary_price' => true, |
| 119 | 119 | 'stock' => true, |
| 120 | + // Product PATCH identifies a variant by its properties. Keep | |
| 121 | + // those properties as identity data even in the limited mode; | |
| 122 | + // they are not mutable fields, and the API's variants schema | |
| 123 | + // requires them when the single product endpoint is used. | |
| 124 | + 'properties' => true, | |
| 120 | 125 | ]; |
| 121 | 126 | |
| 122 | 127 | $restricted['variants'] = array_map(function ($variant) use ($variantFields) { |
| 123 | 128 | return is_array($variant) ? array_intersect_key($variant, $variantFields) : []; |