Skip to main content
< All Topics
Print

How to remove HTML from printed receipts?

PrinterCo Untitled 1 0011 WooCommerce 4

Woocommerce order printing HTML code. How to resolve this?

If your order items are printed with a mixture of HTML tags, then you will need to remove them. To do this, you must implement a hook for the before_send_order_to_iconnect filter. In that filter, you simply access it as follows:

$order->item[.....]->Description - for description
$order->item[.....]->Item - for item name

This is assuming that the order object is in a variable called $order. But you can call this whatever you like.

Table of Contents
Shopping cart
Sidebar
Start typing to see products you are looking for.

This Month Only

Upgrade your restaurant with an all-in-one POS terminal.

No computer needed. Built-in thermal printer.

Works seamlessly with PrinterCo automatic order printing.

Use code: F9KMB4NZ at checkout

Offer valid this month only.