Title: PHP warnings in error log for plugin
Last modified: October 14, 2024

---

# PHP warnings in error log for plugin

 *  [dangrimes](https://wordpress.org/support/users/damonmaldonado/)
 * (@damonmaldonado)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-error-log-for-plugin/)
 * 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](https://wordpress.org/support/users/krahedv/)
 * (@krahedv)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-warnings-in-error-log-for-plugin/#post-18088050)
 * 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.ne](https://www.php.net/manual/class.dateinterval.php)
   t, 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](https://wordpress.org/support/users/damonmaldonado/)
 * (@damonmaldonado)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-warnings-in-error-log-for-plugin/#post-18089251)
 * Thank you [@krahedv](https://wordpress.org/support/users/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](https://wordpress.org/support/users/krahedv/)
 * (@krahedv)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/php-warnings-in-error-log-for-plugin/#post-18090141)
 * 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)

The topic ‘PHP warnings in error log for plugin’ is closed to new replies.

 * ![](https://ps.w.org/activecampaign-for-woocommerce/assets/icon-256x256.png?rev
   =1925389)
 * [ActiveCampaign for WooCommerce](https://wordpress.org/plugins/activecampaign-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/activecampaign-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/activecampaign-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/activecampaign-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/activecampaign-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [krahedv](https://wordpress.org/support/users/krahedv/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/php-warnings-in-error-log-for-plugin/#post-18090141)
 * Status: not resolved