Support » Plugin: YITH WooCommerce Social Login » How to NOT display Social Login Buttons on WP Login Form

  • Hi.. Did anyone know how to NOT display the Social Login Buttons inside the WP Login form in the Free Version of the plugin..? The Premium Version has an option to do it but may it is possible also in the Free version.. Anyone have the same issue..? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Francesco d’Elia

    (@newmediologo)

    Found the way.. From the file /includes/class-yith-social-login-frontend.php delete the row 54 add_action(‘login_form’, array( $this,’social_buttons’) ); and the Social Buttons disappears from the WP Login Form and all the rest works fine..

    But that way you lose your changes once you update the plugin!

    The preferred way is to include in your functions.php theme file the following lines:

    
    if(!is_admin()) {
      $socialLoginInstance = YITH_WC_Social_Login_Frontend::get_instance(); // get instance of the plugin
      remove_action('woocommerce_after_template_part', array($socialLoginInstance, 'social_buttons_in_checkout')); // this will remove the social icons from checkout page
      remove_action('woocommerce_login_form', array($socialLoginInstance, 'social_buttons')); // this will remove the social icons from login form on the profile page of woocommerce
      remove_action('register_form', array($socialLoginInstance, 'social_buttons')); // this will remove the social icons from register form on the profile page of woocommerce
      remove_action('login_form', array($socialLoginInstance, 'social_buttons')); // this will   remove the social icons from wp-login and wp-register forms of WordPress
    }
    

    Just leave the remove_action statements that works best for you… In your particular case the second and the third…

    That’s it.

    • This reply was modified 5 years, 8 months ago by viktorivanov. Reason: Make sure the code is run on front pages only!
    Thread Starter Francesco d’Elia

    (@newmediologo)

    Thank You Very Much @viktorivanov I’ll take this advice and test it..:-)

    Glad to help. Just wrap the whole thing around if(!is_admin()) check.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to NOT display Social Login Buttons on WP Login Form’ is closed to new replies.