Hi wcpro123
The "get_product_inventories_sorted" is the right method to alter as it's where the priorities are set.
But we don't recommend to change the code on the plugin files directly as this would be overwritten on the next update. So using a hook it's always better.
That said, I'm not sure if only using the hook you've stated would be enough as this method is being used on more places.
We are open to add more custom hooks to ATUM if necessary, so I think in your case it would be very helpful to have a filter on that method before returning the $inventories. So I'm going to add this filter there:
LINE 430:
return apply_filters( 'atum/multi_inventory/product_inventories_sorted', $inventories, $product_id, $not_write_off );
This will go on the next MI version, so you can add it now and start using it 😉
Happy to share resulting code with you for future use, whatever I come up with for other users here.
That would be great. If you share your code with us, we'll review it and will integrate it within Multi-Inventory core.
Best Regards,
Salva.