Reducing WooCommerce Password Difficulty

Your customers, who are members of your e-commerce site prepared with WooCommerce, often go through a difficult registration process. The most important factor that makes this process difficult is the difficulty level of the password. The system will be asked to create a strong password while the customer is registering on the site. Because of […]

How To Disable File And Folder View In WordPress

Your customers, who are members of your e-commerce site prepared with WooCommerce, often go through a difficult registration process. The most important factor that makes this process difficult is the difficulty level of the password. The system will be asked to create a strong password while the customer is registering on the site. Because of this password difficulty level, customers have to create a password with characters they cannot remember.

If you want to reduce or remove the WooCommerce password strength, you can do this with a simple code which you can add to your theme. What we want to do here is not to make it easier for users to enter a simple and easily guessable password, but rather to set a password that they use and will not forget.

Set WooCommerce Password Difficulty Level

WooCommerce can make the password strength parameters for e-commerce sites editable and you can use the simple code content below to change the password strength.

/*
* Reducing WooCommerce Password Difficulty
* Difficulty levels:
* 0 = No difficulty 
* 1 = Basic
* 2 = Middle
* 3 = Hard (default)
*/

add_filter( 'woocommerce_min_password_strength', 'wpglorify_woocommerce_password_filter', 10 );
function wpglorify_woocommerce_password_filter() {
return 2; }

You can edit the WooCommerce password strength by adding the above code to your theme’s functions.php file. You can edit the level by making the “return 2” field in the last line of the WooCommerce password function, which comes at the 3rd difficulty level, as 1 or 3 by default.

How to add code to Functions.php file?

Accessing theme files is difficult for most users. In some cases, adding code may cause your site to break. You can use the Code Snippets plugin developed for WordPress to avoid such a problem.

You can install the Code Snippets plugin by going to the WordPres administration panel> Add-ons> Add New tab and typing “Code Snippets” in the search field. After the plugin is installed, you can go to the administration panel> Snippets area and add the code I shared above and share it. For example:

You can send me all your questions about the use of the code and the Code Snippets plugin in the comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *