I've got a custom add-on/extension that extends the Store module by tapping into the store_order_complete_end hook to save details of an order to an XML file stored on the server.

I want to access this method from within another plugin. How best to achieve this? In Craft CMS I would abstract this method in my first plugin into a service that could then be called by another add-on. However, my EE is a bit rusty and not sure how best to achieve this in EE (EE2).

Thoughts appreciated.

Cole

I agree with the advice provided by Brian in EECMS Slack. You can do this:

require_once PATH_THIRD . 'your_addon/somefile.php'
$someFile = new SomeFile();
$someFile->method();

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.