Skip to content

Instantly share code, notes, and snippets.

@WillBrubaker
Last active June 17, 2020 01:13
Show Gist options
  • Save WillBrubaker/1f736fdd3329c86489e64a1a38b9f603 to your computer and use it in GitHub Desktop.
Save WillBrubaker/1f736fdd3329c86489e64a1a38b9f603 to your computer and use it in GitHub Desktop.
Adds a Jetpack SSO button to enable login with WordPress on the WooCommerce my account page
//not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/
add_action( 'woocommerce_before_customer_login_form', 'handsome_bearded_guy_jetpack_sso' );
function handsome_bearded_guy_jetpack_sso() {
if ( class_exists( 'Jetpack_SSO' ) ) {
add_filter( 'jetpack_remove_login_form', '__return_true' );
Jetpack_SSO::get_instance()->login_form();
remove_filter( 'jetpack_remove_login_form', '__return_true' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment