Created
July 16, 2021 10:33
-
-
Save fitimvata/09b177f8c822c8a2ffedf987058f0fe3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Fix woocommerce admin analytics performance issue | |
| * Plugin URI: | |
| * Description: | |
| * Version: 1.0.0 | |
| * Author: | |
| * Author URI: | |
| * License: MIT | |
| */ | |
| add_filter('posts_where', function ($where, WP_Query $wp_query) { | |
| if ($wp_query->get('low_in_stock')) { | |
| $wp_query->set('low_in_stock', false); | |
| } | |
| return $where; | |
| }, 9, 3); |
Thanks!! worked like a charm!! low stock query was blocking my website!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm... might not be the security update. But for example :
In any product....
Go to Quick Edit
Set Product as hidden
Update
Go To Quick Edit
Product is showing as hidden
Change to Catalog & Search
Update
Go to Quick Edit
Product is showing as hidden
REFRESH THE BROWSER
Go to quick edit
Product is showing as Catalog and search
I'm seeing this on multiple installs of Woo