How can I get the variable $components out of this class and private function:
class WPCF7_Mail {
private function compose() {
return $components;
}
}
This is my best attempt:
class test extends WPCF7_Mail {
function compose( $send = true ) {
global $components;
}
}
new test();
global $components;
echo $components;
But I keep getting:
Fatal error: Call to private WPCF7_Mail::__construct() from invalid context
Edit: I cannot modify the class WPCF7_Mail. So I cannot make the function compose public.