ver. 0.322: fix custom_fields — jawne mapowanie kluczy w ProductRepository, spójne !empty w ProductsApiController

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 14:11:50 +01:00
parent b7521686e5
commit 2c663e740b
3 changed files with 12 additions and 3 deletions

View File

@@ -507,7 +507,7 @@ class ProductsApiController
continue;
}
$d['custom_field_name'][] = (string)$cf['name'];
$d['custom_field_type'][] = isset($cf['type']) ? (string)$cf['type'] : 'text';
$d['custom_field_type'][] = !empty($cf['type']) ? (string)$cf['type'] : 'text';
$d['custom_field_required'][] = !empty($cf['is_required']) ? 1 : 0;
}
}