That gist actually doesn’t solve the problem for me. For example, ACF is already licensed on my staging site, but when I do a database pull from the production site, the URL no longer matches and the license is invalidated.
A simple DEFINE in wp-config would be a better option in my case, I think!