Okay
This doesn’t work seem to work along with a product category taxonomy
(Taxonomy product category in XX AND Metas attribute_pa_size = large)
Although this may be because variations are not linked to categories. I have got this working by filtering by other variation attributes so this now works as needed, thanks!
As for the other issue, I am also using an advanced shipping plugin that I think is making a lot of get_posts requests so this is what is causing the 500 error when your plugin uses ‘posts_selection’, it would be useful to hook it on to something other than get_posts although it’s not essential.