Plugin Directory

Changeset 2749677


Ignore:
Timestamp:
06/29/2022 01:32:47 PM (4 years ago)
Author:
handcraftbyte
Message:

Fix PHP 8.0 casting issue

Location:
gtm-ecommerce-woo/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gtm-ecommerce-woo/trunk/gtm-ecommerce-woo.php

    r2748129 r2749677  
    44 * Plugin URI:  https://wordpress.org/plugins/gtm-ecommerce-woo
    55 * Description: Push WooCommerce eCommerce (GA4 and UA compatible) information to GTM DataLayer. Use any GTM integration to measure your customers' activites.
    6  * Version:     1.10.1
     6 * Version:     1.10.2
    77 * Author:      Handcraft Byte
    88 * Author URI:  https://handcraftbyte.com/
  • gtm-ecommerce-woo/trunk/lib/GaEcommerceEntity/Event.php

    r2748129 r2749677  
    7070            $itemPrice = isset($item->price) ? $item->price : 0;
    7171            $itemQuantity = isset($item->quantity) ? $item->quantity : 1;
    72             return $carry + ($itemPrice * $itemQuantity);
     72            return $carry + ((float) $itemPrice * (float) $itemQuantity);
    7373        }, 0);
    7474    }
  • gtm-ecommerce-woo/trunk/lib/Util/WcTransformerUtil.php

    r2728066 r2749677  
    1717     * https://woocommerce.github.io/code-reference/classes/WC-Order-Item-Product.html
    1818     */
    19     public function getItemFromOrderItem( $orderItem): Item {
     19    public function getItemFromOrderItem( $orderItem ): Item {
    2020        $product      = $orderItem->get_product();
    2121        $variantProduct = ( $orderItem->get_variation_id() ) ? (wc_get_product( $orderItem->get_variation_id() ))->get_name() : '';
  • gtm-ecommerce-woo/trunk/readme.txt

    r2748129 r2749677  
    118118== Changelog ==
    119119
     120= 1.10.2 =
     121
     122* fix casting issue PHP 8.0
     123
    120124= 1.10.1 =
    121125
Note: See TracChangeset for help on using the changeset viewer.