Skip to content

Commit

Permalink
Fix free checkout fatal error
Browse files Browse the repository at this point in the history
* BUG FIX: Fixes an issue for free checkouts, where fatal errors would occur with Paystack as the active gateway.
  • Loading branch information
andrewlimaza committed Oct 8, 2024
1 parent 126278e commit f778856
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions class.pmprogateway_paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ static function pmpro_checkout_before_change_membership_level( $user_id, $morder
return;
}

if ( $morder->gateway != "paystack" ) {
return;
}

if ( empty( $morder->code ) ) {
$morder->code = $morder->getRandomCode();
}
Expand Down

0 comments on commit f778856

Please sign in to comment.