Skip to content

Commit

Permalink
Exclude switch orders from order needs payment checks (#669)
Browse files Browse the repository at this point in the history
* Move change log entry to the release it was actually included in

* Exclude switch orders from order needs payment checks

* Add changelog entry

* Update changelog.txt

Co-authored-by: Matt Allan <[email protected]>

---------

Co-authored-by: Matt Allan <[email protected]>
  • Loading branch information
james-allan and mattallan authored Sep 5, 2024
1 parent f42488f commit 864f950
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooCommerce Subscriptions Core Changelog ***

= 7.4.3 - 2024-xx-xx =
Fix - Prevent errors during checkout when a customer is switching their subscription product and does not require payment.

= 7.4.2 - 2024-08-27 =
* Fix - Resolved an issue where simple product prices were incorrectly set to $0 when purchasing subscriptions and simple products with a coupon in WC 9.2.

Expand All @@ -10,12 +13,12 @@
* Dev - Introduce new parameter to WC_Subscription::get_last_order() to enable filtering out orders with specific statuses.
* Update - Schedule subscription-related events with a priority of 1 to allow for earlier execution within the Action Scheduler.
* Fix - Ensure admin notices are displayed after performing bulk actions on subscriptions when HPOS is enabled.
* Fix - Resolved an error when purchasing subscription products on the block checkout with a limited recurring coupon.

= 7.3.0 - 2024-07-16 =
* Fix - Label improvements on subscription and order page templates.
* Fix - Fixed an issue with subscriptions containing multiple renewal orders to mark a random item as processing, instead of the last order.
* Fix - Prevent errors from invalid subscription objects during customer payment method updates.
* Fix - Resolved an error when purchasing subscription products on the block checkout with a limited recurring coupon.

= 7.2.0 - 2024-06-13 =
* Fix - label improvement on my subscription page template.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-subscriptions-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ public static function order_needs_payment( $needs_payment, $order, $valid_order
}

// Check if there's a subscription attached to this order that will require a payment method.
foreach ( wcs_get_subscriptions_for_order( $order ) as $subscription ) {
foreach ( wcs_get_subscriptions_for_order( $order, [ 'order_type' => 'parent' ] ) as $subscription ) {
$has_next_payment = false;
$contains_expiring_limited_coupon = false;
$contains_free_trial = false;
Expand Down

0 comments on commit 864f950

Please sign in to comment.