| @@ -1658,11 +1658,11 @@ | ||
| 1658 | 1658 | } |
| 1659 | 1659 | $items = ''; |
| 1660 | 1660 | foreach ( $cart as $cart_row ) { |
| 1661 | 1661 | $items .= "\n\t\t\t\t" . '{' . "\n"; |
| 1662 | - $items .= "\t\t\t\t\t" . '"id": "' . $usces->getItemCode( $cart_row['post_id'] ) . '",' . "\n"; | |
| 1662 | + $items .= "\t\t\t\t\t" . '"id": ' . wp_json_encode( (string) $usces->getItemCode( $cart_row['post_id'] ) ) . ',' . "\n"; | |
| 1663 | 1663 | $items .= "\t\t\t\t\t" . '"quantity": ' . $cart_row['quantity'] . ',' . "\n"; |
| 1664 | - $items .= "\t\t\t\t\t" . '"title": "' . $usces->getItemName( $cart_row['post_id'] ) . '",' . "\n"; | |
| 1664 | + $items .= "\t\t\t\t\t" . '"title": ' . wp_json_encode( (string) $usces->getItemName( $cart_row['post_id'] ) ) . ',' . "\n"; | |
| 1665 | 1665 | $items .= "\t\t\t\t\t" . '"unit_price": ' . $cart_row['price'] . "\n"; |
| 1666 | 1666 | $items .= "\t\t\t\t" . '},'; |
| 1667 | 1667 | } |
| 1668 | 1668 | if ( isset( $entry['order']['discount'] ) && 0 !== $entry['order']['discount'] ) { |