Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created June 20, 2016 10:47
Show Gist options
  • Select an option

  • Save kreamweb/f3a724ab4528cc70db83222164a018bd to your computer and use it in GitHub Desktop.

Select an option

Save kreamweb/f3a724ab4528cc70db83222164a018bd to your computer and use it in GitHub Desktop.
add register form to YITH Woocommerce Popup
<?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();
}
@kreamweb

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment