Payment methods shortcode

How work this function?

This function allows you to display the payment methods on the my account page with a shortcode. In other words, you can add the client’s payment methods anywhere on the My Account page, without the need to use the shortcode WooCommerce has by default.


How to configure?

Once you have created the custom account page, just follow these steps:

1º Activate the function making the slider show in green
2º It displays the advanced options of the function
3º Copy the shortcode by clicking on the button
4º Scroll to the end, where you will find the button to save the settings


For a correct use of the function, 2 important factors must be taken into account:

1º This shortcode will only work if you are on an account page, so your new account page must be assigned as the WooCommerce account page. To assign it, you just have to go to the WooCommerce settings, access the Advanced tab and select the new page as my account page. Remember to save the changes.



2º Payment methods have various advanced actions (Add new payment method, set by default and Delete) which for example are accessed by clicking on the “ADD PAYMENT METHOD” button that appears in the list of payment methods . When you click on the “ADD PAYMENT METHOD” button using this shortcode, a page refresh occurs and after the new load the payment methods form will appear just below the list of customer payment methods. So that after clicking on the “ADD PAYMENT METHOD” button and reloading the page, the user will keep viewing the list and payment methods form, you will need the addon Woo Shortcodes Kit PRO, which offers a function to manage redirects to the advanced actions of the WooCommerce account.

You can see how this PRO function works from here.




If you want to expand the possibilities of your account page, you can do it with the following functions included in this section.