Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templete child #5

Open
marcs84 opened this issue Dec 12, 2017 · 1 comment
Open

Templete child #5

marcs84 opened this issue Dec 12, 2017 · 1 comment

Comments

@marcs84
Copy link

marcs84 commented Dec 12, 2017

Hi,
the "replace_template" function in the "frontend.php" file does not seem to consider the existence of child themes.

I think it should be changed as follows:

public function replace_template($template)
{
        // see if tempalte exists in the theme child
        $template = locate_template('woocommerce/password-form.php');

        if (empty($template)) {
            // if no, use theme template
            $template = get_template_directory() . '/woocommerce/password-form.php';
        }

        if (empty($template)) {
            // otherwise use default plugin template
            $template = WCL_PLUGIN_DIR . '/templates/password-form.php';
        }

        return $template;
}

What do you think about it?

Thank you
Marco

@lukasjuhas
Copy link
Collaborator

Hey @marcs84,

You are right, there is no support for child themes. Thanks for that, will push this in the next release!

Lukas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants