Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@seedprod
Created September 7, 2017 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seedprod/6a98fb3597176b243a5518ebbf672c93 to your computer and use it in GitHub Desktop.
Save seedprod/6a98fb3597176b243a5518ebbf672c93 to your computer and use it in GitHub Desktop.
<?php
// Set cookie of free user
add_action( 'wp', 'free_user_cookie' );
function free_user_cookie() {
//if(is_page('features') && isset($_GET['utm_campaign']) && ($_GET['utm_campaign'] == 'coming-soon-pro-from-wordpress.org' || $_GET['utm_campaign'] == 'coming-soon-link-in-plugin' || $_GET['utm_campaign'] == 'coming-soon-banner-in-plugin')){
if(is_page('ultimate-coming-soon-page-vs-coming-soon-pro')){
if(!isset($_COOKIE['seedprod_source'])) {
setcookie( 'seedprod_source', 'free_plugin|'.time(), strtotime("+1 year"),"/","seedprod.com" );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment