Skip to content

Commit

Permalink
BUG FIX: Fixed warning in code added in 2.0.3 that could cause issues…
Browse files Browse the repository at this point in the history
… at checkout.
  • Loading branch information
ideadude committed Jan 14, 2019
1 parent 8ac650f commit 39ca3b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function pmpro_set_checkout_order_before_changing_membership_levels( $user_id, $
function pmpro_ignore_checkout_order_when_cancelling_old_orders( $order_ids ) {
global $pmpro_checkout_order;

if ( ! empty( $pmpro_checkout_order ) ) {
if ( ! empty( $pmpro_checkout_order ) && ! empty( $pmpro_checkout_order->id ) ) {
$order_ids = array_diff( $order_ids, array( $pmpro_checkout_order->id ) );
}

Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ Not sure? You can find out by doing a bit a research.

== Changelog ==

= 2.0.4 - 2019-01-14 =
* BUG FIX: Fixed warning in code added in 2.0.3 that could cause issues at checkout.

= 2.0.3 - 2019-01-11 =
* BUG FIX: Fixed issue where code in the Stripe gateway was cancelling old subscriptions early if users renewed with a different gateway. NOTE: There was a fix for this in version 2.0, but it wasn't implemented fully.
* BUG FIX: Filtering pmpro_other_order_ids_to_cancel to make sure the current checkout's order doesn't get cancelled. This started happening in version 2.0 since we started setting the user_id on orders for existing users before the checkout was fully processed. This fix along with the one above and others will fix cases where users were being cancelled immediately after checkout.
Expand Down

0 comments on commit 39ca3b5

Please sign in to comment.