I am looking to do something that is, in a way, the reverse.Global
Triggers: onCPayUserStateChange
Type: Usergroup
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Not Equal To
Value: A
Action
Action 1
Mode: Remove Usergroups
Usergroups: REMOVE_USERGROUP_HERE
Action 2
Mode: Add Usergroups
Usergroups: ADD_USERGROUP_HERE
Replace PLAN_ID_HERE with your plans id. That auto action should then fire when their plan expires. If you know they'll only have those 2 usergroups you can just use the Replace Usergroups mode.
Correct, it should still calculate tax based off location as long as cb_subs_inv_address_country is filled. There's no internal checks that I can see that mandate the invoice address to be enabled. It's just entirely checking those profile fields directly. So how those fields get filled can be entirely up to you. You could for example completely turn off the invoice address fields and populate cb_subs_inv_address_country from your own field using CB Core Fields Ajax.So if these fields are filled, then we do not need mandatory or not-mandatory activation right?
I'd probably just do them during registration and profile edit to synchronize them when necessary. For existing users you can just run a 1 time database query to synchronize them and then future profile edits/registrations will always synchronize. The below should work fine for this.Can you please advise regarding the creation of auto action?
Is onCPayBeforeDrawSubscription a good trigger for this?