johnbillion / query-monitor

The developer tools panel for WordPress
https://querymonitor.com
GNU General Public License v2.0
1.59k stars 208 forks source link

Debug Bar Compatibility: Check if `class_exists( 'Debug_Bar', false )` is not enough in some scenarios #809

Closed felipeelia closed 11 months ago

felipeelia commented 1 year ago

If Jetpack is enabled, it will run class_exists( 'Debug_Bar' ), automatically loading the QM version of that class. Then, when QM checks if class_exists( 'Debug_Bar' ) it will return true (because Jetpack loaded it first) and return early. In that scenario, the Debug Bar compatibility layer will never run.

This is related to https://github.com/10up/debug-bar-elasticpress/issues/77