• killerdog

    (@killerdog)


    So, here is a little bug report. Not a biggie though. In our sandbox, we just noticed that on page Woocommerce/Reports/Stock, products that have been placed in the trash are still displayed, which seems rather strange. Editing a trashed item on the page displays “You can’t edit this item because it is in the Trash. Please restore it and try again”. I’m sure this wasn’t the intent here. ??

    https://www.ads-software.com/plugins/woocommerce/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Thread Starter killerdog

    (@killerdog)

    Sorry, forgot to report that we’re using WP 4.4.2 and WC 2.5.2.

    After analyzing the code in your screenshot, I had another look at our sandbox to see whats going on. I noticed that it is ONLY the VARIATIONS of trashed products that are displayed in the stock reports.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I see. It checks AND posts.post_status = 'publish' but not post parent post status.

    This could be fixed with 2 separate queries, or extra joins, but both would slow the query down substantially. I’m not sure it’s worth it for this edge case.

    Thread Starter killerdog

    (@killerdog)

    Well, the additional query time shouldn’t really be an issue, since it’s only the store admin making the query, and only on demand. I would better understand this reasoning if it was applied to all general visitors on the front-end. Misleading information is always a good idea to cleanup no mater how edge case it might be. Anyways, thanks for your consideration.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stock reports displaying trashed products’ is closed to new replies.