0

File: wp-content\themes\theme-t\includes\classes\ClassX.php

class ClassX extends Base {
    public function some_logic() {}
}

I want to change the logic of some_logic() via child theme, how it is possible?

0

1 Answer 1

1

Based on the information provided? You can't, it's not possible.

Child themes can only override code from parent themes if the parent theme explicitly provides a way for child themes to do so. They can do this by providing a hook, or by making functions 'pluggable', but class methods can't be pluggable.

Not the answer you're looking for? Browse other questions tagged or ask your own question.