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
- 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
- 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
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- set_sale_price in WooCommerce [closed]
- Best Practices for Creating and Handling Forms with Plugins?
- Print value of an array or variable in a payment plugin
- How to update total price of completed order in woocommerce? [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?
- How to sanitize user input?
- How do I add custom column to woocommerce cart?
- WooCommerce Conditional Tag inside plugin
- Custom attribute type not displaying terms in edit product – WooCommerce
- Show special field when correct shipping is chosen
- 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/WordPress: how hide entire table form after submit (Admin Dashboard)?
- “import declarations may only appear at top level of a module” when importing WooCommerce API node module
- Woocommerce extend tax report with custom column
- Show disclaimer with accept button before redirecting to the payment gateway website
- 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?
- 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]
- Change WooCommerce Email Header using custom plugin
- admin_post equivalent for guest user?
- UWooCommerce – add cart discount programmatically?
- The Correct Way to Use Nonce Field without Settings API
- How to add search form in main page body?
- Woocommerce inventory [closed]
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- How to change WooCommerce loop product title HTML output in single product page and archive page
- How to make and save custom form in custom plugin page?
- Catching Form Submission in WordPress Admin Panel
- WooCommerce Endpoints content
- How remove trashed WooCommerce orders from wc_get_orders() result?
- How to call code when adding WooCommerce menu items via woocommerce_account_menu_items
- Duplicate shipping method logic to another shipping method [closed]
- Custom Plugin Options Won’t Update
- Hide one specific woocoomerce product
- get_shipping_methods() return empty rate
- Submit form to a different PHP file in the same plugin folder
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- WordPress: redirecting to the form page after form submission to admin-post.php
- wp_schedule_single_event is set correctly but sometimes not fired
- Change reminder email date to 14 days before
- How to make every image title equal to alt text(wordpress/woocommerce)?
- Pass Values in URL on WooCommerce Product Page
- Woocommerce place order update shipping price
- How to create a custom post-new.php page for plugin , no wp menu
- product-attribute-slug-is-too-long-28-characters-max
- Information and Page from WordPress Plugin
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- How do I add filter with woocommerce categories?
- Getting products information, in woocommerce based on products ID
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- PHPUnit Testing and woocommerce Constant
- WC REST API Error Handling
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- want to confirm popup with “Yes” and “No” button when user click on add to cart
- How to remove the WooCommerce Product->Category thumbnail from admin [closed]
- Woocommerce Single Product Tabs Got Duplicate
- Woocommerce product not appearing in category list page when created programatically [closed]
- Override WooCommerce files from plugin
- woocommerce add a new bulk action in the bulk actions dropdown in the orders list
- Use admin-post to submit form data to external database
- external Integration with wordpress timeout error
- Handle changed Woocommerce function
- Making Woocommerce optimized for more than 500k products
- How to retrieve custom profile fields associated with different users
- form does not generate $_POST request
- Acessing WP functions in form submission handler
- Declaring a new woo commerce product type i get this error
- Can I use a hook other than ‘init’ to handle form submissions?
- wp_mail links are dead
- Tracing dashboard publish settings from input form in WordPress
- Post data in wp-admin to external database
- Multi-part form and wp_redirect()
- Submitting a plugin form to database in admin page
- 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]
- 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]