Skip to content

Conversation

@roykho
Copy link
Contributor

@roykho roykho commented Jul 29, 2021

All Submissions:

Changes proposed in this Pull Request:

Closes #29988

This one is a bit peculiar because the two functions (https://github.com/woocommerce/woocommerce/blob/trunk/includes/wc-product-functions.php#L488-L526) that runs through the hook doesn't describe what the intention of it was. But from seeing what it is doing in code, I am assuming the intention was to remove images from being shown if they reside in the woocommerce_uploads folder because the assumption is that it is a downloadable file. So the PR here is basically to check if the user actually has the capabilities (manage_woocommerce) and show it for them as they're administering the site.

How to test the changes in this Pull Request:

  1. Go to a downloadable product and add a downloadable file that is an image. Make sure it is a new uploaded image.
  2. After loading the file, ensure you can see the image in the media editor popup.
  3. Now navigate to the Media page. wp-admin/upload.php.
  4. Ensure you can see the image for the file you just uploaded.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Fix - Users with capabilities such as the admin are not able to the see downloadable file images after uploading.

@roykho roykho requested review from a team and Konamiman and removed request for a team July 29, 2021 19:51
@Konamiman Konamiman merged commit 92ffb09 into trunk Aug 3, 2021
@Konamiman Konamiman deleted the fix/29988 branch August 3, 2021 08:35
@github-actions github-actions bot added this to the 5.7.0 milestone Aug 3, 2021
@roykho roykho added release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Aug 17, 2021
@rodelgc rodelgc added testing instructions added and removed release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: add changelog Mark all PRs that have not had their changelog entries added. [auto]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server error when attempting to make virtual downloadable products thumbnails visible in the media library

4 participants