TypeError: Cannot access offset of type string on string
ImJustToNy opened this issue · 2 comments
ImJustToNy commented
DevinCodes commented
Hi @ImJustToNy ,
Thank you for reporting this.
The parameter to getRelatedProducts
should be an array of arrays, can you check with the following code, please?
RecommendClient::create('foo', 'bar', 'baz')->getRelatedProducts([[ 'indexName' => 'example', 'objectID' => '5' ]]);
Thank you in advance!
ImJustToNy commented
Oh! My bad. Thank you for your help, it works just fine now.