Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Moves WC Social Login profiles to the top of the account section (after welcome message)
<?php
/**
* Only copy opening php if needed
*
* Moves social login profiles section to the top of the My Account dashboard
*/
function sv_move_wc_social_login_my_account_profiles() {
if ( function_exists( 'wc_social_login' ) ) {
remove_action( 'woocommerce_after_edit_account_form', array( wc_social_login()->get_frontend_instance(), 'render_social_login_profile' ) );
add_action( 'woocommerce_before_my_account', array( wc_social_login()->get_frontend_instance(), 'render_social_login_profile' ), 1 );
}
}
add_action( 'init', 'sv_move_wc_social_login_my_account_profiles' );
@daveharrisonnet

This comment has been minimized.

Copy link

commented Dec 2, 2015

Beka, where exactly would this code go? functions of a child theme or edit the actual plugin itself?

@claudwilliams

This comment has been minimized.

Copy link

commented Oct 16, 2016

Hey, where do we add this code?

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.