Thank you very much. You just made my day!
This part solved my problem in Samuel Wood’s comment:
But, you don’t want to replace the hash, you only want to replace the = with a LIKE. So, search for meta_key = ‘locations_
instead. See how I left off the % there? Now you can find it and replace it. Simple.
I have the same problem since the latest WP updrade to 4.8.3.
I use placeholder and I do not use the esc_url() function in my code and the % placeholder is being replaced with something not usable.
Example:
This is being replaced
array(
'relation' => 'OR',
array(
'key' => 'charte_de_prix_contenu_%_promos_fin',
'value' => '',
'compare' => '=',
),
array(
'key' => 'charte_de_prix_contenu_%_promos_fin',
'value' => date( "Ymd" ),
'compare' => '>=',
),
),
with this
meta_key = 'charte_de_prix_contenu_{47d84f1ee58a81956d53c64e8fafb5526c536eecab2be9c113fc33e7e9c86fba}_promos_fin' AND