Title: Remove password input wrapper
Last modified: April 17, 2021

---

# Remove password input wrapper

 *  Resolved [johndbd123](https://wordpress.org/support/users/johndbd123/)
 * (@johndbd123)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/remove-password-input-wrapper/)
 * Hi there,
 * Every time a password input is used, e.g. on the log-in page, or within the my-
   account page (to change the password), Woocommerce seems to be adding a span 
   with the class “password-input” around that input element.
 * So where a text input looks like this:
 *     ```
       <div class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
       <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" ... >
       <label>Text</label>
       </div>
       ```
   
 * A password input always ends up looking like this:
 *     ```
       <div class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
       <span class="password-input">
       <input type="password" class="woocommerce-Input woocommerce-Input--password input-text" ... ">
       </span>
       <label>Password</label>
       </div>
       ```
   
 * This only happens on password input elements as mentioned, and I would like to
   prevent Woocommerce from doing that.
 * After a bit of research, it seems to be the **assets/js/frontend/woocommerce.
   js** file that is responsible for this.
 * Starting from line 84, Woocommerce triggers the following JS:
 *     ```
       // Add 'password-input' class to the password wrapper in checkout page.
       	$( '.woocommerce form input' ).filter(':password').parent('span').addClass('password-input');
       	$( '.password-input' ).append( '<span class="show-password-input"></span>' );
       ```
   
 * My question would be, how exactly I can either modify the woocommerce.js file
   and remove the function above, or potentially prevent Woocommerce from executing
   this bit of JS in the first place?
 * Thanks a lot in advance!
 * Best,
    John
    -  This topic was modified 5 years, 1 month ago by [johndbd123](https://wordpress.org/support/users/johndbd123/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Gabriel – a11n](https://wordpress.org/support/users/gabrielfuentes/)
 * (@gabrielfuentes)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/remove-password-input-wrapper/#post-14332165)
 * Hi John 👋
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.
 * I can also recommend [the WooCommerce Developer Resources Portal](https://developer.woocommerce.com/)
   for resources on developing for WooCommerce.
 * You can also visit the [WooCommerce Facebook group](https://www.facebook.com/groups/advanced.woocommerce/)
   or the `#developers` channel of the [WooCommerce Community Slack](https://woocommerce.com/community-slack/).
   We’re lucky to have a great community of open-source developers for WooCommerce,
   and many of our developers hang out there, as well.
 * Cheers.
 *  Plugin Support [Gabriel – a11n](https://wordpress.org/support/users/gabrielfuentes/)
 * (@gabrielfuentes)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/remove-password-input-wrapper/#post-14363481)
 * We’ve not seen any activity on this thread for a while, so I’m marking this thread
   as resolved.
 * Hopefully, you were able to find a solution to your problem! If you have further
   questions, please feel free to open a new topic.
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove password input wrapper’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gabriel – a11n](https://wordpress.org/support/users/gabrielfuentes/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/remove-password-input-wrapper/#post-14363481)
 * Status: resolved