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.
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:
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!
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.
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?
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
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.