I have a custom post type called 'programmes' that details seminar information. Using a form visitors to the site can signup to a specific 'programme', once they have completed the form a new user is created with the following user meta:
- programme_id - the post ID of the 'programme' registered on
- programme_name - the title of the 'programme' registered on
- programme_end_date - the date the 'programme' ends
The 'programme' dates are often changed (due to venue availability etc) after users have already registered, as a result I need to update the programme_end_date user meta field when these changes happen.
I know it's going to be some combination of the
save_post action along with
update_user_meta and presumably a loop to check for all the users that have the specific updated 'programme' ID in the programme_id user meta field, but I can get my head round exactly how to do it. Any pointers would be excellent.