GOOD NEWS: The manual steps outlined in this tutorial are no longer needed for subscriptions that are still pending cancellation. WooCommerce Subscriptions version 2.5 introduced a way to uncancel a subscription.
Cancelled subscriptions can’t be reactivated from the WordPress admin area. There’s potential to go against the customer’s wishes, for one thing (assuming they cancelled it themselves). Another is that for gateways which aren’t tokenized, such as PayPal Standard, the cancellation of the subscription happens immediately in PayPal, and the ‘pending-cancel’ status is only relevant in the WooCommerce store to give this customer access to any restricted content until the end of their pre-paid term. Being able to reactivate a cancelled subscription (which also includes those that are status ‘pending-cancel’) from the UI is something that might be added in the future for subscriptions which have a tokenized gateway.
In the mean time, if the situation deems that this must be (and can be) done, you can:
- In the
wp_posts table in the database, change the subscription’s
- In the
wp_postmeta table in the database, check the subscription’s dates. If there are
_schedule_cancelled dates, change them to `0`. Update the
_schedule_next_payment if necessary.
- From the admin area, reactivate the subscription, or from custom code call
$subscription->update_status( 'active' );
Note: this is only ever possible when the payment gateway used on the subscription supports payment date modifications, which many, but not all, gateways support. Notably, it will not be possible with PayPal Standard.