How to create unique SKU with WP User Frontend custom field.

The unique SKU of the products is not being set when the products are created. To add unique SKU with products, then follow the instructions given below.

1) Add a custom text field with _sku to the product form.


2) Add the following code inside the theme’s functions.php file.

Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact me for assistance.

GeSHi Error: GeSHi could not find the language php (using path /home/mahbktbn/public_html/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

3) Now, try to submit a product using the frontend product form. Use an existing SKU related to other product. You will see the following error.


All done.

By Mahbubur Rahman

Self Taught Programmer And Learning Enthusiast

Leave a comment

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