Skip to content

Commit b3f0ee7

Browse files
authored
Merge pull request #170 from paynl/feature/PLUG-4671
PLUG-4671 - Translate problematic ASCII characters
2 parents d84d32a + c6b0dab commit b3f0ee7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

includes/classes/PPMFWC/Gateway/Abstract.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,10 @@ private function getProductLines(WC_Order $order)
889889
foreach ($items as $item) {
890890
$pricePerPiece = ($item['line_subtotal'] + $item['line_subtotal_tax']) / $item['qty'];
891891
$taxPerPiece = $item['line_subtotal_tax'] / $item['qty'];
892+
$itemName = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $item['name']);
892893
$product = array(
893894
'id' => $item['product_id'],
894-
'name' => mb_substr($item['name'], 0, 45, "UTF-8"),
895+
'name' => mb_substr($itemName, 0, 45, "UTF-8"),
895896
'price' => $pricePerPiece,
896897
'qty' => $item['qty'],
897898
'type' => \Paynl\Transaction::PRODUCT_TYPE_ARTICLE,

0 commit comments

Comments
 (0)