- Fixed a bug when product global is not present on singular product pages.
- Updated PHP requirements to allow PHP 8.0 and higher.
- Fixed a couple of issues with
$product
global not being kept in sync. - Added small improvements in documentation.
- Improved when this integration applies Product classes and Product Iterators to single posts and lists of posts. This should make it easier to have collections of WooCommerce products and other WordPress post types on the same page. Internally, this integration now uses a Class Map for the
product
post type. This means that you can also extend this integration’sTimber\Integrations\WooCommerce\Product
class with your ownProduct
class. - Improved default archive-product.twig template and added default templates for loop/loop-start.twig and loop/loop-end.twig.
- Added a default checkout/form-checkout.twig template.
- Added a
$context
parameter to therender_default_template()
function. When you pass a context to this function, it will be merged with Timber’s default context. - Added a
post
variable to the context in Twig template partials. - Fixed a bug when calling
Timber\Post::__construct()
messed up the$product
global. - Fixed a compatibility issue with admin-ajax.
- Fixed merge bug.
- Added Twig function
wc_action()
that can be used instead ofaction()
when calling hooks from Twig. In Twig, you would use it like this:{% do wc_action('woocommerce_single_product_summary') %}
. This was added to fix compatibility problems when hooks were used with parameters. (See #14, thanks @pascalknecht) - Added support for Automatic Twig partial selection when using
wc_get_template_part()
. You could only usewc_get_template()
before. Now, you can use both. - Fixed a bug when the
$post
global was not properly set when looping over products. - Updated default templates.
- Updated internal repository folder structure.
- Fixed bug that prevented the integration from working with different versions of Twig. Thanks @chrislind and @VincentLoy!
- Removed non-working support for installing the integration as a WordPress plugin. The integration can only be installed through Composer. Future versions of Timber will will drop support for installation as a plugin. That’s why drop it here, too.
- Improved default templates.
- Improved documentation.