-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
490 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
# Timber Integration for WooCommerce | ||
|
||
## 0.5.2 | ||
## 0.5.3 - 2020-07-29 | ||
|
||
- Added Twig function `wc_action()` that can be used instead of `action()` 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](https://github.com/mindkomm/timber-integration-woocommerce/blob/master/docs/usage.md#automatic-twig-partial-selection) when using `wc_get_template_part()`. You could only use `wc_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. | ||
|
||
## 0.5.2 - 2018-09-06 | ||
|
||
- 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. | ||
|
||
## 0.5.1 | ||
## 0.5.1 - 2018-04-30 | ||
|
||
- Improved default templates. | ||
- Improved documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{# Ensure visibility. #} | ||
{% if product and product.is_visible() %} | ||
<li {{ fn('wc_product_class') }}> | ||
{## | ||
# Hook: woocommerce_before_shop_loop_item. | ||
# | ||
# @hooked woocommerce_template_loop_product_link_open - 10 | ||
#} | ||
{% do wc_action('woocommerce_before_shop_loop_item') %} | ||
|
||
{## | ||
# Hook: woocommerce_before_shop_loop_item_title. | ||
# | ||
# @hooked woocommerce_show_product_loop_sale_flash - 10 | ||
# @hooked woocommerce_template_loop_product_thumbnail - 10 | ||
#} | ||
{% do wc_action('woocommerce_before_shop_loop_item_title') %} | ||
|
||
{## | ||
# Hook: woocommerce_shop_loop_item_title. | ||
# | ||
# @hooked woocommerce_template_loop_product_title - 10 | ||
#} | ||
{% do wc_action('woocommerce_shop_loop_item_title') %} | ||
|
||
{## | ||
# Hook: woocommerce_after_shop_loop_item_title. | ||
# | ||
# @hooked woocommerce_template_loop_rating - 5 | ||
# @hooked woocommerce_template_loop_price - 10 | ||
#} | ||
{% do wc_action('woocommerce_after_shop_loop_item_title') %} | ||
|
||
{## | ||
# Hook: woocommerce_after_shop_loop_item. | ||
# | ||
# @hooked woocommerce_template_loop_product_link_close - 5 | ||
# @hooked woocommerce_template_loop_add_to_cart - 10 | ||
#} | ||
{% do wc_action('woocommerce_after_shop_loop_item') %} | ||
</li> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.