- This topic has 2 replies, 2 voices, and was last updated 2 years, 2 months ago by .
I am new to metabox relationships and I am really loving it. It makes everything a lot easier and faster 🙂
I am currently having one problem. I have a custom post type to custom post type one to many relationship. The first custom post type is customer and the second is invoice. So one customer can have many invoices. The problem I have is that on the invoice edit page I can only see the connected customer, but I can’t display any other data. I need some other data of the customer to display on the edit page (because on the invoice page you can create a PDF of the invoice on client-side and the invoice needs to display the customer data). I know I could create a lot more meta boxes like customer address, customer name and so on and fill them with customer data by retrieving the data after querying through connected posts and hooking into a hook like ,save_post’. But this would mean that all the data would be saved twice in the database, once in the table for customers and once in the table for invoices.
I am asking myself if there is another and maybe easier option to show more data than the connected post name.
Thank you for your time & help!
- You must be logged in to reply to this topic.