PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Modules/MCP/Tools/ProductTools.php +3 -4 1.5.5 → 1.6.5 View file →
@@ -258,10 +258,9 @@
258 258 'variation_type' => $detail ? $detail->variation_type : null,
259 259 'stock_status' => $detail ? $detail->stock_availability : null,
260 260 'price_range' => self::priceRange($detail),
261 261 'variations' => self::variations($product),
262 - 'categories' => self::terms($product, 'categories'),
263 - 'tags' => self::terms($product, 'tags'),
262 + 'categories' => self::terms($product),
264 263 'created_at' => MCPHelper::toIso8601($product->post_date_gmt ? $product->post_date_gmt : $product->post_date),
265 264 ];
266 265
267 266 if (in_array('sales', $include, true)) {
@@ -307,12 +306,12 @@
307 306 }
308 307 return $out;
309 308 }
310 309
311 - private static function terms($product, $which)
310 + private static function terms($product)
312 311 {
313 312 try {
314 - $terms = $which === 'tags' ? $product->getTags() : $product->getCategories();
313 + $terms = $product->getCategories();
315 314 } catch (\Throwable $e) {
316 315 return [];
317 316 }
318 317 $out = [];