Skip to content

Instantly share code, notes, and snippets.

@seedprod

seedprod/track_upsell.php

Last active Sep 13, 2017
Embed
What would you like to do?
<?php
// Set cookie of free user
add_action( 'wp', 'track_upsell' );
function track_upsell() {
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
You can’t perform that action at this time.