Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author templateinvaders

    (@templateinvaders)

    Hi @pujithamutyala

    The error message clearly indicates that the issue is with adding the product to the wishlist, not with the product itself not being found.

    There could be a few reasons for this error:

    1. The data you are passing in the request might not be a valid WooCommerce product. Please ensure that the “product_id” you are using is correct and corresponds to a valid product in your WooCommerce store.
    2. It’s also possible that the product you are trying to add is already present in the wishlist. In the free version of our plugin, a product can only be added to the wishlist once. So, if the product is already on the wishlist, you won’t be able to add it again.

    Please double-check the “product_id” you are using and make sure it is valid and the product is not on the wishlist yet.

    Thread Starter pujithamutyala

    (@pujithamutyala)

    1. Yes. I am using a valid WooCommerce product id. For eg., in the request mentioned above product id is “297”. This is the same product id which is configured in WooCommerce Admin.
    2. I get this error even if I try to add product to empty wishlist.
    Plugin Author templateinvaders

    (@templateinvaders)

    @pujithamutyala

    Are you sure that you are using a valid sharekey in the URL of the request?

    Can you add the same product to the same wishlist from the frontend?

    Thread Starter pujithamutyala

    (@pujithamutyala)

    Yes. I am using a valid sharekey in the URL of the request. I always get the shareKey from your endpoint : /wp-json/wc/v3/wishlist/get_by_user/:userId and use the same shareKey value.

    And yes, adding the product to the same wishlist works from frontend but not using the rest api.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Always get the error Products not found for a valid product’ is closed to new replies.