Cloud Hosting Environments - avoiding licensing/connection issues

Advice for users who are hosted on Pantheon and having difficulty staying connected to QuickBooks with MyWorks Sync

Written by the MyWorks Team

Updated at June 30th, 2023

We have discovered that some of our MyWorks Sync users who host their sites on Pantheon have experienced trouble staying consistently connected to QuickBooks and/or their license with our system. This is due to the way Pantheon treats the SERVER_NAME variable - which is dynamic on Pantheon's container-based hosting.

Fortunately, the resolution here is simple. Based on Pantheon's doc here: https://pantheon.io/docs/server_name-and-server_port/ - simply adding the below line of code to your wp-config.php file will ensure that Wordpress is sending the correct SERVER_NAME variable to QuickBooks Online and our licensing system.

$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];