• Hello,

    I’ve searched on the forum but haven’t been able to solve it by myself ??

    I’ve installed the plugin and then I have this ugly fatal error :

    Fatal error: Uncaught Error: Call to undefined function utf8_encode() in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/compatibility/mb-string-compatibility.php:17 Stack trace: #0 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(428): mb_convert_encoding(‘<!DOCTYPE html>…’, ‘UTF-8’, ‘iso-8859-1’) #1 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-pdf-maker.php(50): Dompdf\Dompdf->loadHtml(‘<!DOCTYPE html>…’) #2 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(499): WPO\WC\PDF_Invoices\PDF_Maker->output() #3 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(530): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf() #4 /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(218): WPO\WC\ in /var/www/html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/compatibility/mb-string-compatibility.php on line 17

    I’ve been reading around and I suspect a php7 issue… but I’m not a guru.
    Can you help me ?

    Thank you !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! Is this a custom PHP7 setup? The plugin is fully PHP7 compatible and on a normal installation, utf8_encode is a standard function in PHP.
    Either way, this is already a ‘fallback’ method, it looks like you don’t have the required PHP MBString extension – you may want to check if there’s other things missing. Under WooCommerce > PDF Invoices > Status you can find more information about this.

    If you ask you host to enable MBString they should be able to do that for you, it’s a pretty standard extension.

    Ewout

    Thread Starter mistmath

    (@mistmath)

    Hi,

    No this is a standard php7 setup… strange. I’ll dig that point.
    Thank you.

    Mathieu

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error – utf8_encode()’ is closed to new replies.