The ll/tracking_args
filter is called by the track_conversion()
method, and this function is added to the execution in the constructor of the CustomGF
class.
The GFChild
class has its own constructor, so the constructor of the base class CustomGF
is not executed. In the GFChild
constructor also add track_conversion()
function to ll/tracking_args
filter or call parent constructor.
class GFChild extends CustomGF {
public function __construct() {
// Events tracking
add_filter( 'gform_after_submission', [$this, 'track_conversion'], 10, 2 );
add_action( 'gform_after_submission_9', [$this, 'submission_business_visit'], 10, 2);
}
}
Or
class GFChild extends CustomGF {
public function __construct() {
//
// call parent constructor at the beginning or end
//
parent::__construct();
add_action( 'gform_after_submission_9', [$this, 'submission_business_visit'], 10, 2);
}
}