Thanks for the message. Yes, you can just deactivate the plugin when it’s not needed.
Query Monitor doesn’t affect the behaviour of the cache, it only reports what’s happening.
@johnbillion Just a follow up question.
I have an enqeueu mess these days as I am rolling out a child theme. So to understand what works and what does not I create errors. How can I get not loading to show in your plugin? So instead of mail, an error in the debug.
// Check if WooCommerce is active and include its functions
if ( class_exists( 'WooCommerce' ) ) {
$file_path = get_stylesheet_directory() . '/includes/woocommerce-functions.php';
if ( file_exists( $file_path ) ) {
require_once $file_path;
} else {
// Log error and notify admin via email
$error_message = 'WooCommerce functions file not found: ' . $file_path;
error_log( $error_message );
// Send email notification
send_admin_email_notification( 'Error: Missing WooCommerce Functions File', $error_message );
}
}