PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.27
ووسلام – همگام سازی ووکامرس و باسلام v1.10.27
1.1.26 1.10.27 1.10.24 1.10.25 1.10.23 1.10.22 1.10.21 1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 All 60 releases
← All changes | includes/Admin/Product/Data/Handlers/SimpleProductHandler.php +8 -1 1.10.4 → 1.10.27 View file →
@@ -43,11 +43,18 @@
43 43 $name = $prefix ? "{$prefix} {$baseName}" : $baseName;
44 44 $name = $suffix ? "{$name} {$suffix}" : $name;
45 45
46 46 $attributeSuffix = $this->attributeService->getAttributeSuffix($product);
47 - if ($attributeSuffix) $name .= " ({$attributeSuffix})";
47 + if ($attributeSuffix !== null && $attributeSuffix !== '') $name .= " ({$attributeSuffix})";
48 48
49 49 return mb_substr($name, 0, 120);
50 + }
51 +
52 + public function getSku($product): ?string
53 + {
54 + $sku = trim((string) $product->get_sku());
55 +
56 + return $sku !== '' ? $sku : null;
50 57 }
51 58
52 59 public function getDescription($product): string
53 60 {