Anyone know of a way to add a prefix to the WordPress user ID when the user registers via WooCommerce checkout?

This new user ID format would need to be stored in the WP database in the default user ID column.

Example: abc-1

Thank you

  • 2
    the actual user ID is numeric only is the database, you may be able to prefix the username, but this is overkill too if you just want to determine if that is where the user registered, you can probably add a user meta value for that instead. – majick Dec 6 at 0:42
  • The reason for the user ID prefix is: multiple WP sites send user data to a remote non WP site and creates an account for WP user on the remote site; one of the data fields sent is the user ID, so there is a crossing over of data from the multiple WP sites, as the remote site stores and retrieves data based on user ID. – Richard Dec 6 at 5:09
  • hmmm well in that case you need some other way to distinguish this not just user ID - probably easier to just check the request referer string at the remote site. – majick Dec 7 at 20:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.