code = $code; $this->message = $message; } public function get_error_code(): string { return $this->code; } public function get_error_message(): string { return $this->message; } } } if ( ! function_exists( 'is_wp_error' ) ) { function is_wp_error( $thing ): bool { return $thing instanceof WP_Error; } }