Hey,
I’ll look into it. the [add_to_cart id=”xx”] shortcode is relating to woocommerce, no? Since Fontsampler itself is included as a shortcode, I doubt that a shortcode in the output generated by Fontsampler can be processed, but I’ll have to check how WordPress handles this, and if there is something that would enable this kind of nested shortcode.
By default the buy and specimen buttons expect a link, and will generate a link element with a href of the passed in value. It would require some kind of alteration to allow for passing in another shortcode instead.
I am wondering if it would be easier to pass in javascript code to trigger the desired event. I don’t the exact specifics of Woocommerce, but if it exposes some add to cart -method you could call this from the buy link, giving it a value of “javascript:addToCart(‘xx’);return false;” or something like that, assuming there is a “addToCart” method of Woocommerce.
I’ll try to have a look at this within the next week and get back to you. Let me know if you find anything out about this javascript approach I suggested.