Inside one of small custom plugins I really need to inlcude a file from another plugin, in order to be able to create and save obhect of a class that is declared there.
What I have tried and the closest is this:
include_once($plugin_url.'plugin-name/classes/event.php');
The error I get in the debug logs is the following:
PHP Warning: include_once(http://.../plugin-name/classes/event.php): failed to open stream: no suitable wrapper could be found in ..
I wonder what would be the correct way to reuse the logic of that class to only be able to create and save objects.
Any help or guidance is much appreciated.
plugin_basename
to grab a variable and try a relative path ? codex.wordpress.org/Function_Reference/plugin_basename