Hi Jamal
Thanks for the corrections. 😊
Line 6: I changed it to "Family" from lower case "family".
1) I tried this out and it didn't work unfortunately.
2) What would you expect to happen if the role Family didn't exist any more for a user? Would it error out?
To answer your question, when subscribing the first time, ie when their role should change from "Family" to "Subscribed Family", the Order should auto-complete and then switch the user to Subscribed Family role and the user should get the Active Subscriber tick in WP Admin > Users.
When users cancel, it appears that this process goes to a Pending Cancellation status in Woo, where the Subscription remains in this state until the Subscription end date, or until manually pushed through to full cancellation in the WP Admin > Subscriptions screen.
During this Pending cancellation stage, the user sees a "Reactivate" button on their Woo My Account > Subscriptions page (the shopping trolley icon in our menu). When the subscription is forced cancelled in WP Admin > Subscriptions, and changes from status "Pending Cancellation" to "Cancelled", the user then sees a "Resubscribe" button.
Only when the order status transitions to "Cancelled" should the user role change from "Subscribed Family" to "Lapsed Family", since it could be that they wish to cancel their automatic renewal of their subscription, however they have paid for, say, 3 months, and should still have all the premium benefits of being a Subscribed Family right up to the Subscription end date.
It might be best to create a dummy family user for yourself, which you can delete and recreate as many times as you wish:
1) Click Sign Up in the menu
2) Sign up as a Family
3) Click Find a Native Nanny, click on View Ad to view the full Ad, there you should be able to subscribe - the shop is in test mode, so you can just use the fake credit card number specified in the shop and subscribe yourself and view the status changes in WP Admin Users and WP Admin > WooCommerce > Subscriptions. To view your Woo My Account page, click the shopping trolley in the menu bar.
Kind regards
Simon