Support » Plugin: WooCommerce » Remember me ticked ?

  • Hi

    I have ” remember me ticked ” on login for wordpress with this code:

    function login_checked_remember_me() {
        add_filter( 'login_footer', 'rememberme_checked' );
    add_action( 'init', 'login_checked_remember_me' );
    function rememberme_checked() {
    	echo "<script>document.getElementById('rememberme').checked = true;</script>";

    How to achieve the same with woocomerce login?


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


    <script>document.getElementById('rememberme').checked = true;</script>

    That’s looking for an element with an ID of “rememberme”. Out of the box, the WooCommerce login form doesn’t use that element ID. This means you’d need to adjust your javascript to look for the for=rememberme attribute instead.

    Truth be told, this is easier in jQuery. If you’d like to stick with pure Javascript though, you’d first need to create a function that allows you to use something like getElementByAttr(). There’s a good example of that in action at

    Thread Starter mikehaceman


    hi @riaan,

    Thanks for quick answer. I have used:

    <script>document.getElementById(‘for=rememberme’).checked = true;</script>

    If thats what you meant … it didnt work. Im not a coder so writing code from zero wont happen for me. If you can provide full answer with full solution that would be great. As for the way, java or jquery – i dont have preferences. I just want to make it work 🙂

    Thread Starter mikehaceman


    any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remember me ticked ?’ is closed to new replies.