Hi, I think a work around that i considered and from memory it did work was to set the relationship id via a post select, and then when the post is saved / updated the post ID from the post select is used to set the relationship that is saved in the custom table.
I was then considering using a google webscraper bot to automatically go through and click to update the CPT's one by one to update the relationship.
I suppose the caveat is that you would need to know the ID of the related post and set this in the CSV file prior to uploading, which is a bit of a manual task. But hopefully it would only have to be done once, and everything else would then be done on the new site with the relationships in the custom tables.
function update_client_equipment_relationship_from_client_post_id( $post_id ) {
{
//this was a post select field, but it could just be a text box with the ID set by the CSV upload?
$client_company_to_attach_equipment_to = get_post_meta( $post_id, 'client_company_to_attach_equipment_to', true );
//the relationship in the custom table is then updated using the value from the field, this code wording might be wrong, so you would need to check it carefully for your own use
MB_Relationships_API::add( $client_company_to_attach_equipment_to, $post_id, 'clients-and-equipment', $order_from = 1, );
}
}
add_action( 'rwmb_equipment-details_after_save_post', 'update_client_equipment_relationship_from_client_post_id' );