Thanks for the help, here's what I've been working with to try and get it to work based on your post and the examples you listed for dealing with a Relationship between one custom post type, (slug='offer'), to another custom post type, (slug='listing'). I've confirmed that the Relationship ID is 'listing-to-offer-relationship' by going to Meta Box > Relationships > Listing to Offer Relationship and copying it from there.
/**
* Allow Meta Box Relationship to use post statuses besides just Published
*/
add_action( 'mb_relationships_init', function() {
MB_Relationships_API::register([
'id' => 'listing-to-offer-relationship',
'from' => [
'object_type' => 'post',
'post_type' => 'listing',
'field' => [
'query_args' => [
'post_status' => array( 'publish', 'draft' )
],
],
],
'to' => [
'object_type' => 'post',
'post_type' => 'offer',
'field' => [
'query_args' => [
'post_status' => array( 'publish', 'draft', 'accepted', 'rejected' )
],
],
],
]);
});
Nothing I test has been working for me though. When I have an custom post type 'offer' in draft I can see the connected custom post type 'listing' just fine. But when I view the connected 'listing' the connected 'offer' is blank. I've tried to set the 'post_type' in both the from and to arrays to 'post' instead of 'offer' and 'listing' which didn't seem to help. I've also tried to wrap it with your example 'function your_prefix_function_name() {' instead of 'add_action( 'mb_relationships_init', function() {' and that didn't work for me either.
I've also tried to add post statuses through the Meta Box interface under Meta Box > Relationships > Listing to Offer Relationship > From > Field > Query args:
key=post_status value=publish
key=post_status value=draft
key=post_status value='publish'
key=post_status value='draft'
key=post_status value=array('publish','draft')
Along with the other matching To > Field > Query args and that didn't work either.