Skip to content

Commit

Permalink
Merge pull request #15 from stape-io/v2.1.23
Browse files Browse the repository at this point in the history
Fix purchase event
  • Loading branch information
phpDevOleksii authored Nov 8, 2024
2 parents 8e99268 + 1e42f53 commit dd59afd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: gtmserver,bukashk0zzz
Tags: google tag manager, google tag manager server side, gtm, gtm server side, tag manager, tagmanager, analytics, google, serverside, server-side, gtag
Requires at least: 5.2.0
Tested up to: 6.7.0
Stable tag: 2.1.22
Stable tag: 2.1.23
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -67,6 +67,9 @@ Yes. <a href="https://stape.io/blog/how-to-set-up-facebook-conversion-api">How t

== Changelog ==

= 2.1.23 =
* Fix purchase event

= 2.1.22 =
* Tested up to WordPress 6.7

Expand Down
2 changes: 1 addition & 1 deletion gtm-server-side.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: GTM Server Side
* Plugin URI: https://wordpress.org/plugins/gtm-server-side/
* Description: Enhance conversion tracking by implementing server-side tagging using server Google Tag Manager container. Effortlessly configure data layer events in web GTM, send webhooks, set up custom loader, and extend cookie lifetime.
* Version: 2.1.22
* Version: 2.1.23
* Author: Stape
* Author URI: https://stape.io
* License: GPL-2.0+
Expand Down
2 changes: 2 additions & 0 deletions includes/class-gtm-server-side-event-purchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ public function woocommerce_new_order( $order_id ) {
* @return void
*/
public function wp_footer() {
/* phpcs:ignore
if ( ! is_wc_endpoint_url( 'order-received' ) ) {
return;
}
*/

$order_id = GTM_Server_Side_Helpers::get_session( self::TRANSACTION_KEY );
if ( empty( $order_id ) ) {
Expand Down

0 comments on commit dd59afd

Please sign in to comment.