Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter naimionexclusives

    (@naimionexclusives)

    danny,

    i actually looked through the support and found this code:

    function my_prefix_set_mailchimp_cookie($email, $merge_vars, $form_id, $result) {
    if($result == true) {
    setcookie(“mc4wp_subscribed”, $email, time() + 31556926, ‘/’);
    }
    }

    add_action(‘mc4wp_after_subscribe’, ‘my_prefix_set_mailchimp_cookie’, 10, 4);

    function my_prefix_show_stb_box($matched, $box_id) {

    if(isset($_COOKIE[‘mc4wp_subscribed’])) {
    return false;
    }

    return $matched;
    }

    add_action(‘stb_show_box’, ‘my_prefix_show_stb_box’, 10, 2);

    add_action(‘mc4wp_after_subscribe’, ‘my_prefix_set_mailchimp_cookie’, 10, 4);

    how does this differ from yours? And would it work? i don’t see any box_id field on the one i found.

Viewing 1 replies (of 1 total)