Wordpress | Woocommerce custom registration form

Booster

I would like to ask whether it is possible to create the registration with the only code that is sent to the user's mail after form submitted, I'm not sure how to do properly.

for example : The user enters his email and the system will automatically send the generated password example: " 12345 " And this password i want use for all users

<?php
function wcs_filter_password_email( $args ) {
    $args['user_pass'] = $args['user_email'];
    return $args;
}
add_filter( 'woocommerce_new_customer_data', 'wcs_filter_password_email' );

I found this code but do not know if it would work as I want it Thank you very much for your help.

CDrosos

Your example will give the user email for password. you need:

<?php
function wcs_filter_password_email( $args ) {
  $args['user_pass'] = "12345";
  return $args;
}
add_filter( 'woocommerce_new_customer_data', 'wcs_filter_password_email' );
?>

Put it in your functions.php and it should work.
Don't forget to set the password to be auto generated from WooCommerce > Settings > Accounts otherwise the user will be asked to provide a password.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Show Registration form in front end wordpress

From Dev

custom wordpress comment form html

From Dev

Creating Custom user registration form Django

From Dev

wordpress custom contact form issue

From Dev

Custom Email Validation in Wordpress/BuddyPress Registration

From Dev

wordpress custom form to database

From Dev

Wordpress + Woocommerce custom payment gateway

From Dev

Django Registration Redux custom registration form

From Dev

Remove username field registration form - Woocommerce

From Dev

Drupal Custom registration form save

From Dev

wordpress/woocommerce - sum of custom fields

From Dev

Adding first and last name to Wordpress registration form

From Dev

Django custom registration form

From Dev

Drupal 8 custom registration form

From Dev

Creating a custom registration form in Google Course Builder

From Dev

Eventbrite API - custom form registration in website

From Dev

Custom Login and Registration for new WordPress users

From Dev

Custom Wordpress Registration Form with Validation

From Dev

custom wordpress comment form html

From Dev

Remove custom registration form on wordpress

From Dev

Custom Form Action in Wordpress

From Dev

Drupal custom registration Form element not showing on frontend

From Dev

Custom email for Woocommerce (Wordpress)

From Dev

How to add user roles dropdown in registration and login woocommerce wordpress

From Dev

Laravel custom validation on registration form

From Dev

Devise custom validation for a custom field in the registration form

From Dev

Custom Login Registration in wordpress

From Dev

Adding a checkbox in WooCommerce registration form

From Dev

User registration form not display -User Submitted Form plugin - wordpress

Related Related

HotTag

Archive