WordPress redefine class or class method on child theme

I have a theme on WordPress called A and his child called A-child.

On A child I have on A/includes/projects.php a class called project and I want to redifend one method inside this class called method1().

Read More

First that I tried is to re-create the same structured on A-child theme : A-child/includes/projects.php and on functions.php put the require_once but the site crashed. Without the require_once nothing happens.

The other thing that I tried is to redifined the method1() on functions.php and no luck, nothing happens again. I thought obvious, but no one knows.

EDIT:

I need that when on the A Theme call $project->method1();
execute the method1() redefined on my A-child Theme.

Any help?

Related posts