Get module version in Prestashop

半城伤御伤魂 提交于 2019-12-24 21:15:06

问题


I have a module installed on my Prestashop and I want to get its version

How can I do this in my code ?

Let's say for example I want to get "v5.0.1"

Thanks for the help !


回答1:


$module = Module::getInstanceByName('bienvenue');
$version = $module->version;



回答2:


The version is set in the module file like that:

public function __construct()
{
    $this->name = 'bienvenue';
    $this->version = '5.0.1';

    parent::__construct();

    /* Else code... */
}


来源:https://stackoverflow.com/questions/52273359/get-module-version-in-prestashop

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!