Accessing cart attributes inside post purchase page additional scripts

Topic summary

A developer is trying to access cart attributes (specifically a ‘gift_wrap’ attribute) within Shopify’s post-purchase page additional scripts.

Current Issue:

  • Liquid code like {{ attributes.gift_wrap }} works on the order status page additional scripts
  • The same approach does not work on the post-purchase page additional scripts
  • Looking for an alternative method to retrieve cart attribute values in this context

Status:
The question remains unanswered. A second user has expressed interest in the same solution, indicating this is a shared need among developers working with Shopify’s post-purchase customization features.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Is it possible to access cart attributes inside the post purchase additional scripts? Similar to the example here https://shopify.dev/docs/api/ajax/reference/cart#update-cart-attributes let’s say I have the following cart attribute set

{
  attributes: {
    'gift_wrap': 'Yes'
  }
}

How can I access this value inside the post purchase page additional script? It seems liquid code does not work here but works correctly on order status page additional script using the following liquid code:

{{ attributes.gift_wrap }}

Thank you.

1 Like

Hey! is there any updates on that? Have you solved how to get attributes in post purchase?