| @@ -80,18 +80,14 @@ | ||
| 80 | 80 | */ |
| 81 | 81 | public static function set_mode( $mode ) { |
| 82 | 82 | // Validate mode |
| 83 | 83 | if ( ! in_array( $mode, array( self::MODE_PRODUCTION, self::MODE_STAGING ), true ) ) { |
| 84 | - error_log( "MetaSync Endpoint Manager: Invalid mode '{$mode}' provided" ); | |
| 84 | + error_log( "MetaSync Endpoint Manager: Invalid mode '{$mode}' provided" ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- genuine failure path, bounded, no secrets | |
| 85 | 85 | return false; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $result = update_option( self::MODE_OPTION, $mode ); |
| 89 | 89 | |
| 90 | - if ( $result ) { | |
| 91 | - error_log( "MetaSync Endpoint Manager: Endpoints switched to {$mode} mode by user " . get_current_user_id() ); | |
| 92 | - } | |
| 93 | - | |
| 94 | 90 | return $result; |
| 95 | 91 | } |
| 96 | 92 | |
| 97 | 93 | /** |
| @@ -103,9 +99,9 @@ | ||
| 103 | 99 | public static function get_endpoint( $endpoint_key ) { |
| 104 | 100 | $mode = self::get_mode(); |
| 105 | 101 | |
| 106 | 102 | if ( ! isset( self::$endpoints[ $mode ][ $endpoint_key ] ) ) { |
| 107 | - error_log( "MetaSync Endpoint Manager: Unknown endpoint key '{$endpoint_key}'" ); | |
| 103 | + error_log( "MetaSync Endpoint Manager: Unknown endpoint key '{$endpoint_key}'" ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- genuine failure path, bounded, no secrets | |
| 108 | 104 | |
| 109 | 105 | // Fallback to production if key exists there |
| 110 | 106 | if ( isset( self::$endpoints[ self::MODE_PRODUCTION ][ $endpoint_key ] ) ) { |
| 111 | 107 | return self::$endpoints[ self::MODE_PRODUCTION ][ $endpoint_key ]; |