I have this code example, where I am not receiving the value of $something in the passData() function, since null comes, what is happening, this is code example:
class ClassName extend X {
private $something;
public function __construct() {
parent::__construct();
add_filter( 'woocommerce_before_checkout_form', array($this,
'createText') );
}
function createText() {
$property = 'xthing';
$this->something = $property;
return $this->something;
}
public function passData() {
$somethingMore=$this->something;
}
}
i expecting $something get data in function passData()