• Resolved Jason Wong

    (@eljkmw)


    Your plugin works well, but Iā€™m encountering a problem in attaching the company logo via ā€œ/wp-admin/admin.php?page=bewpi-invoices&tab=bewpi_template_settingsā€

    It kept resulting with the error message ā€œCompany logo not found. Upload the image to the Media Library and try again.ā€

    Iā€™m unsure whatā€™s wrong nor how to overcome this issue.
    Please advise. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jason Wong

    (@eljkmw)

    It’s alright. I figured it out after I looked through your plugin’s source codes, and noticed your use of the get_logo_url function.

    With that I’ve to upload and add a company logo via wp-admin > Appearance >> Header. Then, copy the image’s URL, and paste it into the text box of the Company logo in your plugin’s template settings.

    I’ll definitely prefer if your plugin can just link an image using the provided URL, rather than the above approach.

    p.s. Perhaps the use of the media_sideload_image function might be better.

    • This reply was modified 7 years, 3 months ago by Jason Wong. Reason: Added a suggestion
    Plugin Author Bas Elbers

    (@baaaaas)

    Hi Jason,

    Thanks for pointing that out and I will definitely look into the media_sideload_image function, but it should work if you grab the File URL from the media library as well. Did you’ve tried the File URL or the actual url from browser?

    Thread Starter Jason Wong

    (@eljkmw)

    I duplicated the default invoice template, modified it to add the company logo via its URL, and added height and width attributes to scale down its actual size. Another thing I removed was the IF statement for detecting the company logo available.

    This way I don’t have to add the logo URL via wp-admin, which I feel makes it easier to force configure what I want to achieve.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot add company logo’ is closed to new replies.