Move Social Login From login to register

//move social login buttons on account form from "login" to "register"
function wc_social_login_move_register_buttons() {
    if ( function_exists( 'wc_social_login' ) && ! is_admin() ) {
        remove_action( 'woocommerce_login_form_end', array( wc_social_login()->get_frontend_instance(), 'render_social_login_buttons' ) );
        add_action( 'woocommerce_before_customer_login_form', array( wc_social_login()->get_frontend_instance(), 'render_social_login_buttons' ) );
    }
}
add_action( 'init', 'wc_social_login_move_register_buttons' );
No Comments

Sorry, the comment form is closed at this time.