fix: custom fields - type/is_required przy kopiowaniu produktu + obsługa obrazków w koszyku
ProductRepository: kopiowanie custom fields uwzględnia pola type i is_required. product-custom-fields.php: ochrona XSS, obsługa pola image, fallback typu na text. SonarQube 0.343: nowe issues dodane do TODO.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1751,8 +1751,10 @@ class ProductRepository
|
||||
if ( \Shared\Helpers\Helpers::is_array_fix( $customFields ) ) {
|
||||
foreach ( $customFields as $row ) {
|
||||
$this->db->insert( 'pp_shop_products_custom_fields', [
|
||||
'id_product' => $newProductId,
|
||||
'name' => $row['name'],
|
||||
'id_product' => $newProductId,
|
||||
'name' => $row['name'],
|
||||
'type' => $row['type'] ?? 'text',
|
||||
'is_required' => $row['is_required'] ?? 0,
|
||||
] );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user