• Bug Report: Fatal PHP Error in WooCommerce Integration

    Plugin: UTM Event Tracker and Analytics
    Affected File: /wp-content/plugins/utm-event-tracker-and-analytics/third-party/woocommerce.php
    Line: 497
    PHP Version: 8.1.33
    WooCommerce Version: 10.0.4

    Error Details

    Uncaught TypeError: Unsupported operand types: string * int 
    in /wp-content/plugins/utm-event-tracker-and-analytics/third-party/woocommerce.php:497

    Function: UTM_Event_Tracker\woocommerce_send_view_cart_event('')

    When This Occurs

    • Trigger: Customer views cart page (particularly after adding items or using cart modifications)
    • Hook: template_redirect action
    • Result: Fatal error causing “Critical Error” white screen, preventing cart page from loading

    Technical Issue

    Line 497 in woocommerce.php appears to be attempting mathematical multiplication between incompatible data types (string × integer). This is likely happening when the plugin tries to calculate cart values or quantities but receives unexpected data types.

    Impact

    • Cart page completely inaccessible – shows critical error
    • Checkout process broken – customers cannot complete purchases
    • WooCommerce functionality disrupted – affects core e-commerce operations
    • Site appears broken to customers – significant business impact

    Steps to Reproduce

    1. Install plugin on WordPress site with WooCommerce
    2. Add product to cart
    3. Navigate to cart page or trigger cart view event
    4. Fatal error occurs, cart page shows critical error

    Expected Behavior

    Cart tracking should work without breaking the cart functionality or causing fatal PHP errors.

    Workaround

    Currently disabling the plugin resolves the issue, but we lose the UTM tracking functionality.

    Request

    Please review line 497 in the WooCommerce integration file and ensure proper data type handling before mathematical operations. Consider adding type checking or data sanitization to prevent this fatal error.

    Environment

    • WordPress: 6.8.2
    • WooCommerce: 10.0.4
    • PHP: 8.1.33
    • Server: Apache with standard WordPress hosting

    Priority: High – This completely breaks checkout functionality for e-commerce sites.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Repon Hossain

    (@reponwp)

    Hi @scottmckellam

    Thank you for the much information. It’ll be easy to fix this issue. I’ll fix it and release within 48 hours.

    Best Regards,

    Thread Starter Scott Richardson

    (@scottmckellam)

    This is a possible incompatibility here with this plugin: YITH WooCommerce Anti-Fraud Premium

    == Active Plugins ==

    Classic Editor
    Version: 1.6.7
    Author: WordPress Contributors

    Elementor
    Version: 3.31.2
    Author: Elementor.com

    Elementor Pro
    Version: 3.31.0
    Author: Elementor.com

    FluentSMTP
    Version: 2.2.90
    Author: FluentSMTP & WPManageNinja Team

    Kadence Pro - Premium addon for the Kadence Theme
    Version: 1.1.14
    Author: Kadence WP

    Rank Math SEO
    Version: 1.0.250
    Author: Rank Math SEO

    Smart Offers
    Version: 4.10.0
    Author: StoreApps

    Smush Pro
    Version: 3.20.0
    Author: WPMU DEV

    Widgets for Google Reviews
    Version: 13.0
    Author: Trustindex.io <[email protected]>

    WooCommerce
    Version: 10.0.4
    Author: Automattic

    WooCommerce.com Update Manager
    Version: 1.0.3
    Author: Automattic

    WooCommerce Cart Abandonment Recovery
    Version: 1.3.3
    Author: Brainstorm Force

    WooCommerce Gateway Affirm
    Version: 3.0.2
    Author: WooCommerce

    WPCode Lite
    Version: 2.3.0
    Author: WPCode

    WP Crontrol
    Version: 1.19.1
    Author: John Blackbourn

    WPForms
    Version: 1.9.7.3
    Author: WPForms

    WP Rocket
    Version: 3.19.3
    Author: WP Media

    YITH WooCommerce Anti-Fraud Premium
    Version: 1.20.1
    Author: YITH



    == MUST-USE PLUGINS ==
    Elementor Safe Mode
    Version: 1.0.0
    Author: Elementor.com

    Plugin Author Repon Hossain

    (@reponwp)

    Hi @scottmckellam ,

    I have updated the plugin and released a new version. Please update and let me know it works or not.

    Thanks,
    Repon

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal PHP Error in WooCommerce Integration’ is closed to new replies.