I am looking to add a line of code in my order confirmation email (which is using the shopify admin template and we do not have any location apps running, just the standard shopify shipping and local pick up options) to display the chosen local pick up location selected by the customer at checkout. I would like that to be added when currently is states
Pickup Location {location_address}. Below is what my current email looks like from the customer side.
There’s a couple of ways you might be able to display the chosen location name, based on how you’ve set up locations. Unfortunately there isn’t a simple Liquid variable like {{ location_address }} that will simply output the name of the location, so you’ve have to try with accessing order properties.
Typically when a customer chooses local pick-up, the name of the pick-up location is set as the location of the shipping_address for the order. So, you might be able to add {{ shipping_address.name }} to return the location chosen.
If you add {{ shipping_address.name }} to the notification and then place a test order using local pick-up you can see if the order confirmation email displays the correct pick-up location.
Test this out and let us know if it’s displaying the location.