Oh. I see. I don’t see that the plugin has a function to suspend the user (but may not know where to look). Worst can you can add an API call to the hook that gets called when their subscription fails and have it suspend the user. You can find it using How to reverse engineer the Discourse API
Suspending and unsuspending users will be the easy part. The trick is to figure out which Woocommerce actions to hook into.
It looks like the woocommerce_subscription_status_updated action should work. That hook passes three parameter: $subscription, $new_status, $old_status. The status parameters are strings, so their value should be fairly self-explanatory. The $subscription parameter is a WC_Subscription object. I’m assuming that it contains details that let you find the user ID that the subscription is associated with. I’d have to take a look at it to confirm though.
Parameters:$subscription A WC_Subscription object representing the subscription that just had its status changed.
Description: This action is triggered after the subscription specified with $subscription has had its status changed to activated. The subscription’s status may have transitioned from pending to active, or on-hold to active or some other custom status to active.
Parameters:$subscription A WC_Subscription object representing the subscription that just had its status changed.
Description: This action is triggered after the subscription specified with $subscription has had its status changed.
The subscription’s status may have transitioned from pending to cancelled, or on-hold to cancelled, pending cancellation to cancelled or some other custom status to cancelled.
Action:'woocommerce_subscription_status_expired'
Parameters:$subscription A WC_Subscription object representing the subscription that just had its status changed.
Description: Triggered when a subscription reaches the end of its term, if a length was set on the subscription product when it was purchased or an end date was otherwise set on a subscription.