PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.21
ووسلام – همگام سازی ووکامرس و باسلام v1.10.21
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 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 All 54 releases
← All changes | includes/Admin/Product/Data/ProductDataBuilder.php +2 -1 1.9.01.10.21 View file →
@@ -33,9 +33,9 @@
33 33 public function fromWooProduct(int $productId): self
34 34 {
35 35 $product = wc_get_product($productId);
36 36
37 - if (!$product) throw new \InvalidArgumentException("Product with ID {$productId} not found");
37 + if (!$product) throw new \InvalidArgumentException(esc_html("Product with ID {$productId} not found"));
38 38
39 39 // Validate product first
40 40 if ($this->validator) $this->validator->validate($product);
41 41
@@ -68,8 +68,9 @@
68 68 private function initializeData(): void
69 69 {
70 70 $this->data = [
71 71 'name' => '',
72 + 'sku' => null,
72 73 'description' => '',
73 74 'category_id' => null,
74 75 'category_ids' => [],
75 76 'primary_price' => null,