fix: get meta_label #576

This commit is contained in:
vnmedeiros 2021-11-10 16:19:58 -03:00
parent 40784fc98d
commit 2ac91054db
1 changed files with 2 additions and 2 deletions

View File

@ -462,8 +462,8 @@ class REST_Items_Controller extends REST_Controller {
continue;
$meta_id = $meta['key'];
$meta_value = $meta['value'];
$meta_label = isset($meta['label']) ? $meta['label'] : $meta['value'];
$meta_value = is_array($meta['value']) ? $meta['value'] : [$meta['value']];
$meta_label = isset($meta['label']) ? $meta['label'] : $meta_value;
$filter = $this->filters_repository->fetch([
'meta_query' => array(