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 | api/Taxonomy.php +16 -0 1.3.25 → 1.6.5 View file →
@@ -91,8 +91,24 @@
91 91 $formattedTerms[] = &$term;
92 92 }
93 93 }
94 94
95 + // $parents narrows the response to the requested parent terms — each
96 + // requested node is returned at the top level with its subtree attached.
97 + // The parameter was accepted but never read: callers passing parent ids
98 + // (products/fetch-term-by-parent) got the full unconstrained tree back.
99 + // null keeps the full tree, which is what every other caller passes.
100 + if (!empty($parents)) {
101 + $requestedTerms = [];
102 + foreach ((array) $parents as $parentTermId) {
103 + $parentTermId = (int) $parentTermId;
104 + if (isset($termMap[$parentTermId])) {
105 + $requestedTerms[] = $termMap[$parentTermId];
106 + }
107 + }
108 + $formattedTerms = $requestedTerms;
109 + }
110 +
95 111 // Mark prefilled terms as selected
96 112 // Adds a selected key if the term ID is found in $prefilled.
97 113 if (!empty($prefilled)) {
98 114 foreach ($formattedTerms as &$term) {