I have created a custom post and fields are created by using Meta Box. Now what I am trying to achieve is:
Suppose a user enters 3 IMEI numbers, but when the user hit Publish Button, in Background there should be a loop that enters all the 3 different IMEI number as 3 different posts, where all the other meta keys are same, except the IMEI number meta key.
I just want to know the hook which can filter metadata before saving it to the database.
So far, I have tried, wp_insert_post_data
hook, save_post_{$post->post_type}
, rwmb_before_save_post
and rwmb_after_save_post
.
Is there a way through which I can achieve this?