pull down to refresh
0 sats \ 0 replies \ @Kontext OP 23 Oct \ on: WooCommerce Referral Links Only Trigger on 2nd Visit Fix (25k sats bounty) devs
SOLVED, TL;DR:
Rocket.net's infrastructure strips tilde characters (~) from query parameters at the server level before they reach WordPress/PHP.
This broke WooRewards (AKA MyRewards - the free version of the plugin) referral links. After months of debugging and working with their engineering team, they confirmed this is a platform limitation they cannot change. Solution: Switched hosts to Cloudways - referral links now work immediately.
What I tried (all failed on Rocket.net):
Disabled all caching (WordPress, Cloudflare, server-level)
Modified .htaccess with cache bypass rules
Created MU-plugins for early session initialization
Tested with multiple referral plugins (same issue across all)
Cookie whitelisting (only partially helped)
Definitive proof it was server-level:
Created debug logging that showed when visiting ?~=abc123&foo=bar, the URL arrived at the server but $_SERVER['QUERY_STRING'] was empty in PHP - the tilde parameter was stripped before reaching the application layer.
Lesson learned: If your referral/affiliate plugins use non-standard query parameter formats (especially tilde), verify your host doesn't filter them. Standard parameters like ?ref=CODE worked fine, but WooRewards' referral link format was incompatible with Rocket.net's infrastructure.
Working solution: Migrated to Cloudways] - both WooRewards tilde links and standard referral code plugins now function correctly on first visit.