PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.2.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.2.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
← All changes | includes/Illuminate/RoleManagement.php +7 -0 1.10.0 → 2.2.0 View file →
@@ -20,8 +20,15 @@
20 20 add_action( 'subscrpt_subscription_activated', [ $this, 'maybe_change_user_role_on_subscription_activation' ] );
21 21
22 22 add_action( 'subscrpt_subscription_expired', [ $this, 'maybe_change_user_role_on_subscription_deactivation' ] );
23 23 add_action( 'subscrpt_subscription_cancelled', [ $this, 'maybe_change_user_role_on_subscription_deactivation' ] );
24 +
25 + // A failed renewal suspends the subscription rather than ending it, so the
26 + // role has to come down here too. Nothing listened to this before, which
27 + // left a customer who stopped paying holding their subscriber role for the
28 + // whole retry ladder. Reversible: a recovered payment fires
29 + // `subscrpt_subscription_activated`, which puts the role back.
30 + add_action( 'subscrpt_subscription_on_hold', [ $this, 'maybe_change_user_role_on_subscription_deactivation' ] );
24 31 }
25 32
26 33 /**
27 34 * Get default active role