• Resolved saprotsenko

    (@saprotsenko)


    Hi there,

    We’re having issues with the WooCommerce Delete Product API. The API does not delete any products when used in this capacity.

    We’re using the Woocommerce API within a flutter app. Our stores runs Dokan + Woocommerce, and allows users to list their products on our site through the app.

    We have confirmed with Dokan that WooCommerce product delete API is not integrated with Dokan, and fetching this API will not affect Dokan in any way. The API is completely coming from the WooCommerce and as all the products are based on WooCommerce that should work.

    Both our developers, and Dokan have tested the API and it is not deleting the product (but fetching the product properly, and all other functions too). It is just the delete part that is not working.

    Is there an issue with the API or a workround/customisation needed for this?

    Thank you!
    Alex

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    The API is completely coming from the WooCommerce and as all the products are based on WooCommerce that should work.

    WooCommerce does not declare support for Dokan, so I would expect that. Concerning:

    We’re having issues with the WooCommerce Delete Product API. The API does not delete any products when used in this capacity.

    Are you referring to: https://woocommerce.github.io/woocommerce-rest-api-docs/#delete-a-product ? So sending a DELETE to /wp-json/wc/v3/products/<id> has no effect?

    Kind regards,

    Thread Starter saprotsenko

    (@saprotsenko)

    Hi Con,

    Yes exactly, sending a DELETE doesn’t do anything. We’ve had both our development team and the Dokan team test with the same results.

    Any ideas why it might be happening? As again, we’d look to Dokan for it, but since this part is unrelated to Dokan and just uses Woo, it has us stumped.

    Thanks!
    A

    Hi @saprotsenko,

    Are you still running into this issue? I tested just now sending a DELETE to /wp-json/wc/v3/products/ID with Postman and it did move the product to the trash.

    Do you know if the API key set to read/write and not just to read?

    Thread Starter saprotsenko

    (@saprotsenko)

    Hi!

    Thanks for following up on this. Yes it does seem to work now, it seems there was a conflict with the Sucuri plugin. We’ve deactivated it, and since then everything is working well.

    Thanks again,
    Alex

    Mirko P.

    (@rainfallnixfig)

    Great to hear that you could fix this! Thank you for confirming that.

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

    Cheers.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WooCommerce Delete Product API – Not Working’ is closed to new replies.