Skip to content

Commit

Permalink
Fix matching endpoints for cart and checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Oct 26, 2024
1 parent 80dc1b6 commit fe9c408
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** GTM Kit ***

2024-10-DD - version 2.2.1
* Fix: If the cart and checkout endpoints where set to the same page in order to skip the cart the 'checkout' and 'purchase' events would not fire.

2024-10-16 - version 2.2.0
* Add: Added notifications and warnings for missing GTM container, debug log usage, auto-update and event inspector usage. These improvements aim to ensure smooth production operations.

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Find out about what's new in our [our release post](https://gtmkit.com/gtm-kit-2
#### Enhancements:

#### Bugfixes:
* If the cart and checkout endpoints where set to the same page in order to skip the cart the 'checkout' and 'purchase' events would not fire.

#### Other:

Expand Down
4 changes: 2 additions & 2 deletions src/Integration/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ public function get_datalayer_content( array $data_layer ): array {
$data_layer = $this->get_datalayer_content_product_category( $data_layer );
} elseif ( is_product_tag() ) {
$data_layer = $this->get_datalayer_content_product_tag( $data_layer );
} elseif ( is_cart() ) {
$data_layer = $this->get_datalayer_content_cart( $data_layer );
} elseif ( is_order_received_page() ) {
$data_layer = $this->get_datalayer_content_order_received( $data_layer );
} elseif ( is_checkout() ) {
$data_layer = $this->get_datalayer_content_checkout( $data_layer );
} elseif ( is_cart() ) {
$data_layer = $this->get_datalayer_content_cart( $data_layer );
}

if ( $this->options->get( 'integrations', 'woocommerce_include_permalink_structure' ) ) {
Expand Down

0 comments on commit fe9c408

Please sign in to comment.