Skip to content

Commit

Permalink
Merge pull request #940 from mklepaczewski/patch-1
Browse files Browse the repository at this point in the history
Fix: CreditcardInstructionStrategy.php - handle missing cardHolder field
  • Loading branch information
mmaymo authored Sep 17, 2024
2 parents 228260e + cf67a44 commit ca3aeef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ public function execute(
) {

if ($payment->isPaid() && $payment->details) {
$cardHolder = isset($payment->details->cardHolder) ? $payment->details->cardHolder : 'Unknown';
return sprintf(
/* translators: Placeholder 1: card holder */
__('Payment completed by <strong>%s</strong>', 'mollie-payments-for-woocommerce'),
$payment->details->cardHolder
$cardHolder
);
}
$defaultStrategy = new DefaultInstructionStrategy();
Expand Down

0 comments on commit ca3aeef

Please sign in to comment.