pull down to refresh

25k sats + lifetime Gold membership on SATOSH.EE and my eternal gratitude to whoever helps me solve the issue (did not set up a bounty here since I'll be posting this also on nostr and X).
I’m running into an issue with referral links on a WooCommerce site (WordPress + WooRewards paid version + Referral Codes (WooRewards and Referral Codes are LongWatchStudio plugins); also tested with the Affiliates plugin - the issue also occurred with that one). The goal is to establish referral bonds between users for a loyalty/affiliate program.
The problem:
  • Referral logic only triggers on the second visit to a referral URL.
  • On first visit, cookies for tracking (e.g., lwsadmsession…) either don’t appear or the plugin code never runs.
  • Reloading the same link triggers the referral logic as expected.
  • This behavior occurs with multiple referral plugins, not just WooRewards.
What I’ve tried:
  • Disabled all other plugins, switched to default theme
  • Cloudflare + Rocket.net: disabled query string caching
  • .htaccess rules to bypass server caching
  • Early hook code to force session/logic execution (relied on ChatGPT to come up with those codes, would not be surprised if they were faulty in and of themselves)
  • Verified no Varnish or server-level caching interference
Developer insight from WooRewards: “Our code is never called. Something else takes charge before WordPress, and (even if unintentional) fakes our redirection.”
Looking for ideas why referral plugin code isn’t executing on first visit, even when cookies or sessions should be available.
Happy to provide more details, just drop a comment or email me kontext@satosh.ee
Thanks!
0 sats \ 0 replies \ @ek 10h
  • On first visit, cookies for tracking (e.g., lwsadmsession…) either don’t appear or the plugin code never runs.
  • Reloading the same link triggers the referral logic as expected.
Does the referral logic depend on cookies present? Are your cookies using SameSite=Lax?
Is there a way for us to reproduce the issue?
reply