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:
Dwindi Ramadhana
2026-01-04 10:49:47 +07:00
parent 75a82cf16c
commit 670bd7d351
12 changed files with 11 additions and 73 deletions

View File

@@ -60,9 +60,6 @@ class AuthController {
// Debug logging
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( '[AuthController::login] Login successful for user ID: ' . $user->ID );
error_log( '[AuthController::login] Current user ID: ' . get_current_user_id() );
error_log( '[AuthController::login] Cookies set: ' . ( headers_sent() ? 'Headers already sent!' : 'OK' ) );
}
// Return user data and new nonce
@@ -154,8 +151,6 @@ class AuthController {
// Debug logging
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( '[AuthController::check] is_user_logged_in: ' . ( $is_logged_in ? 'true' : 'false' ) );
error_log( '[AuthController::check] Cookies: ' . print_r( $_COOKIE, true ) );
}
if ( ! $is_logged_in ) {