Plugin Directory

Changeset 3348467


Ignore:
Timestamp:
08/22/2025 06:36:25 AM (7 months ago)
Author:
tlamedia
Message:

Update to version 2.5.1 from GitHub

Location:
gtm-kit
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • gtm-kit/tags/2.5.1/changelog.txt

    r3339414 r3348467  
    11*** GTM Kit ***
     2
     32025-08-2 - version 2.5.1
     4* Fix: Force rounding values to 2 decimal places to fix rounding issues in edge cases.
     5* Fix: In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
     6* Dev: Tested up to WooCommerce 10.1.
    27
    382025-08-05 - version 2.5.0
  • gtm-kit/tags/2.5.1/gtm-kit.php

    r3339414 r3348467  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     2.5.0
     6 * Version:     2.5.1
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    1616 *
    1717 * WC requires at least: 9.0
    18  * WC tested up to: 10.0
     18 * WC tested up to: 10.1
    1919 *
    2020 * @package GTM Kit
     
    2828}
    2929
    30 const GTMKIT_VERSION = '2.5.0';
     30const GTMKIT_VERSION = '2.5.1';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/tags/2.5.1/languages/gtm-kit.pot

    r3339414 r3348467  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 2.5.0\n"
     5"Project-Id-Version: GTM Kit 2.5.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-08-03T18:31:37+00:00\n"
     12"POT-Creation-Date: 2025-08-21T14:07:08+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
  • gtm-kit/tags/2.5.1/readme.txt

    r3339414 r3348467  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.8
    6 Stable tag: 2.5.0
     6Stable tag: 2.5.1
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9797== Changelog ==
    9898
     99= 2.5.1 =
     100
     101Release date: 2025-08-22
     102
     103#### Bugfixes:
     104* Force rounding values to 2 decimal places to fix rounding issues in edge cases.
     105* In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
     106
     107#### Other:
     108* Tested up to WooCommerce 10.1.
     109
    99110= 2.5.0 =
    100111
  • gtm-kit/tags/2.5.1/src/Frontend/Frontend.php

    r3266155 r3348467  
    209209    public function get_gtm_script( string $gtm_id ): void {
    210210        $domain = $this->options->get( 'general', 'sgtm_domain' ) ? $this->options->get( 'general', 'sgtm_domain' ) : 'www.googletagmanager.com';
    211         $loader = $this->options->get( 'general', 'sgtm_container_identifier' ) ? $this->options->get( 'general', 'sgtm_container_identifier' ) : 'gtm';
    212 
    213         if ( $this->options->get( 'general', 'sgtm_cookie_keeper' ) ) {
     211        $loader = ! empty( $this->options->get( 'general', 'sgtm_container_identifier' ) ) ? $this->options->get( 'general', 'sgtm_container_identifier' ) : 'gtm';
     212
     213        if ( $domain !== 'www.googletagmanager.com' && $loader !== 'gtm' && $this->options->get( 'general', 'sgtm_cookie_keeper' ) ) {
    214214            $gtm_id = preg_replace( '/^GTM\-/i', '', $gtm_id );
    215215            echo "/* Google Tag Manager with Stape.io Cookie Keeper */\n";
  • gtm-kit/tags/2.5.1/src/Integration/WooCommerce.php

    r3284597 r3348467  
    307307        if ( is_checkout() && ! is_order_received_page() ) {
    308308            $global_data['wc']['cart_items']                 = $this->get_cart_items( 'begin_checkout' );
    309             $global_data['wc']['cart_value']                 = (float) wc_prices_include_tax() ? WC()->cart->get_cart_contents_total() + WC()->cart->get_cart_contents_tax() : WC()->cart->get_cart_contents_total();
     309            $global_data['wc']['cart_value']                 = round( wc_prices_include_tax() ? ( WC()->cart->get_cart_contents_total() + WC()->cart->get_cart_contents_tax() ) : WC()->cart->get_cart_contents_total(), 2 );
    310310            $global_data['wc']['chosen_shipping_method']     = WC()->session->get( 'chosen_shipping_methods' )[0] ?? '';
    311311            $global_data['wc']['chosen_payment_method']      = $this->get_payment_method();
     
    398398        $data_layer['ecommerce']   = [
    399399            'items'    => [ $item ],
    400             'value'    => (float) $item['price'],
     400            'value'    => round( $item['price'], 2 ),
    401401            'currency' => $this->store_currency,
    402402        ];
     
    459459        $data_layer['ecommerce'] = [
    460460            'currency' => $this->store_currency,
    461             'value'    => (float) $cart_value,
     461            'value'    => round( $cart_value, 2 ),
    462462            'items'    => $this->get_cart_items( 'view_cart' ),
    463463        ];
     
    487487        $data_layer['event']                 = 'begin_checkout';
    488488        $data_layer['ecommerce']['currency'] = $this->store_currency;
    489         $data_layer['ecommerce']['value']    = (float) $cart_value;
     489        $data_layer['ecommerce']['value']    = round( $cart_value, 2 );
    490490
    491491        $coupons = WC()->cart->get_applied_coupons();
     
    595595        $data_layer['ecommerce'] = [
    596596            'transaction_id' => (string) $order->get_order_number(),
    597             'value'          => (float) $order_value,
    598             'tax'            => (float) $order->get_total_tax(),
    599             'shipping'       => (float) $shipping_total,
     597            'value'          => round( $order_value, 2 ),
     598            'tax'            => round( $order->get_total_tax(), 2 ),
     599            'shipping'       => round( $shipping_total, 2 ),
    600600            'currency'       => $order->get_currency(),
    601601        ];
     
    11871187
    11881188        $data_layer['ecommerce']['customer']['order_count'] = $order_count;
    1189         $data_layer['ecommerce']['customer']['total_spent'] = (float) $total_spent;
     1189        $data_layer['ecommerce']['customer']['total_spent'] = round( $total_spent, 2 );
    11901190
    11911191        $data_layer['ecommerce']['customer']['first_name'] = $wc_customer->get_first_name();
  • gtm-kit/tags/2.5.1/vendor/composer/installed.php

    r3339414 r3348467  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '5ea8688e7048f73584022140e91d7e7fa72d09d9',
     6        'reference' => 'b14aa9d2723fe466e692a8805879f41bfacffd50',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '5ea8688e7048f73584022140e91d7e7fa72d09d9',
     16            'reference' => 'b14aa9d2723fe466e692a8805879f41bfacffd50',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • gtm-kit/trunk/changelog.txt

    r3339414 r3348467  
    11*** GTM Kit ***
     2
     32025-08-2 - version 2.5.1
     4* Fix: Force rounding values to 2 decimal places to fix rounding issues in edge cases.
     5* Fix: In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
     6* Dev: Tested up to WooCommerce 10.1.
    27
    382025-08-05 - version 2.5.0
  • gtm-kit/trunk/gtm-kit.php

    r3339414 r3348467  
    44 *
    55 * Plugin Name: GTM Kit
    6  * Version:     2.5.0
     6 * Version:     2.5.1
    77 * Plugin URI:  https://gtmkit.com/
    88 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed.
     
    1616 *
    1717 * WC requires at least: 9.0
    18  * WC tested up to: 10.0
     18 * WC tested up to: 10.1
    1919 *
    2020 * @package GTM Kit
     
    2828}
    2929
    30 const GTMKIT_VERSION = '2.5.0';
     30const GTMKIT_VERSION = '2.5.1';
    3131
    3232if ( ! defined( 'GTMKIT_FILE' ) ) {
  • gtm-kit/trunk/languages/gtm-kit.pot

    r3339414 r3348467  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: GTM Kit 2.5.0\n"
     5"Project-Id-Version: GTM Kit 2.5.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-08-03T18:31:37+00:00\n"
     12"POT-Creation-Date: 2025-08-21T14:07:08+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
  • gtm-kit/trunk/readme.txt

    r3339414 r3348467  
    44Tags: google tag manager, gtm, woocommerce, analytics, ga4
    55Tested up to: 6.8
    6 Stable tag: 2.5.0
     6Stable tag: 2.5.1
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9797== Changelog ==
    9898
     99= 2.5.1 =
     100
     101Release date: 2025-08-22
     102
     103#### Bugfixes:
     104* Force rounding values to 2 decimal places to fix rounding issues in edge cases.
     105* In some cases the GTM container would not load after activating and deactivating settings in 'Server-side Tagging (sGTM)'.
     106
     107#### Other:
     108* Tested up to WooCommerce 10.1.
     109
    99110= 2.5.0 =
    100111
  • gtm-kit/trunk/src/Frontend/Frontend.php

    r3266155 r3348467  
    209209    public function get_gtm_script( string $gtm_id ): void {
    210210        $domain = $this->options->get( 'general', 'sgtm_domain' ) ? $this->options->get( 'general', 'sgtm_domain' ) : 'www.googletagmanager.com';
    211         $loader = $this->options->get( 'general', 'sgtm_container_identifier' ) ? $this->options->get( 'general', 'sgtm_container_identifier' ) : 'gtm';
    212 
    213         if ( $this->options->get( 'general', 'sgtm_cookie_keeper' ) ) {
     211        $loader = ! empty( $this->options->get( 'general', 'sgtm_container_identifier' ) ) ? $this->options->get( 'general', 'sgtm_container_identifier' ) : 'gtm';
     212
     213        if ( $domain !== 'www.googletagmanager.com' && $loader !== 'gtm' && $this->options->get( 'general', 'sgtm_cookie_keeper' ) ) {
    214214            $gtm_id = preg_replace( '/^GTM\-/i', '', $gtm_id );
    215215            echo "/* Google Tag Manager with Stape.io Cookie Keeper */\n";
  • gtm-kit/trunk/src/Integration/WooCommerce.php

    r3284597 r3348467  
    307307        if ( is_checkout() && ! is_order_received_page() ) {
    308308            $global_data['wc']['cart_items']                 = $this->get_cart_items( 'begin_checkout' );
    309             $global_data['wc']['cart_value']                 = (float) wc_prices_include_tax() ? WC()->cart->get_cart_contents_total() + WC()->cart->get_cart_contents_tax() : WC()->cart->get_cart_contents_total();
     309            $global_data['wc']['cart_value']                 = round( wc_prices_include_tax() ? ( WC()->cart->get_cart_contents_total() + WC()->cart->get_cart_contents_tax() ) : WC()->cart->get_cart_contents_total(), 2 );
    310310            $global_data['wc']['chosen_shipping_method']     = WC()->session->get( 'chosen_shipping_methods' )[0] ?? '';
    311311            $global_data['wc']['chosen_payment_method']      = $this->get_payment_method();
     
    398398        $data_layer['ecommerce']   = [
    399399            'items'    => [ $item ],
    400             'value'    => (float) $item['price'],
     400            'value'    => round( $item['price'], 2 ),
    401401            'currency' => $this->store_currency,
    402402        ];
     
    459459        $data_layer['ecommerce'] = [
    460460            'currency' => $this->store_currency,
    461             'value'    => (float) $cart_value,
     461            'value'    => round( $cart_value, 2 ),
    462462            'items'    => $this->get_cart_items( 'view_cart' ),
    463463        ];
     
    487487        $data_layer['event']                 = 'begin_checkout';
    488488        $data_layer['ecommerce']['currency'] = $this->store_currency;
    489         $data_layer['ecommerce']['value']    = (float) $cart_value;
     489        $data_layer['ecommerce']['value']    = round( $cart_value, 2 );
    490490
    491491        $coupons = WC()->cart->get_applied_coupons();
     
    595595        $data_layer['ecommerce'] = [
    596596            'transaction_id' => (string) $order->get_order_number(),
    597             'value'          => (float) $order_value,
    598             'tax'            => (float) $order->get_total_tax(),
    599             'shipping'       => (float) $shipping_total,
     597            'value'          => round( $order_value, 2 ),
     598            'tax'            => round( $order->get_total_tax(), 2 ),
     599            'shipping'       => round( $shipping_total, 2 ),
    600600            'currency'       => $order->get_currency(),
    601601        ];
     
    11871187
    11881188        $data_layer['ecommerce']['customer']['order_count'] = $order_count;
    1189         $data_layer['ecommerce']['customer']['total_spent'] = (float) $total_spent;
     1189        $data_layer['ecommerce']['customer']['total_spent'] = round( $total_spent, 2 );
    11901190
    11911191        $data_layer['ecommerce']['customer']['first_name'] = $wc_customer->get_first_name();
  • gtm-kit/trunk/vendor/composer/installed.php

    r3339414 r3348467  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '5ea8688e7048f73584022140e91d7e7fa72d09d9',
     6        'reference' => 'b14aa9d2723fe466e692a8805879f41bfacffd50',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '5ea8688e7048f73584022140e91d7e7fa72d09d9',
     16            'reference' => 'b14aa9d2723fe466e692a8805879f41bfacffd50',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.