[Resolved] cannot get parent/child post meta from cred_save_data
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I want to get the child or parent post meta to form the post title when cred_save_data hook, the relationship slug is trainer-coupon, I think the trainer is the parent, and the coupon is the child. Below please find my code, $form_id 257 is a form to create coupons. Please advise me why I can't get the value to variable $m or get the value of the field @trainer-coupon.parent
Hello. Thank you for contacting the Toolset support.
Can you please share problem URL where you added the form and admin access details and tell me where you added the code. I'll have to review your current post relationship structure.
As I understand, you want to get the parent ID based on current child ID and update the parent post details - correct?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
First I am not sure which one is parent and child, for one-to-many relationship, should the one (member) must be parent? if yes, then I want to change the coupon title as c(the coupon post id) - m(member post id).
Is the custom code be stored in database, is there any easy way for me to export the code, I code in function because it looks like more easy to manage.
Ok, if you feel that its easy to manage the custom code in functions.php file its on you, I just shared that Toolset also offers the place where you can add custom code.