Assume $a\neq 0$ and $q>1$. We can define $G(u) = a^{-u} f(u) W(q^{2u})$, where $f(u)$ is a function satisfying $f(u+1)=-f(u)$. Then
$$
\begin{eqnarray}
G(u) &=& a^{-u}f(u)W(q^{2u}) \\ &=& a^{-u}f(u)(q^{2u} - a)W(q^{2u}q^{-2}) \\ &=& a^{-(u-1)}f(u-1)(1-a^{-1}q^{2u}) W(q^{2(u-1)}) \\ &=& (1-a^{-1}q^{2u})G(u-1).
\end{eqnarray}
$$
This gives $G(u)$ as a convergent infinite product times a scale factor (equal to $\lim_{u\rightarrow-\infty}G(u)$), which we will take to be $1$:
$$
G(u) = (1-a^{-1}q^{2u})(1-a^{-1}q^{2(u-1)})\cdots = (a^{-1}q^{2u};q^{-2})_{\infty},
$$
where $(\alpha;\beta)_\infty$ is the q-Pochhammer symbol. Now, taking $x=q^{2u}$, we can invert this to obtain
$$
\begin{eqnarray}
W(x) = \frac{a^{u}}{f(u)}\left(\frac{x}{a};q^{-2}\right)_{\infty}=e^{(i\pi+\ln a)u}\left(\frac{x}{a};q^{-2}\right)_{\infty},
\end{eqnarray}
$$
choosing $f(u)=e^{-i\pi u}$,
or
$$
W(x) = \exp\left({\frac{i\pi + \ln a}{2 \ln q}\cdot\ln x}\right)\left(\frac{x}{a};q^{-2}\right)_{\infty}.
$$
This is a particular solution, given by a particular choice of $f$. To obtain the general solution, multiply $W(x)$ by any function of $u=\ln x / (2 \ln q)$ that is periodic with period $1$.