I'm trying to write a function that I can piggyback onto a WP All Import from a CSV.
I have two custom post types, "Team Members" and "Locations" - they have a successfully connected relationship and it works with manual assignment.
However, the assignments are subject to change on a weekly basis, so I need to be able to update these via an import. Typically, we use a CSV.
The Relationship ID is: team-member-locations
The Team Member slug is: team
The Location slug is: location
The CSV import has the respective location post ID for each team member, some of which are multiple location IDs separated by a pipe delimiter.
The column in the CSV for location IDs is called "marketingareas"
The column for Team Member Post IDs is called "id"
New Team members won't have an ID out of the gate, but that's not a huge deal for solving this problem.
How can I accomplish this? Is there an easier way to do this or a recommended import plug that can handle this?