I have in my theme custom post types (products) with some meta-boxes. My client asked me, to automaticly give a unique SKU (meta-box) while saving that product.
My thought:
Give a random ID => have to check if that ID somewhere else exists OR
Give the Post-ID => that is just possible after saving once, cuz WP assign that ID while saving.
@Milo Give"additionally, a random ID => have to check if thatnew post already has an ID somewhere else existsbefore the user saves the post" GiveHow can I get the Post-ID => that is just possible after saving once, cuz WP assign that ID while saving.
Anyone got an idea to resolvebefore I save the post and put it into that elegantmeta box and save it with a new post at once?
Thanks