LoginPress and WooCommerce Compatibility

LoginPress is one of the best WordPress login page customizer plugins that lets you customize the default login page of WordPress. It predominantly focuses on rebranding your login page with just a few clicks without touching a single line of code.

We're pleased to announce that LoginPress and WooCommerce are fully compatible. We recommend using LoginPress with WooCommerce

In this knowledge base article, we'll show you how to redirect users to your custom WordPress Login Page instead of the default login page of WooCommerce.

How to Make LoginPress and WooCommerce Compatible

Let me describe a scenario here; a customer visits the My Account page. When the user tries to Log In,  instead of landing on the default WooCommerce Login Page the user will be redirected to your designed Login Page. After logging in, that user will be redirected to its My Account page and see its information as usual. Pretty simple, right?

Here are the steps you need to follow:

Step 1: Add the Snippet in the Child Theme’s functions.php File.

Once you’ve created a customized login page with LoginPress, you’ll need to redirect the user to the default WooCommerce login page. 

All you need to do is to add the following snippet in the child theme’s functions.php file. This code will ensure that if the user is not logged in and goes to the my-account page, the user will be redirected directly to your designed login page.

function loginpress_woo_login() {
 if ( function_exists( 'is_account_page' ) ) {
   if ( ! is_user_logged_in() && is_account_page() ) {
     wp_redirect(wp_login_url());
     exit;
   }
 }
}
add_action( 'wp', 'loginpress_woo_login' );

Step 2: Use LoginPress Login Redirects Add-On

Now you need to set up redirects for customers or any other role you want to redirect to my-account after login so they can redirect to their own my-account page after login.

This is where LoginPress Login Redirects Add-on will come into action. 

Note: You can see our detailed guide on the Login Redirect Add-on here.

Once you’ve installed and activated the Login Redirects Add-on, navigate to Login Redirects setting page to set up the redirection based on role/s.

Choose the Specific Roles tab. Search your customer’s role, i.e., Customer. Now add your “My Accounts” page URL in the Login URL field, e.g., www.mysite.com/my-account. This is where the user with the customer role will redirect after login.

Then add your desired logout page URL for customers in the Logout URL field. This can be your site's default landing page, e.g., www.mysite.com. This is where the user will be redirected when logged out.

Login Redirects

Now when the user tries to log in, he will be on the following page:

LoginPress and WooCommerce Login Page

Login Redirect Add-on will redirect the user with a customer role to their my-account page upon successful login.

WooCommerce my-account Page

That’s it! All done. Easy right? Now you can display an excellent login page to your WooCommerce customers.

If you have any doubts or questions about this or facing any problem/s, please don’t hesitate to contact our support team. We will be happy to help you.

Still stuck? How can we help?

Updated on October 26, 2022

Documentation
LoginPress Support
triangular shape yellowish icon

Frequently Asked Questions (FAQs)

These FAQs answer the most common questions about our WordPress custom login page plugin.

three shapes icon

Is LoginPress WPML Compatible?

LoginPress is fully supported with multilingual. LoginPress is also compatible with WPML Plugin, which means you can easily translate your login page with WPML plugin according to the given translation options in the WPML plugin.

Is LoginPress translation ready?

Yes, LoginPress has full translation and localization support via the LoginPress textdomain. All .mo and .po translation files should go into the languages folder in the base of the plugin.

Is coding skills needed to use LoginPress?

No, It is very easy to setup. Just plug and play. Have fun!

How to Install or Use LoginPress Pro?

Step-by-step instructions on How to Upgrade from existing Free version to Pro
1. You have installed and set up the Free version already.
2. Upload the Pro version.
3. Pro features will be enabled automatically.
4. You don’t need to set up Free version options again.
5. Setup Pro features like Google fonts, Google reCaptcha, Choose themes, etc.

Where is my license key?

License key is the Order ID which looks like in this format.
WHI150807-1234-12345
You can find it in the email Sales Receipt.

three shapes icon

If you Still have Questions?

Get In Touch