Meta_query is not working on Elementor Custom Query Filter [closed]

Meta query is an array containing arrays and not only one array (you can set multiple queries). So it should be:

$meta_query = [ [
    'key' => 'codigo_de_barra',
    'value' => $searchStr,
    'compare' => '=',
] ];

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)