Decided to have quick peek at and a play around with Sage 9.
There seems to be an issue with WooCommerce and the Wrapper in Sage 9.
On all WooCommerce pages, the main content area is blank and I get the following PHP warning…
Warning include(): Filename cannot be empty wp-content/themes/sage-9/templates/layouts/base.php:17
I had this same issue this week and the only way I got around it was to copy the wc template files in to the template directory and not have them in a sub directory such as templates/layouts/woocomerce/
This annoyed me a little, but I’ve not had the time to figure out what is needed to organise it how I want … yet.
Check out this blog post covering best practices integrating WooCommerce with Sage: https://roots.io/using-woocommerce-with-sage/. The steps in that post should solve your PHP warning as it removes the unnecessary get_header(), get_sidebar() and get_footer() calls WooCommerce is making.
Let me know if you have any post-review followup questions as I’ve been using WooCommerce with Sage for some time now and I’m happy to help!
@gnowland Thanks, but this is with regard to Sage 9 specifically - it works differently from earlier versions of Sage. With the current version of Sage 9, it seems that you must have copies of single-product.php and archive-product.php in your theme directory when using WooCommerce.
After @Ash_Bryant replied to my post, I did a bit more digging around. WooCommerce shop/single/category/tag pages all seemed to be broken on Sage 9. It seems there is some kind of clash between Sage 9 and WooCommerce when WooCommerce attempts to locate templates from the WooCommerce plugin folder.
As you’re aware, with WooCommerce you can override their templates by copying them to a woocommerce directory within your theme. However, with Sage 9, you have to copy single-product.php and archive-product.php into your theme, otherwise it doesn’t work. WooCommerce template partials (those included vie wp_get_template()) seem to work fine.
In Sage 9, the single-product.php and archive-product.php can go in the root of your theme folder or inside the templates directory.
@emzo, glad you got it working! Yes, that post is what helped me when I was testing Sage 9 because step one of that blog post is to create archive-product.php and single-product.php in your theme directory
Thanks for the link to single_template filter from plugins thread, that makes sense!
Yes, I had to put a taxonomy-product_cat.php and taxonomy-product_tag.php into my theme to avoid these errors (as well as single-product.php and archive-product.php).
This wasn’t the case with previous versions of Sage - seems to be a regression with Sage 9. The template wrapper code has changed quite a bit in Sage 9.