Continuing [ngerman]babel + pgfplots + axis + text height = ☇ and feeding
\RequirePackage{ifthen}
\newboolean{techrep}
\setboolean{techrep}{true}
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}\pgfplotsset{compat=1.14}
\usetikzlibrary{babel}
\begin{document}
\section{Section name}
\ifthenelse{\boolean{techrep}}{%
\begin{tikzpicture}\shorthandoff{"}
\begin{axis}[
xmax = 5.5,
xmin = 0,
ymax = 5.5,
ymin = 0,
extra x tick style = {text height=height("0")},
extra x ticks = 3
]
\end{axis}
\end{tikzpicture}%
}{}
\end{document}
(in a real example, there would be a lot of unrelated code around, which is all abstracted away here) to pdflatex, we obtain
! Missing number, treated as zero.
<to be read again>
p
l.22 }{}
? X
Who is the culprit and what to do? Using the TikZ library babel doesn't help, neither does inserting \shorthandoff(") at various places (though, I've not tested ALL places).

\begingroup\shorthandoff{"} \ifthenelse{\boolean{techrep}}{% \begin{tikzpicture} \begin{axis}[ xmax = 5.5, xmin = 0, ymax = 5.5, ymin = 0, extra x tick style = {text height=height("0")}, extra x ticks = 3 ] \end{axis} \end{tikzpicture}% }{}\endgroupworks. – May 31 '20 at 04:38