User roles array index is changed after cancellation
-
Hi, I noticed that after a user cancels their subscription, the index of the role array changes.
$current_user = wp_get_current_user(); echo '<pre>'; print_r($current_user->roles); echo '</pre>';
Before cancellation:
Array ( [0] => pmpro_role_2 )
After cancellation:
Array ( [1] => pmpro_role_1 )
and that’s a problem.
Using also the pmpro_after_change_membership_level hook, the index is already updated to 1.
Is it a bug? How can you get around?
Thanks
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘User roles array index is changed after cancellation’ is closed to new replies.