Support » Plugin: WaterWoo PDF Plugin » Absolute file path in download url

  • Resolved thuris

    (@thuris)


    First off, thank you for the plugin. It’s working great. Our PDFs are being properly watermarked and saved to wp-content/uploads/woocommerce_uploads just as they should.

    The only problem is that the download URLs generated at purchase are in the format:

    https://www.example.com/var/www/site/wp-content/ etc etc

    When the /var/www/site is cut from the URL, the file downloads perfectly (and the download limit is decremented correctly). When I paused watermarking, the url for those downloads did not include the /var/www/site portion. Forced downloads also work properly.

    I checked my wp_home and siteurl constants, looked for anything suspicious in Apache virtualhost or .htaccess, refreshed Permalinks, and googled extensively for similar issues.

    This will probably turn out to be a simple fix. Maybe I need to make an edit to wwpdf-file-handler.php (and remember to replace that edit after updates)? I assume that’s where WooCommerce is deriving its url to provide to the customer.

    Thank you very much for your attention.

    • This topic was modified 2 months, 2 weeks ago by thuris.
    • This topic was modified 2 months, 2 weeks ago by thuris.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Little Package

    (@littlepackage)

    Hi there,

    I haven’t heard of this so it must be something particular to your installation/setup/combination of things. You didn’t say what type of Woo download you ARE using, only that Forced does work. More information about what might make your setup unique, and testing without other plugins enabled to rule out a conflict, would be helpful before continuing. I do appreciate the level of detail you have included already though — super! Thank you.

    Thread Starter thuris

    (@thuris)

    Thank you so much for the quick reply. Your request to specify the download method prompted me to compare the redirect method I was attempting to use against X-Sendfile. I enabled X-Sendfile and immediately files were downloading successfully. Since this is a better and cleaner method, I consider it resolved from my point of view.

    As for the original issue, I was never able to find it. Hopefully it doesn’t pop up in a new context!

    • This reply was modified 2 months, 2 weeks ago by thuris. Reason: mark resolved
    Plugin Author Little Package

    (@littlepackage)

    Hi @thuris WooCommerce no longer recommends using the redirect method anyway, so I’m glad you switched. Keep me updated if you notice anything else. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.