WooCommerce – Unable to remove saved Payment Method?

[ad_1]

Going to My Account > Payment Methods screen with two saved cards.

Attempting to delete one, the button does not click. Using inspect element I find:

`<a href=”`[`https://myexample.com/my-account/delete-payment-method/1111/?_wpnonce=79c3a2deb3`](https://myexample.com/my-account/delete-payment-method/1111/?_wpnonce=79c3a2deb3)`” class=”button delete disabled”>Delete</a>`

So why is this happening where it is automatically applying the disabled class to the payment method delete button?

We’re using the default template for this page, so this is the code for that template:

[https://github.com/woocommerce/woocommerce/blob/8.3.0/plugins/woocommerce/templates/myaccount/payment-methods.php](https://github.com/woocommerce/woocommerce/blob/8.3.0/plugins/woocommerce/templates/myaccount/payment-methods.php)

&#x200B;

`echo ‘<a href=”‘ . esc_url( $action[‘url’] ) . ‘” class=”button ‘ . sanitize_html_class( $key ) . ‘”>’ . esc_html( $action[‘name’] ) . ‘</a>&nbsp;’;`

So the key in this case would be ‘delete’, so the class should just be class=”button delete” but instead it is “button delete disabled”?

Thanks for any help I can get!

&#x200B;

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer