question

cooltronix avatar image
0 Likes"
cooltronix asked ·

API $filterarray not getting build in Wordpress

Hi have API search page on Wordpress that works basically well, but the `$filterarray` does not get build into `$urlfilter`, that is used to make the API call. The result is an unfiltered API return. Or in other words, I can't filter for Auctions, AuctionWithBIN etc. I believe the problem might be `global` function buildURLArray ($filterarray) { global $urlfilter; global $i; It seams that `global` does not work in the Wordpress environment. Is there any known solution or workaround? Code is more or less the basic API search example. https://developer.ebay.com/DevZone/finding/HowTo/GettingStarted_PHP_NV_XML/GettingStarted_PHP_NV_XML.html
PHPwordpress
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
cooltronix avatar image
0 Likes"
cooltronix answered ·
To answer my own question: I got rid of `global` and added the strings manually to the apicall.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.