For some years now, we have been using “Force download” to offer downloadable products without any problems. Since 2-3 weeks this does not work anymore: The encrypted download links, which are automatically sent to the customer after payment, lead to [file not found]. However, the downloadable images are stored correctly and the links are also inserted correctly on the pages of the individual products.
An error was detected in […]/wp-content/plugins/woocommerce-payments/includes/admin/class-wc-rest-payments-webhook-controller.php
Errormessage: Uncaught TypeError: Argument 2 passed to WC_REST_Payments_Webhook_Controller::__construct() must be an instance of WC_Payments_Webhook_Processing_Service, instance of WC_Payments_DB given, called in /var/www/[…]/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php on line 615 and defined in /var/www/[…]/wp-content/plugins/woocommerce-payments/includes/admin/class-wc-rest-payments-webhook-controller.php:46
Choosing the Redirect only-Option works, but an encrypted download link is mandatory for our tasks. X-Accel-Redirect/X-Sendfile leads to the the same result as described above. (allow_url_fopen is ON)
Hope anyone can help.
Thanks!
]]>The links designated in the product details area of the product pages are correct and I’ve verified the downloadable files are there.
I’m guessing that after a recent update to WooCommerce (I’m on 8.6.0) something broke in how the link provided to the customer gets generated. I notice in the URL above that the order is identified as “wc_order_afu4cu9Vsun9D” while the order ID is actually 57693. Could that be were the issue lies?
Thank you.
]]>I would like to sell gpx routes as downloadable items, but it doesn’t allow me to do so….It allows a whole list of downloadable files except that…
How can I circumvent this problem?
Thank you in advance!
]]>I hope I’ve made my case clear.
]]>View post on imgur.com
]]>Hi, why can’t I include a downloadable product in the bundle? There are a line over that product. I have the free version.
Regards
Daniel
I have confirmed with siteground that mod_xsendfile is not installed and will not be installed so just setting woocommerce settings to use X-sendfile would failover to ForceDownload based on the logs which is not great given the large file sizes. However, siteground support suggested that because of the Nginx proxy, X-Accel-Redirect might achieve the same result. I modified the code in woocommerce/includes/class-wc-download-handler.php to explicitly use X-Accel-Redirect (despite the server being Apache) and I can confirm that this does in fact deliver the files but ONLY if I also modify the .htaccess file in the wp-content/uploads/woocommerce_uploads to allow all request which obviously defeats the purpose of having secure downloads (anyone can just access the files as long as they know the address). If the .htaccess file is left to the default of “deny from all” I will get a 403 error using X-Accel-Redirect.
Can anyone with knowledge of siteground in particular or reverse proxies in general tell me whether I can modify the .htaccess file in such a way to allow X-Accel-Redirect delivery while not allowing direct access to the files?
]]>