Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Last active September 14, 2022 11:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielbitzer/eda493e1ba567328bf58f56e76433185 to your computer and use it in GitHub Desktop.
Save danielbitzer/eda493e1ba567328bf58f56e76433185 to your computer and use it in GitHub Desktop.
AutomateWoo - Allow click tracking to external hosts
<?php
/**
* Adding a domain to the 'allowed_redirect_hosts' filter means AutomateWoo will use click tracking for URLs
* on this domain. Otherwise only URLs matching the site's domain will use click tracking for security reasons.
*
* @param array $hosts
* @return array
*/
add_filter( 'allowed_redirect_hosts', function( $hosts ) {
$hosts[] = 'example.org';
return $hosts;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment