DUPLICATE: Query builder - Not possible to add arguments to function in meta query

Hey there,

currently on 1.9.3.

Passing arguments in {echo:fu(arg)} in the meta query doesn’t work.

In my case I used a custom function

function get_user_company($user_id) {
    $company_id = get_user_meta($user_id, 'user_company');
    return $company_id;
}

I returns the correct value just fine when using it within a text field for example. Not so in the meta query tab.

Not sure if you consider this a bug, but I thought reporting might be a good idea.

Best wishes
Joey

Hi Joey,
Thanks so much for your report!

We are already aware of problems with “nested” dynamic data tags in several places, see: WIP: Using a variable in custom function inside a query loop doesn't work

I am closing this thread accordingly.

Best regards,
timmse

1 Like