Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there @tigere,

    Thank you for reaching out.

    I understand you’re trying to search for a product using the REST API, but the API is returning an empty result, even though the product is available.

    Looking at your URL, you have search=product_name. Please ensure that product_name is replaced with the actual name of the product you’re looking for.

    Also, please verify that the product you’re searching for is indeed published and not in draft or pending status. The status=publish parameter in your URL will only return products that are currently published.

    I hope this helps!

    Thread Starter tigere

    (@tigere)

    Thanks for the reply, product_name will be replaced with the actual product name and all products are published. What’s weird is that all other API calls are working and the search API is not returning anything or even an error.

    Below is a working API link and keys on test environment

    https://www.fishingmania.co.za/wp-json/wc/v3/products/?search=Zoom Ultra Vibe Speed Craw Alabama Craw&consumer_key=ck_45ed8c30c6169107c42800fbe836de01a6c6ebcb&consumer_secret=cs_30809558a6c0055579b4ec69a8b1decc8c855043&status=publish

    Website for the same product

    https://www.fishingmania.co.za/product/zoom-ultra-vibe-speed-craw-alabama-craw/

    Not sure if wordpress is just broken on the Woocommerce Rest API point of search.

    • This reply was modified 7 months ago by tigere.

    Hi @tigere,

    Thank you again for getting back to us with further details on this issue, however,?custom coding?of this nature is not something we can assist with directly.

    I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thread Starter tigere

    (@tigere)

    Thanks for the response, anyway this is not custom coding, this is the standard woo-commerce rest API if you using WordPress as a back end for a mobile app. The same search works on 3 projects, l will try troubleshoot the WordPress Theme as the theme supports Vendors and mini shops maybe some access is restricted on customer on the search API.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @tigere

    You’re correct in that this is a standard WooCommerce REST API function and should works fine. However, the best way to determine this is to:

    • Temporarily switch your theme to Storefront or Twenty Twenty-Four
    • Disable all plugins except for WooCommerce
    • Perform the API request again.

    If you’re not seeing the same problem after this, then you know the problem was with the plugins and/or theme you deactivated.

    I hope this gives you a few more avenues to explore. Please don’t hesitate to ask if you need further assistance.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @tigere

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Woo Commerce Rest API Support’ is closed to new replies.