Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/SkusController.php
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | protected function skuElement($sku): ?array | ||||
if (empty($data['type'])) { | if (empty($data['type'])) { | ||||
return null; | return null; | ||||
} | } | ||||
// Use localized value, toArray() does not get them right | // Use localized value, toArray() does not get them right | ||||
$data['name'] = $sku->name; | $data['name'] = $sku->name; | ||||
$data['description'] = $sku->description; | $data['description'] = $sku->description; | ||||
unset($data['handler_class'], $data['created_at'], $data['updated_at']); | unset($data['handler_class'], $data['created_at'], $data['updated_at'], $data['fee'], $data['tenant_id']); | ||||
return $data; | return $data; | ||||
} | } | ||||
} | } |