Thanks for your reply.
I did some testing, and its not the share that is causing the issue.
Here is a description:
I create a new 'User Subscription Plan'.
I set the 'Regular Price of plan' to be 0
On the 'Access' tab, under 'Subscribers User access level settings', I set 'User Group' to 'my_user_group' (which has specific access rights to certain areas of the site.)
On the 'CB Fields' Integration tab, I set:
'Field' to be 'cb_cubs_inv_vat_number'
'Operator' to be 'Set'
'Value' to be 'test-vat-number'
'Remove value on plan deactivation' to be 'Yes'
'Value on plan deactivation' is left blank
I sign a new user up to this plan through the 'Url of plan to display only this plan ('-' to display multiple plans)'
This new user is a member of 'my_user_group' (as is expected) and the field 'cb_cubs_inv_vat_number' is set to 'test-vat-number' (as is expected)
I log in as that user, and manually unsubscribe from the plan.
The user is no longer a member of 'my_user_group' (as is expected) but the field 'cb_cubs_inv_vat_number' is still set to ''test-vat-number'
I noticed that if 'Subscribers User access level settings' is set to 'No change of usergroup', then I dont see this issue. When the user unsubscribes, the value in 'cb_cubs_inv_vat_number' is set back to empty (as is expected)
I don't know if its relevent, but the cb_subs_inv_vat_number is Publised; but 'Required', 'Profile', 'Registration', 'Edit' and 'Searchable' are all 'No'. 'Read Only' is also No.
Is there a CBSubs setting that could be causing this ?
Thanks