XF 2.2 Current add-on version

Go to the files for the addon and look in: src -> addons -> "addon author" -> "addon name"

You will find a file named "addon.json" it will include version and additional add-on details.

Example:

1717371227276.webp
 
Yes I know this file, but how can I get by code, like getAddonVersion(), something like that, do you know?
 
To get an array of installed add-ons and their versions you can use:

PHP:
$addons = \XF::app()['addOns'];
 
I got the error [B]InvalidArgumentException[/B]: Container key 'addOns' was not found in [B]src/XF/Container.php[/B] at line [B]46[/B]
Any other way?
 
Back
Top Bottom