Useless database query in hikashopPluginsClass::getByName()

  • Posts: 24
  • Thank you received: 1
2 hours 22 minutes ago #369858

-- HikaShop version -- : 6.1.1
-- Joomla version -- : 5.4.1
-- PHP version -- : 8.3.0

It's better to use native Joomla plugin helper to get plugin params, it utilizes native Joomla caching of plugins.

    public function getByName(string $type, string $name): ?\stdClass
    {
        $plugin = \Joomla\CMS\Plugin\PluginHelper::getPlugin($type, $name);
        if ($plugin) {
            $this->loadParams($plugin);
        }

        return $plugin;
	}

Last edit: 6 minutes ago by Denitz.

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum