• dangrimes

    (@damonmaldonado)


    Good evening. We are going through our logs and found the plugin as a PHP warning that is getting output to our error log (18 just in the past week). Here is the error >

    18 PHP Warning: Undefined property: DateInterval::$hours in /chroot/home/foldername/oursite.com/html/wp-content/plugins/activecampaign-for-woocommerce/includes/abandoned_carts/class-activecampaign-for-woocommerce-run-abandonment-sync-command.php on line 1026

    I replaced our site URL just for safety purposes of our site.

    PHP: 8.2.20

    Woocommerce: 9.3.3

    WordPress: 6.2.2

    Let me know if you need anything else from our end or if you know of a fix for this warning. Thank you!

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

    (@krahedv)

    I ran into the same issue on our webshop.

    Looks like this is a typo in this file:

    /wp-content/plugins/activecampaign-for-woocommerce/includes/abandoned_carts/class-activecampaign-for-woocommerce-run-abandonment-sync-command.php

    The line 1026 reads:

                    $i   += $diff->hours;

    $diff seems to be of Type DateInterval, but according to php.net, DateInterval does not have a property “hours”. However it does have a property “h” which seems to be what we’re looking for in that case.

    So for now you could fix this by changing the line above as follows:

                    $i   += $diff->h;

    Nonetheless the developer needs to fix it himself, otherwise we’re going to run into the same issue again when the plugin gets updated.

    Thread Starter dangrimes

    (@damonmaldonado)

    Thank you @krahedv !! I changed the line out in that file. Appreciate it! Should I ping the developer in a new thread or do you think they will se your comment here?

    krahedv

    (@krahedv)

    You’re welcome!

    I don’t think another thread is needed, it looks like they are fairly active here and hopefully will notice this thread ??

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