Site icon Hip-Hop Website Design and Development

WordPress Woocommerce REST API JSON Error

I’ve an issue with Relaxation Api, I’m utilizing Automattic Woocommerce Relaxation Api to go looking classes, I get this error:

PHP Deadly error:  Uncaught AutomatticWooCommerceHttpClientHttpClientException: JSON ERROR: Syntax error

That is my preliminary for api

$woocommerce = new Consumer(
    'https://area',
    'ck_xxxxxxxxxxxxx',
    'cs_xxxxxxxxxxxxx',
    [
        'version' => 'wc/v3',
        'timeout' => 0
    ]
);

I’m sending GET Request

$woocommerce->get('merchandise/classes?search=Eğitim Hizmeti');

it returs json syntax error, the issue is it returns error for particular search string for instance if i exploit above string it would return error but when i’ll use this

$woocommerce->get('merchandise/classes?search=Acil Durum & Güvenlik Ekipman');

it would give good response with out error, for the primary request I get physique as html 400 unhealthy request cloudflare, I attempted to shut cloudflare and it nonetheless provides me the identical error, I checked permalinks and it’s okay, I deactivated some plugins nonetheless get this error, I examined each request in postman it really works completely, then I examined with totally different server and url each request works.
If somebody has resolution I’d be appreciative, I spend virtually 2 days to seek out an issue the place does it come from.