Skip to content

Instantly share code, notes, and snippets.

@bekarice
Last active May 20, 2021 23:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bekarice/da97616652c1125a5916 to your computer and use it in GitHub Desktop.
Save bekarice/da97616652c1125a5916 to your computer and use it in GitHub Desktop.
WooCommerce Social Login: move profiles in "My Account"
<?php // only copy if needed
// Move "My Social Profiles" to "dashboard" instead of "edit account"
function wc_social_login_move_social_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_account_dashboard', array( wc_social_login()->get_frontend_instance(), 'render_social_login_profile' ) );
}
}
add_action( 'init', 'wc_social_login_move_social_profiles', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment