How to add user id as product SKU with WP User Frontend product form.

You can follow the instructions given below to insert user id as product SKU.

1) Add a hidden field to the product form you created & insert _sku meta key to that field.

​Refer Screenshot:

2) Now, 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)


​All done, submit a product using frontend product form & check the product SKU in wp-admin. The SKU id will be the user id.

By Mahbubur Rahman

Self Taught Programmer And Learning Enthusiast

Leave a comment

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