Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @hellpunch

    As far as I know, there aren’t any publicly available hooks for the login modal. What are you trying to achieve exactly? If you can get back to us with a little bit more detail, we’ll be more than happy to guide you through.

    Thanks

    Thread Starter hellpunch

    (@hellpunch)

    Hi eduard,

    I am using the wordpress add_action to add an additional ‘confirm password’ form to the registration tab of the modal.

    username
    email
    password
    confirm password <-

    tried using the hook ‘woocommerce_register_form’ and ‘register_form’, but these two don’t apply to the modal while they work on the regular forma pages (not modal).

    Also, how do i stop from redirecting to a page and fire the modal with a condition? I know can be done with javascript, but is there a way to do it with actions? Tried with wordpress ‘template_redirect’ but invain, it redirects me to the page, not firing the modal. (example siteurl/wp-login.php?redirect_to=siteurl should fire the modal, but instead they redirect me to the wordpress login page or or siteurl/#account-modal redirects me to the main page but the modal isn’t fired)

    • This reply was modified 4 years, 3 months ago by hellpunch.

    Hey @hellpunch

    As far as I know, we’ve implemented a new behaviour for the login modal that inherits the WooCommerce form, but this is only available on the Premium package.

    I’ll ask the developers about this to see if the hooks also work there and get back to you as soon as possible with an answer for both of your inquiries.

    Thanks

    Theme Author Creative Themes

    (@creativethemeshq)

    Hi @hellpunch,

    Here are the answer to your questions:

    1. Account modal supports the register_form action and you can indeed add additional fields using it. Please post here the code that you use to add the additional fields and we’ll try to understand why exactly it doesn’t show up for you.
    2. If you want to change the redirect URL after the login from the account modal, please use the “blocksy:account:modal:login:redirect_to”. It defaults to the current URL from which the account was opened. For more details please look into the framework/features/header/modal/login.php file from Blocksy Companion plugin.
    3. Fire modal with a condition. You have two options here:
    a. Refer to this example on how to craft a custom link that opens the modal: https://creativethemes.com/blocksy/docs/header-builder/header-builder-elements/#account-header-element
    b. Add this code in your child theme. With this code in place, open this URL: yoursite.com#account-modal (append #account-modal at the end of the URL) and the account modal will auto-open on page load.

    Hope this helps and please let us know if we missed any points here.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Hook] Modal hook’ is closed to new replies.