• Resolved richardmichael

    (@richardmichael)


    There are a few threads on this but none of them were actually mine, it is probably best practice to not hijack others.

    error_log is filled with this error:

    [28-Nov-2025 14:44:06 UTC] PHP Warning: Undefined array key "SERVER_NAME" in /home/username/public_html/wp-content/plugins/mailchimp-for-woocommerce/includes/class-mailchimp-woocommerce-enhanced-logger.php on line 258

    I might have identified the problem for you. The plugin is relying on SERVER_NAME, but if you use cronjobs or WP-CLI, that isn’t populated either at all, or the same.
    For our websites, we have WP Cron and rely on a cronjob. I see another unresolved thread where someone is using WP-CLI.

    Google’s AI (I know I know) suggestion:

    Use $current_site->domain: For WordPress-specific operations, it is more reliable to use the $current_site global object, which stores the domain variable ($current_site->domain), instead of relying on $_SERVER[‘SERVER_NAME’]. This ensures that the correct domain information is used regardless of whether the command is executed via the web or WP-CLI.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support KJ

    (@kjvextras)

    Hi @richardmichael Huge thank you for creating your own thread on this. We are already working on a fix – please stay tuned for our next release

    Thanks again! We appreciate you so much!

    Plugin Support KJ

    (@kjvextras)

    Hi there, we have included this feature in our latest release! Download the latest version v6.0 and if you’re happy with this integration, please consider leaving a 5-star review. Your feedback helps other WooCommerce customers find this integration and helps support future development.

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

You must be logged in to reply to this topic.