Time for some live-tooting of debugging a problem I’m having in a client’s WordPress install.
The Problem:
When updating the product gallery for a WooCommerce product, the search box doesn’t seem to filter anything at all.
Background:
- The site is old, but has received many updates over the years.
- WordPress + WooCommerce + some other plugins.
- I like code, so no site builder.
I did some debugging the other day and narrowed the problem down to the posts_search filter in the WP Query class. Before running the filter the SQL to filter by the search parameter is there, but after running the filter it is not.
Doing a print_r() on the global $wp_filter it seems like nothing is hooked onto the posts_search filter.
At this point I think I should fire up a an actual debugger and follow along as the code is executed.
So, now I need to learn to get XDebug running in a WordPress site hosted locally with Laravel Valet.