Skip to content

Instantly share code, notes, and snippets.

@thomasgriffin
Last active May 7, 2020 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thomasgriffin/3f2d90f0314bc6f1fc6a to your computer and use it in GitHub Desktop.
Save thomasgriffin/3f2d90f0314bc6f1fc6a to your computer and use it in GitHub Desktop.
OptinMonster Dynamic Text Replacement API - hasCustomVariable
<script type="text/javascript">
var OptinMonsterCustomVariables = function(app) {
/**
* API method for checking if a custom variable has been registered.
* Must be accessed via the app object.
*
* @param string $key The custom variable key to check.
* @return bool True if the custom variable exists, false otherwise.
*/
app.hasCustomVariable('foo');
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment