Dear Orange
I saw your request on this topic without topic creator answer:
https://www.ads-software.com/support/topic/check-if-user-is-affiliate/
I found the solution and here it is:
if(YITH_WCAF_Affiliate_Handler()->is_user_enabled_affiliate()){
//your codes
}
good luck!