Hello JoomShaper Support,
I would appreciate your advice on an unusual EasyStore shipping-plugin issue I am currently investigating.
I have developed a very small custom shipping plugin for which uses EasyStore's CommonShippingPlugin and subscribes to:
onEasyStoreGetShippingMethods
The plugin is working correctly on my local MAMP development installation, but the same plugin is not working on my hosted DEV installation.
Both installations are now running:
- Joomla 5.4.8
- EasyStore 2.1.0
I have also confirmed that the plugin source files are identical in both environments, including:
GoSweetSpot.phpCommonShippingPlugin.phpservices/provider.php- the plugin XML manifest
The Joomla #__extensions records are also effectively identical apart from the extension ID and the saved API credentials.
I have traced the execution on the hosted DEV site and established the following:
-
CheckoutController::getShippingCarriers()is definitely being called. -
It successfully finds the configured carrier:
GoSweetSpot -
PluginHelper::isEnabled('easystoreshipping', 'GoSweetSpot')returnstrue. -
PluginHelper::importPlugin('easystoreshipping', 'GoSweetSpot')completes successfully. -
The GoSweetSpot plugin's own
getShippingCarriers()method is definitely entered. -
The shipping address is correctly passed into the event, including country, state, city, postcode, address line 1 and address line 2.
-
The event being dispatched is:
onEasyStoreGetShippingMethodsand the event object is a
Joomla\CMS\Event\GenericEvent. -
However, on the hosted DEV installation, the plugin's:
onEasyStoreGetShippingMethods(Event $event)method does not appear to be invoked, so no shipping methods are added to the event and EasyStore ultimately receives
NULLforshippingMethods.
On the local MAMP installation, the same code and event mechanism works and live shipping rates are returned correctly from the plugin.
There is also a secondary symptom on the hosted DEV installation: the GoSweetSpot plugin configuration fields appear without their language labels, displaying the language keys instead (for example ??PLG_EASYSTORESHIPPING_GOSWEETSPOT_ACCESS_KEY_LABEL??). Language debugging confirms that Joomla is attempting to resolve those keys but is not finding the translations. The same plugin displays all labels correctly on MAMP.
I have checked the plugin XML language declarations, language files, namespace, service provider and extension database record, and cannot find a difference between the two installations.
The relevant part of CommonShippingPlugin is:
public static function getSubscribedEvents(): array
{
return [
'onEasyStoreGetShippingMethods' => 'onEasyStoreGetShippingMethods',
];
}
and the plugin class extends CommonShippingPlugin and implements the corresponding method.
At this point I am wondering whether there is anything in EasyStore 2.1.0's plugin loading/event registration mechanism, or in the way Joomla 5.4.8 loads EasyStore shipping plugins, that could cause the subscriber not to be registered correctly on one installation even though the plugin itself is identical.
The fact that the plugin works correctly on the local installation makes me suspect an installation, extension registration, caching/autoloading, or environment issue rather than the GoSweetSpot code itself.
Before I start reinstalling Joomla or EasyStore on the hosted DEV site, I would really appreciate your opinion as to what might cause this behaviour, or whether there is anything specific within EasyStore's shipping-plugin architecture that you think I should check.
I have deliberately kept the custom plugin very simple, so I am hoping this may be something familiar from EasyStore's side.
Many thanks for any guidance you can provide.
Regards,
Bruce Paine