I am developing a plugin by using classes and object oriented programming.
Within my plugin I have included another object as I need to use the functionality of this other object.
I am instantiating the included object within my plugin’s constructor.
public function __construct()
$this->IncludedObject = new IncludedObject();
public $instanceVar = ‘defaultValue’;
public function getInstanceVar()
public function setInstanceVar($instanceVar)
$this->instanceVar = $instanceVar;
The $instaceVar is updated after an ajax action within my HTML form commanded by my plugin. So, from the handler within my plugin I call setInstanceVar($_REQUEST[‘newValue’]);
The problem I am facing is that $instanceVar never gets updated and always have the ‘defaultValue’.
Can anyone shed some light on this issue?
Read more here:: OOP Plugin Development. Including external object