• Resolved Vondelphia.com

    (@vondelphia)


    May you please share a php function / snippet that will automatically check the “Create an account” checkbox on the checkout page? I searched all over the web, from blogs to stackoverflow and nothing works… sadly.

    Tanks in advance if anyone knows.

    This does not work:

    • add_filter('woocommerce_create_account_default_checked', '__return_true');
Viewing 8 replies - 1 through 8 (of 8 total)
  • Roxy

    (@roxannestoltz)

    Hi @vondelphia ,

    Thanks for reaching out!

    While I am unaware of a snippet that will automatically check the “Create an Account” checkbox, you are able to make creating an account required on checkout by changing a few settings within WooCommerce, as seen in the steps below:

    • Navigate to WooCommerce > Settings > Accounts & Privacy.
    • Disable the option to “Allow customers to place orders without an account“.
    • Enable the option to “Allow customers to create an account on checkout.
    • Make sure you save these settings.

    Here is an example of these settings:

    Once these settings have been saved, when a user places an order, they will automatically receive an email like the one seen in the example below:

    Hope this helps!

    Thread Starter Vondelphia.com

    (@vondelphia)

    No, it doesn’t help. Thanks for sharing some extra feedback though. If you come across a php snippet or figure out a way to automatically check that box on checkout age load, please do share… that would definitely help!

    Best of luck to you on @Roxy S. (woo-hc) Monday, cheers.

    Roxy

    (@roxannestoltz)

    Hi @vondelphia ,

    Please clarify if you are using the WooCommerce Checkout block or the [woocommerce_checkout] shortcode for your checkout page.

    Additionally, please can you specify which theme you are currently using on your site?

    Cheers!

    Thread Starter Vondelphia.com

    (@vondelphia)

    Stock theme on brand new fresh install of WordPress, I only activated two plugins

    • WooCommerce
    • WooCommerce Blocks

    I inserted the Checkout block (not shortcode) using the editor on Sample page. On the right sidebar there was an option to “make default checkout” so i clicked that.

    Hi @vondelphia

    Thanks for sharing the reuqested information above.

    I inserted the Checkout block (not shortcode) using the editor on Sample page. On the right sidebar there was an option to “make default checkout” so i clicked that.

    To better picture what you are referring to here, can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?

    If you don’t already have a screenshot service installed, you can try https://snipboard.io or http://skitch.com/. You can share the direct link to the image as a response to this topic.

    Roxy

    (@roxannestoltz)

    Hi @vondelphia ,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    Cheers!

    Thread Starter Vondelphia.com

    (@vondelphia)

    That’s fine – you guys are robots just responding to topics but not actually giving answers. I’ve already shared everything you need to clearly understand what it is I desire. Literally, just re-read the very first sentence two or three times and you’ll understand the point of this post.

    Good luck and have a nice day. Really, I’m not trying to be mean but you are not trying to be helpful either. Just a big circle-jerk. Hahahaha

    Roxy

    (@roxannestoltz)

    Hi @vondelphia ,

    Thanks for providing feedback, I absolutely hear your frustration, and I would like to point you in the right direction toward helping you achieve you site goals.

    After checking, I understand that you are using the checkout block, and this is where you would like to implement the automatic auto-check on the “Create an account” checkbox , correct?

    Since custom coding is outside our scope of support, I will go ahead and reopen this thread for a bit to see if anyone can chime in to help you out.

    For questions related to development and custom coding, your best bet is to ask on any of these channels for support. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    Cheers!

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

The topic ‘Default check “Create an account” checkbox on page load’ is closed to new replies.