Logout button shortcode

How work this function?


This function allows you to show the button to log out of the page my account with a shortcode. In other words, you can add a button so that the client can log out, anywhere on the My Account page, without the need to use the shortcode that WooCommerce has by default. It also has options for style and configuration of the redirection after logging out to make it show in a personalized way.

 

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º Set the style options
5º Choose to which page the client will be redirected after closing the session
6º Slide to the end, where you will find the button to save the settings

 

For a correct use of the function it is necessary to take 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.

 

 

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