WordPress plugin Write User/staff ID as the same as the WordPress User ID

I have a question in regards to a WordPress plugin (Bookly) that creates a Staff ID for an already created WordPress user, and hopefully, somebody may be able to help me with.

Currently Bookly adds the Staff ID incremental so each new staff ID would say Staff ID:4 then the next 5 then 6 etc,
I’m looking for some code that would take the current WordPress user’s ID and add that ID as the Staff ID for that user when they are creating a Staff ID for them.

Any help much appreciated.

Thanks
Ryan

2 Answers
2

Because the database table is set up to auto increment then you can’t change the ID to match user ID without redesigning the database tables. This would be fine except you wouldn’t be able to update the plugin without remaking the changes each time.

Leave a Comment