Created
September 7, 2017 11:53
-
-
Save seedprod/6a98fb3597176b243a5518ebbf672c93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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