• Hi,

    In my custom invoice.php I have the following code to display a footer image:

    <?php do_action( ‘wpo_wcpdf_after_order_details’, $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order ); ?>
    <div id=”footer” class=”footer-images”>

    </div>

    When I open the invoice the first time in WooCommerce the footer is displayed. When I open the invoice again the footer image is emtpy (on the bottom of the document) with the message:

    Image not found
    https://https://xxxxxxx.nl/wp-content/uploads/2017/01/xxxxxxxx.png

    When clicking on the error message the image is displayed seperately.

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

    (@pomegranate)

    Hello Jakob,
    There’s a double https:// in the url, perhaps this is the issue? Another reason could be that your site doesn’t allow external connections. In this case you have to use absolute server paths (this would be indicated on the Status tab of the PDF Invoice settings under ‘Allow remote stylesheets and images’. See: Insert images

    Hope that helps!
    Ewout

    Thread Starter jakobhilbolling

    (@jakobhilbolling)

    the double HTTP is typo from me. In the code is it correct.

    Also allowing external connections is set correctly:

    Allow remote stylesheets and images true allow_url_fopen enabled

    Also in this case it is used in a custom invoice

    Thread Starter jakobhilbolling

    (@jakobhilbolling)

    The strange thing is:
    when opening the invoice from the dashboard the footer image is displayed but..

    When processing the orders and the customer receives the order complete mail with the invoice the first and second mail shows the correct invoice with footer and the third mail the footer image is not displayed.
    Could this be a memory issue. My setting:

    WP Memory Limit Recommended: 128MB (more for plugin-heavy setups)
    See: Increasing memory allocated to PHP 40M

    Plugin Contributor Ewout

    (@pomegranate)

    That sounds like it could be a memory issue indeed. More information here: Solving memory issues

    Have you tried using the server path rather than a url? In all cases that’s the most preferable solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Footer image disappears’ is closed to new replies.