Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
80 stars 29 forks source link

Fix filtered order links in subscription reports not working correctly when HPOS is enabled #609

Closed Mayisha closed 1 month ago

Mayisha commented 2 months ago

Fixes WCS-4650

With HPOS enabled, the links highlighted in the screenshot below do not work as intended, resulting in a list of all orders instead of showing the filtered order for the reports being viewed.

reports

Description

How to test this PR

  1. Enable HPOS from WooCommerce > Settings > Advanced > Features page.
  2. Enable compatibility mode if not enabled already to view the subscription report when HPOS is enabled.
  3. Go to WooCommerce > Reporst > Subscriptions
  4. Click the link subscription renewals.
  5. In trunk it should take you to the order table page and display all the orders.
  6. In this branch, it should take you to the order table page and display the renewal orders only.
james-allan commented 1 month ago

Changes look good. Thanks for picking this PR up @mattallan!

WebMarketingMatters commented 2 weeks ago

Hi @mattallan @Mayisha @james-allan - Can I please confirm what version of WooCommerce subscriptions this fix is in? Looks to me like it's 7.1.0. Do you know when this will become available? I found this bug and reported it to WooCommerce a few months ago, it would be good to finally have a fix!

james-allan commented 2 weeks ago

Yep it should be 7.1.0 of subscriptions-core. That was included in 6.3.0 of the WooCommerce Subscriptions plugin which released back in early May.

WebMarketingMatters commented 2 weeks ago

Hi @james-allan. Okay, I'm currently using 6.4.0 and the reports filtering doesn't work. It just brings up a question mark when you hover over the left-hand columns. (They should take you to the filtered/related orders for that period) ![Uploading Screenshot 2024-06-16 at 18.22.52.png…]()

james-allan commented 1 week ago

@WebMarketingMatters your screenshot probably didn't finish uploading before you submitted your comment so I cannot see it, however, I just had a look on my local site and it's working for me.

Are you hovering over the link indicated by the ↗︎? Like this:

Screenshot 2024-06-18 at 4 45 33 PM
WebMarketingMatters commented 1 week ago

@james-allan Thanks for the reply. I have just cleared my cache and tried again and it's now working. Thanks for your help with this.