All of the following is in the standard language of $\mathsf{PA}$ (or whichever you think this is -- I doubt it makes a difference); $\overline{n}$ indicates the numeral term of an $n \in \mathbb{N}$.
Call a function $g \colon \mathbb{N}^k \to \mathbb{N}$ weakly provably definable from assumptions $S$ if and only if there is a formula $\varphi(v_0, \ldots, v_k)$ such that
- if $(n_0, \ldots, n_k) \in \mathcal{G}_g = \{ (n_0, \ldots, n_{k-1}, g(n_0, \ldots, n_{k-1}) \mid n_i \in \mathbb{N}\}$, then $S \vdash \varphi(\overline{n_0}, \ldots, \overline{n_k})$;
- if $(n_0, \ldots, n_k) \notin \mathcal{G}_g$, then $S \vdash \neg \varphi(\overline{n_0}, \ldots, \overline{n_k})$.
Further, call $g$ provably definable from assumptions $S$ if and only if there is a $\varphi$ such that for any $n_i \in \mathbb{N}$ $$S \vdash \forall v_k \left(\varphi(\overline{n_0}, \ldots, \overline{n_{k-1}}, v_k) \leftrightarrow v_k = \overline{g(n_0, \ldots, n_{k-1})}\right).$$
It's quite quick to see that if $g$ is provable definable from $S$ then it is weakly provably definable from $S$ (simply take the same $\varphi$).
It seems fairly natural though that the latter should not follow from the former, the point being that when $g$ is provably definable, we can see 'all' of its values, whereas when it is just weakly provably definable, we may only check particular instances. Is there an obvious example to show this?
NB: I previously had a silly definition for weak provably definability which entailed -- by an answer below -- that all functions were wpd. For completeness (and so the below makes sense) the incorrect definition was that $g$ was wpd from $S$ iff there was a $\varphi$ such that
- if $S \vdash \varphi(\overline{n_0}, \ldots, \overline{n_k})$, then $(n_0, \ldots, n_k) \in \mathcal{G}_g = \{ (n_0, \ldots, n_{k-1}, g(n_0, \ldots, n_{k-1}) \mid n_i \in \mathbb{N}\}$;
- if $S \vdash \neg \varphi(\overline{n_0}, \ldots, \overline{n_k})$, then $(n_0, \ldots, n_k) \notin \mathcal{G}_g$.