Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php // only copy opening php if needed
/**
* 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_register_form_end', array( wc_social_login()->get_frontend_instance(), 'render_social_login_buttons' ) );
}
}
add_action( 'init', 'wc_social_login_move_register_buttons' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.