• Resolved tajmohamed30

    (@tajmohamed30)


    Tried below snippet to change the default login to ajax login but it didn’t work

    add_action( ‘wp_head’, function(){

    ?>

    <script type=”text/javascript”>

    jQuery(document).ready(function($){

    $(‘a.showlogin’).click(function(e){

    e.preventDefault();

    e.stopImmediatePropagation();

    $(‘xoo-el-login-tgr’).trigger(‘click’);

    })

    })

    </script>

    <?php

    } );

    Please advise where I’m going wrong

    Regards
    Taj Md

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    I’m not entirely sure where you got that snippet from although it looks like it’s missing some key AJAX calls to handle the secure login. If I’m reading that correctly, all the code above does is to prevent the login button from working – preventDefault.

    With that said, this is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thread Starter tajmohamed30

    (@tajmohamed30)

    Hi,

    Thanks for your information.

    FYI – I got the snippet from xootix plugin team where the class “xoo-el-login-tgr” is for ajax login window popup trigger.

    On checkout page the show login form link is disabled with the snipped and enabled with the login popup that is what the snippet is used but it doesn’t work

    Please refer below video reference where it has the class names for the default login and ajax login links

    https://www.loom.com/share/5e89cce1ce37417bb397106c04098a7b

    Regards

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there Taj!

    Thank you very much for the clarification here, and the video showing what you are doing.

    Since that snippet is targeting an element added via their plugin and meant to be working with functionality from their plugin (along with the snippet itself being from them), please reach out to the Xootix team to ask about this.

    This forum here is meant for questions about the core WooCommerce plugin. While we are sometimes able to help provide snippets for adjusting things in WooCommerce core, this would not be the place for debugging snippets for other plugins.

    Thank you!

    Thread Starter tajmohamed30

    (@tajmohamed30)

    ok thanks for your kind reply, will follow up the team.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Checkout class change for “Click here to login”’ is closed to new replies.