New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying an order with a downloadable product causes the download link to expire #1013
Comments
I am unable to reproduce this. Is it possible that the install was upgraded from an old version? Sounds like some database tables didn't get updated properly. Also, is this on an IIS machine? |
I'm having a similar issue. Anytime an order is edited and the "Save Order" button is clicked the download becomes expired for the customer. I have tested and reproduced the exact same error on multiple clean installs of WordPress, both locally and online. So far the only work around I've came up with when I create or edit an order is to go ahead and make all of the adjustments I need to do, then I click "Save Order". Once I'm done, I scroll to the bottom, click "Revoke Access" and then re-add the item back (Grant Access), but without clicking "Save Order" after I re-add the item. For some reason it works when its done that way, even though this isn't the way it was intended I'm sure. What do you think it could be? |
I fixed this in 1.5.4 by changing the conditional part of line 271 in writepanel-order_downloads.php from... array_key_exists($i, $access_expires) ... to ... (array_key_exists($i, $access_expires) && $access_expires[$i] != "") I believe the problem was that the access_expires field being passed in from the order page was set to "" instead of null, thus causing it to be converted into 1970-01-01. |
Thanks @kenlaws! |
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Seen using WooCommerce 1.5.4.
The text was updated successfully, but these errors were encountered: