• Resolved gaspar

    (@gaspar)


    Woocommerce (WC) still searches templates from current LIVE theme folder!

    For example:
    live-site/ (LIVE)
    demo-site/ (TS)

    Then viewing WC archive page (archive-product.php), and it is missing in TS folder, it will go to LIVE folder, not to WC default folder.

    I guess it is related to wc_get_template() function.

    Can it be fixed?

    • This topic was modified 4 years, 10 months ago by gaspar.
    • This topic was modified 4 years, 10 months ago by gaspar.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    (@specialk)

    I’m not sure what might be happening, are you noticing any related errors in the site debug or error logs?

    Thread Starter gaspar

    (@gaspar)

    Well, the main problem is it caches the result.
    It creates hash based on template name.
    The hash is same for original and switched theme.
    Same thing with wc_get_template_part().

    Plugin Author Jeff Starr

    (@specialk)

    You might want to ask the Woo folks. Theme Switcha does not cache anything.

    Also, and this is just fyi and for the sake of anyone else reading. As explained in the plugin documentation, Theme Switcha switches only the theme template. So even when you switch themes, the same database content will be used to display your content. So that includes things like post content, search results, and any/all other queries (on the front-end or backend). All that Theme Switcha does is change the theme template.

    • This reply was modified 4 years, 10 months ago by Jeff Starr. Reason: Adds infos
    Thread Starter gaspar

    (@gaspar)

    Well.. The problem is your plugin can not change theme template because it is not compatible with woocommerce – that was my point. I just wanted to let you know. And maybe to get some advice or future update.
    At least add this to your plugin description so everyone else knows it and do not spend time to figure it out why it is not working.

    Have a nice day.

    Plugin Author Jeff Starr

    (@specialk)

    Okay thanks for the heads up. Will investigate this further for the next plugin update. Will try to fix any bug, or if not possible will add a note to the plugin description, as you suggest. If you discover any further/related infos, please let us know. Thank you.

    • This reply was modified 4 years, 10 months ago by Jeff Starr. Reason: Adds infos
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with Woocommerce templates’ is closed to new replies.