Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bekarice/a50e47e22cd4b3768a45 to your computer and use it in GitHub Desktop.
Save bekarice/a50e47e22cd4b3768a45 to your computer and use it in GitHub Desktop.
<?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