-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to remove item from cart #25
Comments
When you say the delete request was SUCCESS with status 500 does that mean it is deleting the item but still returns an error response? |
@seb86 Sorry for my english and No it did not delete the item in the cart. |
OK I will look into the issue. Could you please provide me with your WooCommerce system status report. Thank you. |
@Janie20 I have not been able to replicate your issue. I was able to remove an item using Postman with no problems. Did you add the item via Postman first or did you add the item via the site first then try to remove it via Postman because it can not see your browser session? Steps I took to remove item in Postman.
|
I did the same steps that you took , but i would still get the error on step 4. WordPress EnvironmentHome URL: http://localhost/wordpress Server EnvironmentServer Info: Apache/2.2.32 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.1.8 mod_ssl/2.2.32 OpenSSL/1.0.2j DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.24.0 SUHOSIN Installed: – DatabaseWC Database Version: 3.3.4 Post Type Countsattachment: 3 SecuritySecure connection (HTTPS): ❌Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Active Plugins (7)AiCS ipay88 Woocommerce: by AiCS – 1.1.0 – Not tested with the active version of WooCommerce SettingsAPI Enabled: ✔ Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) WC PagesShop base: #4 - / ThemeName: OceanWP TemplatesOverrides: oceanwp/woocommerce/cart/mini-cart.php |
Thank you for sharing your system report. Can you tell me why you have WP REST API installed? It's already part of WordPress. That could be causing some issues. Please disable it and try again. |
I deactivated it and try again , but still getting the same error result. |
Are you using authentication when removing the item? |
Can you make sure the item key is also correct. |
No, I'm not using authentication, when removing the item. I make sure my cart is not empty as you can see in the first picture , then I tried to remove the item , I only put the cart_item_key on the body. |
I see what you are doing now. You are adding the cart_item_key as form-data when you should be adding it to the parameters. Clear the form-data and click on "Params" next to the big blue "Send" button. Then add the key and value there. Then press "Send". |
Can you disable all plugins execpt for WooCommerce and the Cart REST API and try again after refreshing your permalinks to flush the rewrite rules please. |
still not working ... |
Then the only thing I can think of is that there is something wrong with your Postman software because you should only get that error if the cart_item_key is not added as a parameter which you have done. |
Are you able to run the same tests with your site online? |
This is so weird. If the body is used to apply If posted with |
But the best option is still to use the "Params" to apply the
If that fails then I will look further into the issue. I would just like to see what you get after running this test. Thank you. |
@Janie20 Let me know when you have run the tests as I asked above. Thank you. |
@seb86 I have founded whats the problem that causing the error , it turns out to be the cart item key that I get was the reason causing the error. I'm not sure if this is the main reason, but it works perfectly fine after I done some configuration on my site, then I go create a new product , and the key that generated become slightly different as I realize the key generated now start with a number instead of an alphabet like my previous cart item key. Now it works perfectly fine. Thank you for answering my question , really appreciate the help ^_^ previous = "c16a5320fa475530d9583c34fd356ef5" |
@Janie20 Can you tell me what configurations you made to your site that you think helped fix the issue? If the issue is with the cart item key starting with a letter rather than a number then that will need to be confirmed. Do all your products item key start with a letter or number? I will comfirm on my end to see if that is the case. So far no one else has reported this issue. |
I can confirm that products I will change this validation and put out a release soon. |
The same validation will be applied to restoring and updating an item. |
OK I have pushed changes @Janie20. Can you download the update and run your tests again please to confirm. Let me know if the issue is resolved afterwards. Thank you. |
Sorry, if this is the right place to post this, but I have no idea where to reach help.
i'm creating an ios application for woocommerce website and I was able to use this plugin to add product to cart , view cart , and clear cart , but I could not get through with the delete request to remove an item from cart , below is the screen short I used postman to test out
------ GET request
------ DELETE request
The text was updated successfully, but these errors were encountered: