I'd like to create a Solspace Calendar Event on Commerce
onOrderComplete. I've done this with Charge where on Charge Success an event was created however I know that I did that in a less than ideal way so hopefully the answer to this allows me to both achieve what this question is asking as well as fix my previous plugin (that works but just seems less than ideal).
I'd need to pass some of the fields from the Order Fields such as the Start Date, End Date, Products Purchased.
I know i need to create a plugin for this, i'm just not quite sure how to call the Solspace Calendar plugin
onOrderComplete and send it the appropriate data to create said event. Any help (with examples if possible) would be greatly appreciated.
To clarify: I am not looking for someone to write a plugin for me. I am simply looking to be put on the right track in terms of connecting to Solspace Calendar and sending it the appropriate data on completion of a commerce order. I can write the code myself once pointed in the right direction.