PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.0.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.0.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 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
← All changes | includes/LegacyCompat.php +35 -0 1.10.32.0.0 View file →
@@ -87,4 +87,39 @@
87 87 }
88 88 }
89 89
90 90 // phpcs:enable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
91 +
92 +// ---------------------------------------------------------------------------
93 +// Legacy filters (deprecated hook names bridged onto canonical ones)
94 +// ---------------------------------------------------------------------------
95 +
96 +if ( ! function_exists( 'subscrpt_legacy_split_payment_next_due_date' ) ) {
97 + /**
98 + * Bridge the deprecated `subscrpt_split_payment_next_due_date` filter.
99 + *
100 + * The split-payment-scoped hook was replaced by the general-purpose
101 + * `subscrpt_subscription_next_date`. Any code still hooking the old name keeps
102 + * working (with a deprecation notice) via this bridge.
103 + *
104 + * @deprecated 1.11.0 Use the `subscrpt_subscription_next_date` filter instead.
105 + *
106 + * @param int|null $next_date Computed next payment timestamp, or null.
107 + * @param int $subscription_id Subscription ID.
108 + * @param string $recurr_timing Recurring timing string.
109 + * @param string $type Subscription history type.
110 + *
111 + * @return int|null
112 + */
113 + function subscrpt_legacy_split_payment_next_due_date( $next_date, $subscription_id, $recurr_timing, $type ) {
114 + if ( has_filter( 'subscrpt_split_payment_next_due_date' ) ) {
115 + $next_date = apply_filters_deprecated(
116 + 'subscrpt_split_payment_next_due_date',
117 + [ $next_date, $subscription_id, $recurr_timing, $type ],
118 + '1.11.0',
119 + 'subscrpt_subscription_next_date'
120 + );
121 + }
122 + return $next_date;
123 + }
124 +}
125 +add_filter( 'subscrpt_subscription_next_date', 'subscrpt_legacy_split_payment_next_due_date', 5, 4 );