Role does not update automatically

I am getting strange issue when using user synchronization plugin

I am changing user role on purchase of specific product using this code here

https://gist.github.com/waqasnu/950eafc3e9b4855afc88

So after successful woocommerce product purchase user role is changed from customer to toolkitmembers.

User role is automatically changed successfully in master site, but this change do not reflect in sub site, in sub site roles remain same as previous i.e customer.

But when i manually click on edit that user profile in master site and update it without doing any changes in it, then role changes in sub site successfully, So basically i have to update user profile manually in master site in order for the role to appear in sub site. I want this done automatically.

I really need to solve this issue.

Hope to get some solution

thanks