I have my checkout ui extension logic created and functional using Metafields, but I would like to copy the Order Metafield/Value to a checkout Attribute/Value for compatibility with a 3rd party custom app that looks for a couple specific checkout DOM Attributes.
It is possible to copy the Order Metafield/Value to a checkout Attribute/Value - you’d need to create a script in your app that listens for the creation of an order, then retrieve the metafield from the order, and then update the checkout attributes.
You can use Shopify’s Order API and Checkout API to accomplish this. Here’s a basic idea of how it could work:
Use the Order API’s orders/create webhook to listen for the creation of a new order.
When a new order is created, your app will receive a webhook containing the order details. Use the Order API to retrieve the metafield from the order.
Once you have the metafield, use the Checkout API to update the checkout attributes with the value from the order’s metafield.