01 - Preheat oven to 350°F. Line a 12-cup muffin tin with cupcake liners.
02 - In a bowl, whisk together flour, baking powder, and salt. Set aside.
03 - In a large bowl, cream butter and sugar until light and fluffy. Add eggs one at a time, beating well after each addition, then mix in vanilla.
04 - Add flour mixture in three additions, alternating with milk, beginning and ending with flour. Mix until just combined.
05 - Divide batter evenly among cupcake liners. Bake 18 to 20 minutes, or until a toothpick inserted in the center comes out clean. Let cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
06 - Heat milk in a saucepan over medium heat until just simmering. Meanwhile, whisk egg yolks, sugar, cornstarch, and salt in a bowl until pale and smooth.
07 - Gradually whisk hot milk into yolk mixture. Return to saucepan and cook over medium heat, whisking constantly, until thick and bubbling, about 2 to 3 minutes. Remove from heat and stir in vanilla and butter until smooth. Press plastic wrap directly onto surface and chill until cold.
08 - Heat cream in a small saucepan until just simmering. Pour over chocolate in a heatproof bowl. Let sit 2 minutes, then stir until smooth. Allow to cool until slightly thickened but still pourable.
09 - Using a small knife or cupcake corer, cut a small hole in the center of each cupcake about 1 inch deep. Fill each with chilled pastry cream, about 1 to 2 teaspoons per cupcake. Replace the cut-out piece of cake on top.
10 - Spoon or dip the tops of the cupcakes in chocolate ganache. Let set before serving.