Last active
June 17, 2020 01:13
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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