Preheat your oven to 350°F (175°C). Line a 12-cup muffin tin with cupcake liners.
In a medium bowl, whisk together the all-purpose flour, baking powder, baking soda, and salt. Set aside.
In a large bowl, beat the softened butter and granulated sugar with an electric mixer on medium speed until light and fluffy, about 3-4 minutes.
Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract until fully incorporated.
With the mixer on low, add the dry ingredients in three parts, alternating with the buttermilk (start and end with dry ingredients). Mix just until combined; do not overmix.
Using a spatula, gently fold in the peeled, cored, and diced apple pieces evenly into the batter.
Spoon the batter into the prepared cupcake liners, filling each about halfway.
Add about 1 teaspoon of caramel sauce in the center of each cupcake, then cover with a little more batter to encase the caramel.
Bake for 18-22 minutes, or until a toothpick inserted near the edge (not the caramel center) comes out clean. Cupcakes should be golden and springy to the touch.
Allow cupcakes to cool in the pan for 5 minutes, then transfer to a wire rack to cool completely before frosting.
Once cooled, pipe or spread buttercream frosting on top of each cupcake. Drizzle additional caramel sauce over the frosting and sprinkle with chopped nuts if desired.