This integration tries to make it easier to develop Timber themes for WooCommerce.
Here’s a short list of features it adds and problems it tries to solve:
- Automatic handling of the
$product
global. Whenever you loop through a list of WooCommerce products, the integration will set the$product
global for you. This will improve compatibility for WooCommerce and its integrations. - Enhance Timber’s context.
- Automatic Twig partial selection.
- Provide default templates, tips and examples.
This integrations makes sense if you need to develop a highly customized WooCommerce theme in a Timber context. If you try to stick to WooCommerce’s default as much as possible, you might not need this.
Here are a couple features that are not yet integrated, but would be good contribution opportunities:
- Add support for tag templates.
- Add support for WooCommerce galleries. Maybe only documentation is needed?
- Add testing.
- Write a simple function to wrap a WooCommerce template.
- Add filter to filter current menu item classes for shop page.
- Hint about adding WooCommerce support to the theme (https://woocommerce.wordpress.com/2017/12/09/wc-3-3-will-look-great-on-all-the-themes/).
- Check compatibility with https://woocommerce.wordpress.com/2017/12/11/wc-3-3-image-size-improvements/
- Documentation: Add hint about using
woocommerce_before_template_part
andwoocommerce_after_template_part
to wrap a template.