I would like to to synchronize post expiration date. I have two post types, public listing and restricted listing. When a restricted listing goes draft(post expiration set by your form), I would like its child post Public List goes to draft too.
How can I do this?
Is there any documentation that you are following?
Our APIs don't include any events for when posts are expired, but you could use the standard WP hook save_post to check whether one of the restricted listing posts is being updated and to set the post status of the related public listing to have a matching status.
I'm not sure how your restricted and public listings are connected, but if it is via a Types relationship then you would need to use the API function toolset_get_related_post or toolset_get_related_posts to retrieve the ID of the public listing you need to update.
It is one-to-one relationship. I am not a coder (that is a point of using Toolset for me) so I don't know how to start.
Could you possibly provide a sample code or something??