Found a bug in lib/cleanup.php (WooCommerce)

I’ve noticed a bug in the latest Roots with WooCommerce (I’m using version 2.15 but not sure what other versions it affects).

The function roots_request_filter() in lib/cleanup.php affects the dashboard as well and breaks product filtering in WooCommerce.

I’ve fixed it by adding && !is_admin() to the if statement if (isset($_GET['s']) && empty($_GET['s'])).

Maybe this should be fixed in the next update.



Thanks for figuring out a fix. Roots is open source and available on Github, it’s very easy to create a pull request with your fix, and if there’s no issues, it will be included in Roots.

Thanks - like @kalenjohnson said a PR would be nice for Roots master. For 7.0.0, cleanup has moved to Soil, so we’ll need to fix it over there as well

I’ve attempted a pull request but I’m an absolute noob when it comes to Github (I’m working on it) so I may have done it wrong…