Open app/setup.php
, find the after_setup_theme
action and put add_theme_support('woocommerce');
inside the function.
Add the templates you want to override in resources/woocommerce
:
theme
│
important The advice in this gist will increase the size of the documents you send to the browser (ever so slightly), so technically it's bad for performance. However, if for any reason you want to achieve zero W3C validation errors when using lozad.js
in Roots/sage you can follow the instructions below.
Open app/controllers/app.php
and add the following to the class:
public static function fakeImg()
{
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
}