I am using woocommerce for a wordpress site and I would like for users to create an account during the checkout process when entering in payment details. Normally there is checkbox option that users must physically click to make an account.
Is there some implementation that can have this “create an account” box pre-checked and all users have to do is create a password.
Checkout Require Create Account
Checkbox Behavior
Use the woocommerce_create_account_default_checked filter
add_filter('woocommerce_create_account_default_checked' , function ($checked){
return true;
});
Place it in your theme or child theme’s functions.php
Alter Template
Hide the checkbox and its label by overriding the woocommerce template.
You do so by copying the form-billing.php file to your theme’s folder.
Add a hidden attribute to the input tag and delete the label tag.
<input hidden class="..." ...
Woocommerce–> settings –> account and privacy
Your account should have settings like this.
no need for development
there is a javascript changing the class from display:none to display:block which uses the class of the div. So rename this class which has no other styles
to or whatever
then the javascript has no class to handle. the div is displayed