If you need to disable a WooCommerce Payment option because you realize you no longer needed or you need to turn of a default you mind have an initial tough time finding it. Once you know it is really easy though.
WooCommerce Checkout Payment Option
Just go to WooCommerce Settings > Checkout. This is where you will find all the possible checkout options such as PayPal, Stripe and so on.
Just go ahead and go to the tab for the payment gateway you do not want to use anymore.
Payment Option Tab
So go to the payment option you would like to remove / disable. Then uncheck this option like we have done here below for the check payments. You can see there is no checkmark for the enable check payments. So this option is NOT in use for this WooCommerce store.
Do not forget to save your settings and or empty cache when need be. Otherwise you changes will not be stored nor displayed. To make sure all worked well simulate a purchase and check that you do not see this payment option on the checkout anymore.
Setting up Stripe for a client on WooCommerce we ran into a Stripe 402 Error. So what does a 402 error mean and how can we solve this issue? Well Let’s get into the finer details shall we.
Keys used In our case this happened using a live publishable and private key. So this meant we had to use a real credit card and enter details properly. Sometimes people run test mode and forget to use a dummy credit card for testing or forget to turn on testing. So please do check what mode you are using and use the proper payment details.
Stripe 402 Code
When the payment does fail with a Stripe 402 error it means the payment went wrong.
I quote Stripe:
Not all errors map cleanly onto HTTP response codes, however. When a request is valid but does not complete successfully (e.g., a card is declined), we return a 402 error code. To understand why a card is declined, refer to the list of codes in the documentation.
So as there are multiple problems that can cause this error you need to find out what the error was you had. And for that you need to get the possible decline code.
Source of the Error
We can see in the page source what the issue is once the payment is done. To view the source just after a failure use command+alt+i on Chrome on your Mac to open the inspector for this. Sometimes it is just the wrong credit card details entered. Again, check the decline code / message.
Also, when you have error message recording turned on you can check your WooCommerce system logs. These are located at /srv/www/domain.com/shared/uploads/wc-logs for those using Trellis. For others at wp-content/uploads/wc-logs. In our case we found:
So the client did not enter the proper security code or cvc. In other cases it could be an incorrect card number or something else related tot the payment.
Well, as soon as you have the decline code or error found in the source of the page or in your WooCommerce error logs or other payment logs you will be able to add details properly. As stated we had an issue with the cvc code. Once the client entered the proper security code the payment went through.