CART: Order projects #25

Merged
akrdzic merged 10 commits from order-projects into master 2018-09-26 16:13:05 +02:00
Showing only changes of commit e1a1b4dc49 - Show all commits

View File

@@ -62,16 +62,16 @@ class Wiaas_Order_Project {
return array(); return array();
} }
$available_terms = array_filter($all_terms, function($term) { foreach ($all_terms as $term) {
return self::is_order_project_available($term->term_id); if (self::is_order_project_available($term->term_id)) {
}); $available_terms[] = array(
return array_map(function($term) {
return array(
'id' => $term->term_id, 'id' => $term->term_id,
'name' => $term->name 'name' => $term->name
); );
}, $available_terms); }
}
return $available_terms;
} }
/** /**