Created
June 20, 2016 10:47
-
-
Save kreamweb/f3a724ab4528cc70db83222164a018bd to your computer and use it in GitHub Desktop.
add register form to YITH Woocommerce Popup
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
| <?php | |
| add_shortcode( 'wcloginform', array( $this, 'aakoot_render_login_form' ) ); | |
| public function aakoot_render_login_form( $atts, $content = null ) { | |
| ob_start(); | |
| if ( !is_user_logged_in() ) { | |
| echo '<div class="woocommerce">'; | |
| wc_get_template( 'myaccount/form-login.php' ); | |
| echo '</div>'; | |
| } | |
| return ob_get_clean(); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Poi dovresti creare una popup e inserire lo shortcode per mostrare il form di registrazione:
[wcloginform]
Nella popup dovresti selezionare questa opzione: Display Settings -> Choose when displaying the popup -> When users click an link with #yithpopup in url
Così facendo, potrai inserire un link con href="#yithpopup" per aprire la popup. Ad esempio:
Log-in