Last active
June 16, 2020 14:42
-
-
Save Pebblo/cfc2e072a97dbb3243fe166f1a831164 to your computer and use it in GitHub Desktop.
Example of how to hide the Personal information question group's email question using CSS if the current user is logged in.
This file contains 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
<?php //Please do not include the opneing PHP tag if you already have one. | |
function tw_ee_hide_primary_email(){ | |
if( is_user_logged_in() ) { | |
wp_add_inline_style( | |
'single_page_checkout', | |
'div[id*="ee-reg-form-qstn-grp-personal-information"] .ee-reg-qstn-email { | |
display: none; | |
}' | |
); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'tw_ee_hide_primary_email', 50 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment