← All changes
|
includes/Admin/Product/Data/Handlers/SimpleProductHandler.php
+7
-0
1.9.2
→
1.10.20
View file →
| @@ -48,8 +48,15 @@ | ||
| 48 | 48 | |
| 49 | 49 | return mb_substr($name, 0, 120); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | + public function getSku($product): ?string | |
| 53 | + { | |
| 54 | + $sku = trim((string) $product->get_sku()); | |
| 55 | + | |
| 56 | + return $sku !== '' ? $sku : null; | |
| 57 | + } | |
| 58 | + | |
| 52 | 59 | public function getDescription($product): string |
| 53 | 60 | { |
| 54 | 61 | return $this->attributeService->generateDescription($product); |
| 55 | 62 | } |