diff --git a/src/PaymentMethods/InstructionStrategies/CreditcardInstructionStrategy.php b/src/PaymentMethods/InstructionStrategies/CreditcardInstructionStrategy.php index 2d66824e..4723094c 100644 --- a/src/PaymentMethods/InstructionStrategies/CreditcardInstructionStrategy.php +++ b/src/PaymentMethods/InstructionStrategies/CreditcardInstructionStrategy.php @@ -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 %s', 'mollie-payments-for-woocommerce'), - $payment->details->cardHolder + $cardHolder ); } $defaultStrategy = new DefaultInstructionStrategy();