• Resolved humpataa

    (@humpataa)


    got this one in my server-log, please advise:

    [26-Aug-2026 09:45:43 UTC] PHP Fatal error: Uncaught WCCartPDF\Mpdf\MpdfException: Can’t open file /tmp//mpdf/ttfontdata/dejavusans.GSUBGPOStables.dat in /home/yn0gma2ulvzb/public_html/……/www/wordpress/wp-content/plugins/wc-cart-pdf/src/dependencies/Mpdf/Otl.php:337

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Jensen

    (@dkjensen)

    Hi @humpataa

    The temporary directory on your server may not be writable at the /tmp location. Can you try and add the following to your functions.php file or in a snippet? This changes the temp dir to the core WordPress upload dir which should be writable.

    add_filter( 'wc_cart_pdf_temp_dir', function () {
    $upload = wp_upload_dir();
    $dir = trailingslashit( $upload['basedir'] ) . 'wc-cart-pdf';
    if ( ! wp_mkdir_p( $dir ) ) {
    return get_temp_dir();
    }
    return $dir;
    } );
    Thread Starter humpataa

    (@humpataa)

    Works! Thank you David!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.