kovshenin / surge

Surge is a very simple and fast page caching plugin for WordPress.
GNU General Public License v3.0
152 stars 12 forks source link

Theme conflict, null on WooCommerce product titles #19

Closed mustardBees closed 1 year ago

mustardBees commented 2 years ago

Working with a theme with a built-in AJAX search feature. When Surge is active, the search function doesn't work (JS error "Uncaught TypeError: Cannot read properties of null").

Looking at the data returned by the AJAX request - the product titles are null. Looks related to:

https://github.com/kovshenin/surge/blob/1.0.4/include/invalidate.php#L18

Is this an issue with the theme? Or, should this filter return the $title?

kovshenin commented 2 years ago

Hmm you're right, the filter callback should indeed return the title. Will fix in next update, thanks for the report!