Skip to content

Commit

Permalink
Fix free gateway purchases for 2Checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
dparker1005 committed Jul 29, 2024
1 parent b5dd7dd commit af75a03
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/gateways/class.pmprogateway_twocheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ static function pmpro_checkout_before_change_membership_level($user_id, $morder)
if(empty($morder))
return;

// If this isn't a 2Checkout order, bail.
if ( 'twocheckout' !== $morder->gateway ) {
return;
}


$morder->user_id = $user_id;
$morder->saveOrder();

Expand Down

0 comments on commit af75a03

Please sign in to comment.