How to Add Social Login Shortcode in WooCommerce

LoginPress is one of the best WordPress login page customizer plugins that lets you customize each element on the default login page of WordPress.

We also have a way to use the functionality of the Social Login Button anywhere on the site. Sound Cool, Right?

You can easily add Social Login shortcodes to add Social Login Buttons, including Google, Facebook, Twitter, or LinkedIn.

This knowledgebase article will explain how you can add social login shortcodes to the following places:

  1. WooCommerce Registration Form
  2. WooCommerce Login Form
  3. Checkout Form
  4. Cart Form
  5. Proceed Order Form.

Adding shortcodes will be done with coding, so buckle up!

Let’s get started!

Adding Social Login Shortcodes in WooCommerce

You can add Social Login buttons to your WooCommerce website simply by adding Social Login shortcodes. All you need to do is add the shortcode to your child theme’s function.php file. Easy, right?

Let's integrate the Social Login shortcode in the specific places on your WordPress WooCommerce site.

1. Add Social Login Buttons for WooCommerce Registration Form

The Social Login shortcode for the WooCommerce Registration form is used to add the social login buttons on your WooCommerce Registration form

All you need to do for this is add the following shortcode to your child theme’s function.php file.

function wc_register_form_add_social_login() {
 echo do_shortcode('[loginpress_social_login]');
}
add_action( 'woocommerce_register_form', 'wc_register_form_add_social_login', 10, 0 );

Once the code is added to your child theme’s function.php file, the Social Login button will display like this.

You can also control which Social Login buttons appear using the shortcode parameter - Reference to Parameters.

Social Login Buttons for the Registration Form

2. Social Login Shortcode for WooCommerce Login Form

The following Social Login shortcode lets you add social login button to your WooCommerce Login form. Simply you need to add this shortcode in your child theme’s function.php file.

function wc_login_form_add_social_login() {
 echo do_shortcode('[loginpress_social_login]');
}
add_action( 'woocommerce_login_form', 'wc_login_form_add_social_login', 10, 0 );

After Adding code in your child theme’s function.php file, the Social Login button will display like this.

You can also control which Social Login buttons appear using the shortcode parameter - Reference to Parameters.

Social Login Buttons for the Login Form

3. Social Login Shortcode for Checkout Form ( Before Proceed to Cart Button )

Social Login Shortcode for Checkout Form ( Before Proceed to Cart Button) is used for adding Social login button on your WooCommerce Checkout Form. 

Simply add this shortcode to your child theme’s function.php file.

function wc_checkout_proceed_add_social_login() {
  echo do_shortcode('[loginpress_social_login]');
}
add_action( 'woocommerce_proceed_to_checkout', 'wc_checkout_proceed_add_social_login', 10, 0 );

After Adding code in your child theme’s function.php file, the Social Login button will display like this.

You can also control which Social Login buttons appear using the shortcode parameter - Reference to Parameters.

Social Login Buttons for Checkout Form

4. Social Login Shortcode for Checkout Form (After Proceed to Cart Button)

Social Login Shortcode for Checkout Form ( After Proceed to Cart Button) is used for adding the Social login buttons on your WooCommerce Checkout Form

Simply add the following shortcode to your child theme’s function.php file:

function wc_after_cart_add_social_login() {
 echo do_shortcode('[loginpress_social_login]');
}
add_action( 'woocommerce_after_cart_totals,' 'wc_after_cart_add_social_login', 10, 0 );

After Adding code in your child theme’s function.php file, the Social Login button will display like this.

You can also control which Social Login buttons appear using the shortcode parameter - Reference to Parameters.

Social Login Buttons for Checkout Form

5. Social Login Shortcode for Proceed Order Form

Social Login Shortcode for Proceed Order Form is used to add the Social login buttons on your WooCommerce Proceed Order Form. 

Simply add this shortcode to your child theme’s function.php file.

function wc_after_payment_add_social_login() {
 echo do_shortcode('[loginpress_social_login]');
}
add_action( 'woocommerce_review_order_after_payment', 'wc_after_payment_add_social_login', 10, 0 );

After Adding code in your child theme’s function.php file, the Social Login button will display like this.

You can also control which Social Login buttons appear using the shortcode parameter - Reference to Parameters.

Social Login Shortcode for Proceed Order Form

6. How to Add Social Login Buttons Shortcode in your Blog Post/Page

You need to go to your WordPress admin dashboard if you want to add a Social Login button shortcode to your blog post/page. 

First, open your Blog Posts/Page where you want to add the Social Login button and click on Edit.

Edit Blog Post

Add Social Login Shortcode to your page or post area where you want to display Social Login buttons. After Adding Shortcode to your page or post, save or update your page or post.

Note: You can also use this Social Login shortcode in your website backend code.

Social Login Shortcode

You can also control which Social Login buttons appear using the shortcode parameter - Reference to Parameters.

Now open your page or post, and you will see Social Login Button that will display like this in your post or page.

Social Login Button in the Post

How to Hide the Social Login Button

Suppose you wish to disable or don’t want to show Facebook-Button Simple; you need to add the code disable_facebook=true in your social login shortcode.

Add the Following in the Code

Let me use an example here; when you’ll add code disable_google=true in the Google social login shortcode,  this social login button will no longer be displayed on the post.

Google Social Login Removed

Add the following code to your social media login shortcode to disable other social media icons and use these parameters accordingly.

Google: disable_google=true

Twitter: disable_twitter=true

Linkedin: disable_linkedin=true

That’s it! All done. Easy right? You can easily add social login shortcodes to WooCommerce Registration Form, WooCommerce Login Form, Checkout Form, Cart Form, and Proceed Order Form.
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 December 1, 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