Title: Saving Payment Methods
Last modified: February 21, 2018

---

# Saving Payment Methods

 *  Resolved [WP-77](https://wordpress.org/support/users/admin247365/)
 * (@admin247365)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/)
 * Hi,
 * I have been using the payment plugin for some time without allowing users to 
   save payment methods although I had tested it in sandbox mode a long time ago.
 * Now (many versions later) that I want to let my customers save payment methods
   I’m having issues. When I go into My Account> Payment Methods> Add Payment Method
   all I see is a single item (the credit cards I have chosen to accept) with the
   radio button pre-selected. There are no other choices or options to Save or Cancel
   on the page. Another big hint that something is conflicting is when I do go to
   My Account> Payment Methods> Add Payment Method my footer disappears.
 * I have tried a different theme (2017), disabled other plugins, including my Custom
   CSS and Code Snippets plugins to remove conflicting code.
 * Also, there is no Lock showing on the Checkout page in the credit card form.
 * Any quick ideas? I get the feeling I’m missing something easy.
 * Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/#post-10000320)
 * Hi [@admin247365](https://wordpress.org/support/users/admin247365/),
 * When you navigate to the Add Payment Method page do you not see the credit card
   from? The fact that your footer is not rendering hints at an exception being 
   thrown in the code somewhere around the time the credit card form is being rendered.
 * Once you disabled other plugins the issue persisted?
 * I am not sure what you mean when you say there is no lock showing on the credit
   card form.
 * I recommend that you check your server’s error log. If an exception is being 
   thrown it will be written to the server error log and will greatly help in identifying
   the location of the issue.
 * If you want to provide site specifics please email me using our support email
   and we can take a look.
 * Kind Regards,
    -  This reply was modified 8 years, 2 months ago by [Clayton R](https://wordpress.org/support/users/mrclayton/).
 *  Thread Starter [WP-77](https://wordpress.org/support/users/admin247365/)
 * (@admin247365)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/#post-10000568)
 * Hi, and thank you for the great plugin and fast response!
 * To answer your questions:
    • I do not see the credit card form in Add Payment
   Method. • The problem does persist when the plugins are disabled. • The lock 
   I mentioned in checkout was (as I recall) an icon next to the checkbox to save
   the payment method. I just noticed there is a lock in the checkout page payment
   form that is for the CVV code. Maybe I just don’t recall correctly how the save
   payment option should be displayed (sorry).
 * When I compare the credit card form in my Checkout page against what is displayed
   in My Account> Payment Methods> Add Payment Method ONLY the radio button with
   the Title Text and Credit Card Icons are shown. The actual credit card entry 
   form is missing.
 * My debug log does show this:
    PHP Fatal error: Call to undefined method WC_Checkout::
   get_checkout_fields() in /mysite.xyz/public_html/wp-content/plugins/woo-payment-
   gateway-pro/templates/myaccount/add-payment-method.php on line 10
 * Line 10: = $fields = $checkout->get_checkout_fields( ‘billing’ );
 * I’m not sure what this could mean. Does the payment plugin require a minimum 
   version of Woocommece? My version is a bit dated – 2.6.14.
 * Thank you!
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/#post-10001172)
 * Hi [@admin247365](https://wordpress.org/support/users/admin247365/),
 * Good work, that is the exception that is causing your credit card form to not
   render. I just performed a search in your version of WC and the method get_checkout_fields
   is indeed not defined.
 * That means that WC added that method sometime after your version but there are
   no notes on the method indicating at what version it was added. We will need 
   to make the code in the add-payment-method.php page so that it’s not dependent
   on any one version. There are several things you can do to solve the issue until
   we provide a fix in the next release:
 * **Method 1:**
       1. upgrade to the latest version of WC.
 * **Method 2:**
       1.  Go in to your active theme’s directory and add a folder called woo-payment-
          gateway.
    -  1.  Add a another folder inside the woo-payment-gateway directory called myaccount.
    -  1.  Copy the plugin’s add-payment-method.php page to the newly created myaccount
          directory.
    -  1.  Change line 10 of the add-payment-method page to the following:
           `$fields
          = $checkout->checkout_fields['billing'];`
 * The following link has an article on how to create a customer form should you
   need a more in depth tutorial for Method 2. The process is exactly the same for
   changing any file in the templates folder of the plugin.
 * [https://support.paymentplugins.com/hc/en-us/articles/115001605627-Customize-Forms](https://support.paymentplugins.com/hc/en-us/articles/115001605627-Customize-Forms)
 * Kind Regards,
 *  Thread Starter [WP-77](https://wordpress.org/support/users/admin247365/)
 * (@admin247365)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/#post-10001587)
 * Wow, that was a fast response.
 * Option #2 worked to display the credit card form in Payment Methods.
    BUT, I 
   don’t see the checkbox to Save the credit card in the Checkout page. Also, the
   credit card form now shows the Street Address field under the Credit Card Number,
   Exp Date, CVV and Postal Code entry fields (in Payment Methods). I don’t see 
   this in the Checkout page.
 * I think it best I update WC and a few other related plugins. At least I know 
   the source of this issue before I start updating.
 * Thank you!
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/#post-10003374)
 * Hi [@admin247365](https://wordpress.org/support/users/admin247365/),
 * There is an option on the plugin’s Checkout Settings page called “Allow Save 
   Payment Method.”
 * You must enable that settings (checkbox) in order for the save payment method
   checkbox to appear on the checkout page.
 * The street address is not needed on the checkout page because that information
   is already captured in the WC billing address fields. It didn’t make sense to
   make the customer enter duplicate information. The billing address is rendered
   on the Add Payment Method page in case a merchant has AVS street address checks
   enabled.
 * Kind Regards,

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Saving Payment Methods’ is closed to new replies.

 * ![](https://ps.w.org/woo-payment-gateway/assets/icon-256x256.png?rev=2142799)
 * [Payment Plugins Braintree For WooCommerce](https://wordpress.org/plugins/woo-payment-gateway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-payment-gateway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-payment-gateway/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-payment-gateway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-payment-gateway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-payment-gateway/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/saving-payment-methods/#post-10003374)
 * Status: resolved