fix: PHP errors and clean up error_log statements
- Fixed redirect_wc_pages_to_spa: added spa_mode check (only redirect when 'full') - Fixed PHP fatal error: use get_queried_object() instead of global $product - Removed all error_log debug statements from codebase - Fixed broken syntax in PaymentGatewaysProvider.php after error_log removal
This commit is contained in:
@@ -17,7 +17,6 @@ class Assets
|
||||
{
|
||||
// Debug logging
|
||||
if (defined('WP_DEBUG') && WP_DEBUG) {
|
||||
error_log('[WooNooW Assets] Hook: ' . $hook);
|
||||
}
|
||||
|
||||
if ($hook !== 'toplevel_page_woonoow') {
|
||||
@@ -32,7 +31,6 @@ class Assets
|
||||
|
||||
// Debug logging
|
||||
if (defined('WP_DEBUG') && WP_DEBUG) {
|
||||
error_log('[WooNooW Assets] Dev mode: ' . ($is_dev ? 'true' : 'false'));
|
||||
}
|
||||
|
||||
if ($is_dev) {
|
||||
@@ -155,11 +153,6 @@ class Assets
|
||||
|
||||
// Debug logging
|
||||
if (defined('WP_DEBUG') && WP_DEBUG) {
|
||||
error_log('[WooNooW Assets] Dist dir: ' . $dist_dir);
|
||||
error_log('[WooNooW Assets] CSS exists: ' . (file_exists($dist_dir . $css) ? 'yes' : 'no'));
|
||||
error_log('[WooNooW Assets] JS exists: ' . (file_exists($dist_dir . $js) ? 'yes' : 'no'));
|
||||
error_log('[WooNooW Assets] CSS URL: ' . $base_url . $css);
|
||||
error_log('[WooNooW Assets] JS URL: ' . $base_url . $js);
|
||||
}
|
||||
|
||||
if (file_exists($dist_dir . $css)) {
|
||||
@@ -286,7 +279,6 @@ class Assets
|
||||
|
||||
// Debug logging (only if WP_DEBUG is enabled)
|
||||
if (defined('WP_DEBUG') && WP_DEBUG && $filtered !== $const_dev) {
|
||||
error_log('[WooNooW Assets] Dev mode changed by filter: ' . ($filtered ? 'true' : 'false'));
|
||||
}
|
||||
|
||||
return (bool) $filtered;
|
||||
|
||||
@@ -53,9 +53,6 @@ class StandaloneAdmin {
|
||||
|
||||
// Debug logging (only in WP_DEBUG mode)
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
error_log( '[StandaloneAdmin] is_user_logged_in: ' . ( $is_logged_in ? 'true' : 'false' ) );
|
||||
error_log( '[StandaloneAdmin] has manage_woocommerce: ' . ( $has_permission ? 'true' : 'false' ) );
|
||||
error_log( '[StandaloneAdmin] is_authenticated: ' . ( $is_authenticated ? 'true' : 'false' ) );
|
||||
}
|
||||
|
||||
// Get nonce for REST API
|
||||
|
||||
Reference in New Issue
Block a user