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:
- Plugin Form Submission Best Practice
- $_POST form request with admin-post
- Handling results from data hooked into admin_post
- What is the real intention for admin-post.php?
- What is the recommended way to create plugin administration forms?
- WooCommerce get Shipping Class of product from either the product id or the order after order is completed
- Using AJAX in a plugin to submit form – REALLY confused
- 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
- Check spam in custom form – akismet
- get all products of one category
- Use a PHP file as action for a form in a WordPress plugin, what’s the correct way?
- Woocommerce add custom button to backend order table
- Plugin vs Settings load order (woocommerce dependency)
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- 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
- Print value of an array or variable in a payment plugin
- How to get orders with used coupon in WooCommerce
- How to update total price of completed order in woocommerce? [closed]
- Plugin development: get_post_meta is not working [closed]
- Plugin options page – form with two different submit buttons
- $wpdb -> Batch insert from XML File?
- How do I change the initial quantity of a product in woocommerce?
- Order properties should not be accessed directly
- How to sanitize user input?
- How to check if Woocommerce Order number equals to post ID?
- How do I add custom column to woocommerce cart?
- How plugins_loaded works?
- WooCommerce Conditional Tag inside plugin
- Custom attribute type not displaying terms in edit product – WooCommerce
- wordpress plugin php file processing form
- Show special field when correct shipping is chosen
- update woocommere total value on checkout based on selected payment method
- how to add custom functionality after woocommerce place order button
- How to add custom fields to the all users page
- WooCommerce Admin Reports : Get custom product report based on date range
- Adding a brand column to WooCommerce Products
- 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
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- PHP – Extend WordPress Woocommerce Revenue Analytics with custom field
- Woocommerce – Convert Delivery method into a custom field
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- Woocommerce extend tax report with custom column
- 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 restrict access to image folder depending on whether product is purchased or not?
- How to extend WooCommerce API to show bookable product availability rules?
- Customize WooCommerce my account dashboard through plugin
- woocommerce_checkout_order_processed hook executing function twice
- Is there a way in which I can compare product id with the order id to display content on front end before placing the order? [closed]
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Create custom HTML/JS app inside page
- Plugin Development for registered users
- Is there documentation reference for forms in menu and setting pages?
- Input in plugin widget does not allow spaces
- Avoid updating post when sending POST or GET request to post.php
- Change WooCommerce Email Header using custom plugin
- admin_post equivalent for guest user?
- UWooCommerce – add cart discount programmatically?
- How to only Load scripts on variable products page
- How to design WooCommerce-like admin tabs for plugin settings page?
- Woocommerce: block user removing cart item
- how do I find out if a placed order was deleted or trashed? [closed]
- What is the meta_query key name for the woo product average rating? [closed]
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Return custom product in ajax call loop
- WooCommerce adds a newline symbol (\n) between email recipients
- Hook a search form anywhere on the site, using a custom plugin
- Plugin forms overwrite each other’s options
- 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`
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]
- Custom fields in the billing address section woocommerce
- how to works woocommerce cart hash
- Add File field in WooCommerce Box office plugin
- Woocommerce Payment Plugin with Mycred being the payment processor
- Sticky bar with filter button and product count
- Woocommerce Reviews tab not showing on single product page
- WordPress Cron Job not importing products
- WP_List_Table sortable column with WC_Order_Query doesn’t work
- Resending woo-commerce order emails from frontend
- Create a zip code form
- how to execute a function only when i send an order to trash [closed]
- Are woocommerce_thankyou hook and is_order_received_page() redundant? [closed]
- Weekly cron is either missing the schedule or triggered too many times on Fridays