• Support,

    We’re getting this error after our client updated to the latest version of the plugin:

    An error of type E_ERROR was caused in line 413 of the file
    /wp-content/plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php. Error message: Uncaught TypeError: Unsupported operand types: int – string in /wp-content/plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php:413

    WordPress version 6.6.2
    Current plugin: ActiveCampaign for WooCommerce (version 2.7.9)
    PHP version 8.1.30

    Please let us know if you need any more info.

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Nitroweb

    (@spyrosvl)

    I got the same error. Some minor change can fix this. Can you please alter the function?

    	private function check_update_validity( $wc_order ) {
    $ac_datahash = $wc_order->get_meta( 'ac_datahash' );
    $current_datahash = md5( json_encode( $wc_order->get_data() ) );
    $last_synced = $wc_order->get_meta( 'ac_order_last_synced_time' );
    $last_status = $wc_order->get_meta( 'ac_last_synced_status' );
    $currentstrtotime = time();

    if (
    ( ( $currentstrtotime - intval( $last_synced ) ) > 120 ) &&
    isset( $last_status ) &&
    $last_status === $wc_order->get_status() &&
    $ac_datahash === $current_datahash
    ) {
    return false;
    }

    return true;
    }
    Thread Starter camna

    (@camna)

    ActiveCampaign,

    Any update on this issue please?

    Thanks,

    Yogh

    (@yogh)

    ActiveCampaign,

    We are facing the same issue with one of our clients’ websites. If you could help us find a better solution, we would be grateful.

    skigirl1369

    (@skigirl1369)

    Facing the same issue…RIGHT after a customer places an order, the site sends a “Your Site is Experiencing a Technical Issue” email with the below details:

    Error Details

    An error of type E_ERROR was caused in line 413 of the file /plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php. Error message: Uncaught TypeError: Unsupported operand types: int – string in /plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php:413
    Stack trace: 0 /plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php(116): Activecampaign_For_Woocommerce_Order_Action_Events->check_update_validity(Object(Automattic\WooCommerce\Admin\Overrides\Order))

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 6.6.2
    Current plugin: ActiveCampaign for WooCommerce (version 2.7.9)
    PHP version 8.2.24

    gloriaubaldini

    (@gloriaubaldini)

    WordPress has send a Critical error alert email today. The website in frontend seems works fine.

    WordPress version 6.6.2
    ActiveCampaign for WooCommerce (v 2.7.9)
    Versione PHP 8.1.29

    ====================

    ERROR DETAIL
    ====================
    Un errore di E_ERROR è stato causato nella linea 413 del file /var/www/clients/client1/web12/web/wp-content/plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php. Messaggio di errore: Uncaught TypeError: Unsupported operand types: int – string in /var/www/clients/client1/web12/web/wp-content/plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php:413
    Stack trace:
    #0 /var/www/clients/client1/web12/web/wp-content/plugins/activecampaign-for-woocommerce/includes/orders/class-activecampaign-for-woocommerce-order-action-events.php(116): Activecampaign_For_Woocommerce_Order_Action_Events->check_update_validity(Object(Automattic\WooCommerce\Admin\Overrides\Order))
    #1 /var/www/clients/client1/web12/web/wp-includes/class-wp-hook.php(326): Activecampaign_For_Woocommerce_Order_Action_Events->execute_order_updated(18377)
    #2 /var/www/clients/client1/web12/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #3 /var/www/clients/client1/web12/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /var/www/clients/client1/web12/web/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(263): do_action(‘woocommerce_pro…’, 18377, Object(WP_Post))
    #5 /var/www/clients/client1/web12/web/wp-includes/class-wp-hook.php(326): WC_Admin_Meta_Boxes->save_meta_boxes(18377, Object(WP_Post))
    #6 /var/www/clients/client1/web12/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
    #7 /var/www/clients/client1/web12/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #8 /var/www/clients/client1/web12/web/wp-includes/post.php(4891): do_action(‘save_post’, 18377, Object(WP_Post), true)
    #9 /var/www/clients/client1/web12/web/wp-includes/post.php(4993): wp_insert_post(Array, false, true)
    #10 /var/www/clients/client1/web12/web/wp-admin/includes/post.php(453): wp_update_post(Array)
    #11 /var/www/clients/client1/web12/web/wp-admin/post.php(227): edit_post()
    #12 {main}
    ?thrown
    Art Project Group

    (@artprojectgroup)

    We have detected exactly the same error.

    Best regards.

    I see this on the latest version, so it should be fixed now…
    if ( ! empty( $last_synced ) && time() - intval( $last_synced ) < 120 ) {
    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.