Logo isn’t showing up
-
I’ve tried adding a logo to the invoice (.png and .jpg) and it just shows up white. I’ve tried using different images, as well as resizing and it still shows up blank. I’ve also tried playing around in the settings (output to HTML and embed logo).
-
Can you share the URL to the image as it is displayed on the invoice, please? You can do this by opening the invoice in HTML view, then right click the logo and click “Inspect”, then check the “src” attribute in the image HTML.
Thanks for the information. Could you share a screenshot of your settings under PDF Invoices > Advanced > Status, please?
Thank you for looking into this for me.
This one shows the Settings tab. Click the “Status” tab next to it. My apologies for any confusion
My apologies! https://ibb.co/pQ62qvc
Thanks for the screenshot. Could you try increasing the WP memory limit, please? It’s currently set to 40mb. You can ask your host provider to increase it to 512, for example.
Hi there, apologies for the delay @dwpriv
It has been increased to 512 and still isn’t working. I’ve removed the image, and re-added it and it still shows up as blank.
Hi @samprairie,
Just out of curiosity, are you placing a new testing order after configuring the new image, or you are trying with an order placed before this change?
Please note that documents created before this, will not follow your new settings, because we stored these settings per-order basis for historical reasons. For instance, if you change your shop address in the future, it should not affect old PDF invoices that you generated when your store was located in the old address.
Therefore, to rule out that this is happening, my recommendation is to place a new order after set your JPEG image (preferably) for your shop logo (the PNG format depends on your server settings, and we have received a few reports about some providers which have issues with the ImageMagick PHP library: Using JPEG is better because this is supported by default and does not depend on third party libraries).
That said, if you are just playing with the plugin configuration, or this is a new installation, you could try to activate the “Test mode” temporarily, under WooCommerce > PDF Invoices > General > Test mode. See Show PDF documents with the latest settings.
Hello @yordansoares, thank you for the help but it’s still not working.
I’ve removed the image completely, uploaded it as a .jpg, and placed a new order and it’s still not showing.
This is not a new installation – I’ve had this plugin working for years until we started offsetting our local images to an Amazon server to save on bandwidth. The URL still shows our website though, so I’m not sure if that’s the issue or not.
Thanks for sending more details, @samprairie: It was very useful to understand better your case!
We had an issue with another user in the past who was using a plugin called “WP Offload Media Lite for Amazon S3”. At that moment, the issue was related with the return of the
wp_get_attachment_image_srcfunction, which they filter to override its default behavior and pull the URLs from Amazon S3, but we did not receive more feedback from the user, so we do not know whether they found a fix or not, but it seems that you have the same issue they reported.That said, with the following code snippet you can set a logo manually as a workaround:
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Set a shop logo manually (this will override the shop logo in the plugin's settings)
*/
add_filter( 'wpo_wcpdf_header_logo_img_element', function( $img_element, $attachment) {
// Set the URL of your shop logo below:
$shop_logo_url = 'https://img.logoipsum.com/288.svg';
return "<img src='{$shop_logo_url}'/>";
}, 10, 2 );If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use code snippets
Sorry for the late response. I appreciate you sending this. Does this get put into the functions.php file? I’ll make sure I do a backup beforehand.
-
This reply was modified 1 year, 4 months ago by
samprairie.
Hi @samprairie,
If you haven’t worked with code snippets (actions/filters) or
functions.phpbefore, read this guide: How to use code snippetsIn brief, if you have a child theme, you can add code snippets in its
functions.phpfile: don’t add code snippets to thefunctions.phpfile from your parent theme, because you may lose your customizations after updating your parent theme! The another way to add code snippets, that is safer in my humble opinion, is to use the Code Snippets plugin: This plugin stores the code snippets in your database, so you don’t have to worry about losing your customizations after updating your plugins or theme 😉Thanks for the additional help! I backed up the file, and added it to the bottom of the functions.php file. I edited the URL to include the right logo. I uploaded the functions file with the added code and it’s still showing up blank. I even created a new order to test it out on.
Hi @samprairie,
Could you please write us at [email protected], to investigate this further?*
*Please note that we do not work on weekends, therefore, it is likely that we will resume the conversation next Monday 😉
-
This reply was modified 1 year, 4 months ago by
The topic ‘Logo isn’t showing up’ is closed to new replies.