STYLESHEETPATH points to "resources" and not to "resources/view"

I am using the latest sage 9.0.0-betta.4.

I appears that STYLESHEETPATH constant points to /srv/www/
and not to
as specified in comments in resources/functions.php, see below


  • Here’s what’s happening with these hooks:
    1. WordPress initially detects theme in themes/sage/resources
    1. Upon activation, we tell WordPress that the theme is actually in themes/sage/resources/views
    1. When we call get_template_directory() or get_template_directory_uri(), we point it back to themes/sage/resources
  • We do this so that the Template Hierarchy will look in themes/sage/resources/views for core WordPress themes
  • But functions.php, style.css, and index.php are all still located in themes/sage/resources
  • This is not compatible with the WordPress Customizer theme preview prior to theme activation
  • get_template_directory() -> /srv/www/
  • get_stylesheet_directory() -> /srv/www/
  • locate_template()
  • ├── STYLESHEETPATH -> /srv/www/
  • └── TEMPLATEPATH -> /srv/www/

This gets in the way of overriding woocommerce templates.

In what specific context are you encountering this problem? i.e. can you provide some of your code, or some errors, that illustrate the problem you’re having?

I actually found a way around this. My woocommerce overrides used to live in resources/views/woocommerce, i was expecting this to continue to work in this incarnation of sage 9 too. But it looks like things have changed. So, the work around was to move woocommerce overrides one level up to resources/woocommerce.