| @@ -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 = []; |