As always, the general rule for Past Perfect is "don't use it if you don't need it". If the context makes it obvious what the order of actions is, it's perfectly fine to just go with Simple Past all the way.
In fact, in your example sentence I'd strongly argue against Past Perfect, for two reasons:
- The order of actions in the sentence matches the order in which they happened. We use Past Perfect when we first establish a past point in time as our context, and then refer to actions which happened before it. In your sentence that doesn't happen - there's no previous context to relate our Past Perfect to.
- "When" as a conjunction doesn't really fit Past Perfect (unless both parts of the sentence are in Past Perfect), as it implies that the two actions happened simultaneously, or as close to it that it doesn't matter. But Past Perfect clearly puts one of the actions before the other and emphasizes it, making the resulting sentence a bit confusing.