We are running the above plugin that among other things create a copy of current subscription
with both core and custom fields.
But only custom fields with Public access!
If I understand the code correctly it don't set the actual user as current user before the copy.
So the user used to check the actual viewLevels is the guest user. I.e custom fields with Registered access will not be copied. Is this by intention?