Product Icon

WooCommerce Subscriptions

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or services and pay on a weekly, monthly, or annual basis. It integrates with over 25 payment gateways for automatic recurring payments and supports automatic rebilling on failed subscription payments. Subscribers can manage their own plan — upgrading, downgrading, suspending, or canceling — and update their shipping address or payment method. It's a paid annual extension with a 30-day money-back guarantee.

You need to add break to your switch statements

— a/penselaranja/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php
+++ b/penselaranja/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php
@@ -2437,6 +2437,7 @@ class WC_Subscription extends WC_Order {
// translators: %s: date type (e.g. “end”).
$messages[] = sprintf( __( ‘The %s date must occur after the cancellation date.’, ‘woocommerce-subscriptions’ ), $date_type );
}
+ break;

case ‘cancelled’:
if ( array_key_exists( ‘last_order_date_created’, $timestamps ) && $timestamp < $timestamps['last_order_date_created'] ) {
@@ -2448,17 +2449,20 @@ class WC_Subscription extends WC_Order {
// translators: %s: date type (e.g. "end").
$messages[] = sprintf( __( 'The %s date must occur after the next payment date.', 'woocommerce-subscriptions' ), $date_type );
}
+ break;
case 'next_payment':
// Guarantees that end is strictly after trial_end, because if next_payment and end can't be at same time
if ( array_key_exists( 'trial_end', $timestamps ) && $timestamp < $timestamps['trial_end'] ) {
// translators: %s: date type (e.g. "end").
$messages[] = sprintf( __( 'The %s date must occur after the trial end date.', 'woocommerce-subscriptions' ), $date_type );
}
+ break;
case 'trial_end':
if ( ! in_array( $date_type, array( 'end', 'cancelled' ) ) && $timestamp <= $timestamps['start'] ) {
// translators: %s: date type (e.g. "next_payment").
$messages[] = sprintf( __( 'The %s date must occur after the start date.', 'woocommerce-subscriptions' ), $date_type );
}
+ break;
}

$dates[ $date_type ] = gmdate( 'Y-m-d H:i:s', $timestamp );

Author

eider570131d4f8

Current Status

Open

Last updated: April 10, 2023

0 comments

Log in to comment on this feature request.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.