0

I'm using Virtuemart 3 and Joomla 3, after upgrarding to VM 4 and Joomla 4, it say error Class 'JDispatcher' not found from JROOT/plugins/vmshipment/rules_shipping_advanced/rules_shipping_framework_joomla.php:39

This is the error causing code part:

JPluginHelper::importPlugin('vmshipmentrules'); $dispatcher = JDispatcher::getInstance(); $defs = $dispatcher->trigger('onVmShippingRulesRegisterCustomFunctions',array()); 

I have done many search on google but no result, can you help?

1 Answer 1

2

I found a solution, it works.

use Joomla\Event\Dispatcher as EventDispatcher; $dispatcher = new EventDispatcher(); $defs = $dispatcher->triggerEvent('onVmShippingRulesRegisterCustomFunctions',array()); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.