Hi Alexander
Many thanks for your very prompt reply. Forgive two really dumb questions: firstly what is $opts_arr for? Is it an optional array for passing data in to the function? and secondly: how is the $data, which is returned from the function, passed to the product shortcode – or am I barking up the wrong tree?