Thanks to @antonio I’m now able to display affiliate info to the visitor and even pass the info to custom order data fields in woocommerce so an order now contains the referrer information!
There’s one data field I cannot figure out how to get though.
I’m implementing my 2-level affiliate tier system such that level one represents a Group, if you will, and level 2 represents the individual Sellers in that Group. Therefore, I want to be able to display the following info to the visitor on checkout: 1) the Group’s name (tier 1) and 2) the Seller’s name (tier 2 if it exists).
I just cannot figure out how to get the tier 1 (referred by) ID, given a tier 2 (or 3 or 4 …) ID. I would really appreciate seeing some code that would allow me to do this : )