When a plugin's method connected to a signal is executed, calls to $this->getConfig()
are empty.
How do I get the instance, or id of the instance, which called the method? So that it can be passed into ->getConfig($instance)
?
Looking at some other plugins they use $this->getInstances()->first()
which is not helpful as it always returns the first instance.
(I have two active instances and the method is called twice, so I don't want to loop through all active instances and process each as I will end up duplicating actions)
Edit: Clarity