Skip to content

Commit

Permalink
fix fatal error on resubscribe – get subscription from ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Rua Haszard committed Jun 14, 2022
1 parent 20ea6b0 commit c433f4e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function override_selected_currency( $return ) {

$subscription_resubscribe = $this->cart_contains_resubscribe();
if ( $subscription_resubscribe ) {
$switch_subscription = $subscription_resubscribe['subscription_resubscribe']['subscription_id'];
$switch_subscription = wcs_get_subscription( $subscription_resubscribe['subscription_resubscribe']['subscription_id'] );
return $switch_subscription ? $switch_subscription->get_currency() : $return;
}

Expand Down

0 comments on commit c433f4e

Please sign in to comment.