2

I need to call an extension or module method from a plugin.

Anyone know how to do that?

Eventually solved with this code:

include_once(PATH_THIRD.'extension/mod.extension.php');
$this->EE->load->add_package_path(PATH_THIRD.'extension/'); 
$ext = new Extensionclass();
$PI = $ext->extension_function($params);
3

You can do it with the following example code within your plugin:

require_once PATH_THIRD."modulename/modulefilename";
$obj = new ModuleClass();
$obj->module_method();

Hope, it would help you.

| improve this answer | |
  • Similar to how I eventually figure it out. Thanks. – MB34 Jul 16 '13 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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