Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration
You are here: Home

herbalacademy

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • July 23, 2019 at 7:49 pm in reply to: Compatible with Pantheon's Varnish cache? #79729
    herbalacademy
    Participant

    Hi, thanks for the response. Varnish caching is enabled on all sites hosted at Pantheon, so it isn’t possible to turn it off or switch to a different plugin. However, the docs for the two cache plugins provided a good starting point. I was able to trace the issue to wp_affiliate_platform1.php, lines 7-9:

    Code:
    if (!isset($_SESSION)) {
    session_start();
    }

    This means that the session is started on every page load, whether or not the current page is an affiliate referral. When a PHP session is started, it disables the Varnish cache.

    I was able to get the cache working by modifying the code like this:

    Code:
    if ($_GET[‘ap_id’] || isset($_COOKIE[‘ap_id’] || isset($_COOKIE[‘cart_in_use’]) || isset($_COOKIE[‘eMember_in_use’]) ) {
    if (!isset($_SESSION)) {
    session_start();
    }
    }

    Can you see any issues with this approach or recommend a better way? Basically, I just want to make sure that the session is only started when needed for affiliate tracking or WP Affiliate Platform admin functions.

  • Author
    Posts
Viewing 1 post (of 1 total)

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ