PHP: Class extends problem "Call to private method ... from context ..." PHP: Class extends problem "Call to private method ... from context ..." wordpress wordpress

PHP: Class extends problem "Call to private method ... from context ..."


You must declare your method protected, rather than private, if you wish child classes to be able to use it.


use protected function if you would to access a child functions from your extended class's without passing the protected function in URLs

for example

protected function somemethod() { // your code goes here }