Skip to content

Commit

Permalink
Add the filter gtmkit_disable_frontend_purchase_event
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Sep 25, 2024
1 parent feb2ce4 commit 91bdded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Integration/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public function get_datalayer_content_order_received( array $data_layer ): array

$order_id = apply_filters( 'woocommerce_thankyou_order_id', absint( $wp->query_vars['order-received'] ) );

if ( ! $order_id ) {
if ( ! $order_id || apply_filters( 'gtmkit_disable_frontend_purchase_event', false ) ) {
return $data_layer;
}

Expand Down

0 comments on commit 91bdded

Please sign in to comment.