To enable default Password field I just had to check checkbox (When creating an account, automatically generate an account password) under WooComemrce > Settings > Accounts and Privacy.
After this default password field started to display on registration page. To add repeat password field I used this hook
add_action( 'woocommerce_register_form', 'wc_register_form_password_repeat' );
function wc_register_form_password_repeat() {
?>
<p class="form-row form-row-wide">
<label for="reg_password2"><?php _e( 'Password Repeat', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="password" class="input-text" name="password2" id="reg_password2" value="<?php if ( ! empty( $_POST['password2'] ) ) echo esc_attr( $_POST['password2'] ); ?>" />
</p>
<?php
}
?>
Related Posts:
- $_POST form request with admin-post
- Handling results from data hooked into admin_post
- What is the real intention for admin-post.php?
- How to iterate through custom posts and add the title to an array
- Post from front-end with post types, categories and taxonomies
- product-attribute-slug-is-too-long-28-characters-max
- Front-End Form Submission in Shortcode
- Use a PHP file as action for a form in a WordPress plugin, what’s the correct way?
- Front-End Interfaces Without Shortcodes
- Add multiple shipping rates from add_rate function with custom ID
- set_sale_price in WooCommerce [closed]
- Best Practices for Creating and Handling Forms with Plugins?
- Woocommerce – Hide a Column in Cart Table
- How to get orders with used coupon in WooCommerce
- How to update total price of completed order in woocommerce? [closed]
- How do I change the initial quantity of a product in woocommerce?
- Order properties should not be accessed directly
- How to check if Woocommerce Order number equals to post ID?
- How plugins_loaded works?
- wordpress plugin php file processing form
- How to add custom fields to the all users page
- WooCommerce Admin Reports : Get custom product report based on date range
- Woocommerce checkout update totals with datepicker
- Error on inserting a form value to database
- Multiple options pages validation for a plugin
- Strange issue saving custom field data for a WooCommerce order
- PHP – Extend WordPress Woocommerce Revenue Analytics with custom field
- Woocommerce – Convert Delivery method into a custom field
- How can we display product price $104 on the cart while the credit card payment method is checked?
- Show disclaimer with accept button before redirecting to the payment gateway website
- Form doesnt save to database
- How do I apply a custom discount to individual product total prices depending on their categories on the cart and checkout pages of WooCommerce? [closed]
- In woocommerce cart item we can add custom text but how can i add custom link? [closed]
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- Can’t get woocommerce_get_price_html to work [closed]
- How to extend WooCommerce API to show bookable product availability rules?
- Customize WooCommerce my account dashboard through plugin
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Input in plugin widget does not allow spaces
- UWooCommerce – add cart discount programmatically?
- How can I add a simple custom field to my plugin?
- Woocommerce order empty items array
- How to get all product in the woo-commerce? [closed]
- Run JavaScript validation script on form submit in plugin
- The Correct Way to Use Nonce Field without Settings API
- Can woocommerse be used dynamically for billing from another plugin for payment processing?
- Catching Form Submission in WordPress Admin Panel
- Can we use a library under MIT license in a WooCommerce plugin?
- How to call code when adding WooCommerce menu items via woocommerce_account_menu_items
- Custom Plugin Options Won’t Update
- Woocommerce – Provide Associated Category Link for Product List Plugin [closed]
- A function that will remove HTML and tags from a string?
- Lead form that submits to 2 external APIs
- Remove Products From Category
- WordPress: redirecting to the form page after form submission to admin-post.php
- want to show CMB2 metabox on woocommerce product data tab
- Customise Grouped Product display in Woocommerce with custom column
- Change reminder email date to 14 days before
- How to make every image title equal to alt text(wordpress/woocommerce)?
- How to create a custom post-new.php page for plugin , no wp menu
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- Securing custom rest API endpoints with public access from PWA
- WooCommerce – Stop assigning order numbers
- Adding customs fields on each product on the cart
- Override woocommerce loop-start.php from theme using plugin?
- ‘Simple’ Reservation System
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- WC REST API Error Handling
- Pre-populated WooCommerce checkout fields: dropdown fields issue
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- woocommerce wc_get_product is not fetching all the product of particular category
- Override WooCommerce files from plugin
- woocommerce add a new bulk action in the bulk actions dropdown in the orders list
- How to trigger WooCommerce user profile edit change?
- WC_Geolocation not found inside plugin
- How to use functions from Woocommerce documentation?
- How to Maintain url on form submit
- external Integration with wordpress timeout error
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- Handle changed Woocommerce function
- Making Woocommerce optimized for more than 500k products
- form does not generate $_POST request
- Form and database, plugin development
- Woo-commerce: Adding additional page sections using a child theme
- Declaring a new woo commerce product type i get this error
- Can I use a hook other than ‘init’ to handle form submissions?
- woocommerce single product page hook not working
- wp_mail links are dead
- Multi-part form and wp_redirect()
- Page reload occurs before request finishes
- How to remove city field from order in dashboard?
- Submitting a plugin form to database in admin page
- How to design WooCommerce-like admin tabs for plugin settings page?
- Woocommerce: block user removing cart item
- Return custom product in ajax call loop
- WooCommerce adds a newline symbol (\n) between email recipients
- Allow HTML in product attributes and variation for WooCommerce
- How do I add multiple custom menu Woo-commerce my account page?
- High-Performance Order Storage conflict action `manage_shop_order_posts_custom_column`
- how to execute a function only when i send an order to trash [closed]