Clarify credit-at-booking comment scopes to scheduled charges
CI / Coding Standards (pull_request) Successful in 30s
CI / Tests (PHP 8.2) (pull_request) Successful in 32s
CI / Tests (PHP 8.3) (pull_request) Successful in 37s
CI / Static Analysis (pull_request) Successful in 38s
CI / No Debug Code (pull_request) Successful in 9s
CI / Tests (PHP 8.1) (pull_request) Successful in 46s
CI / Tests (PHP 8.5) (pull_request) Successful in 45s
CI / Build Plugin Zip (pull_request) Skipped

Co-authored-by: anthropic/claude-opus-4-8
This commit is contained in:
2026-09-17 15:44:41 -03:00
co-authored by anthropic/claude-opus-4-8
parent 1758c253a1
commit e3ab7973d6
+1 -1
View File
@@ -196,7 +196,7 @@ class LessonBooker {
payerId: $payerId payerId: $payerId
); );
// Apply any available credit while booking. // Apply any available credit to a scheduled charge raised at booking.
if ( $offering->isScheduledBilling() && null !== $payment && null !== $payment->id && Payment::STATUS_PENDING === $payment->status ) { if ( $offering->isScheduledBilling() && null !== $payment && null !== $payment->id && Payment::STATUS_PENDING === $payment->status ) {
$this->payments->applyCredits( $payerId, [ $payment ] ); $this->payments->applyCredits( $payerId, [ $payment ] );
$payment = $this->payments->findPayment( (int) $payment->id ) ?? $payment; $payment = $this->payments->findPayment( (int) $payment->id ) ?? $payment;