In Shopify extension customer-information.render-after target useAttributeValues all value undefine

Topic summary

A developer is experiencing issues with the useAttributeValues hook in a Shopify checkout extension, specifically when targeting purchase.thank-you.customer-information.render-after.

Core Problem:

  • All values returned by useAttributeValues are undefined
  • The issue occurs when using Shopify’s payment method
  • When testing outside of Shopify’s payment method, the hook works correctly

Technical Context:

  • The extension uses @shopify/ui-extensions-react/checkout
  • Developer is attempting to retrieve custom attributes (labeled ‘attribute1’ and ‘attribute2’)
  • Code includes console logging to debug the undefined values

Current Status:
The developer is seeking guidance on how to fix this behavior and make useAttributeValues work properly within the Shopify payment flow. No solutions or responses have been provided yet.

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

import {
BlockLayout,
reactExtension,
Text,
Heading,
useAttributeValues,
useOrder,
} from ‘@shopify/ui-extensions-react/checkout’;

// 1. Choose an extension target
export default reactExtension(
‘purchase.thank-you.customer-information.render-after’,
() => ,
);

import {
BlockLayout,
reactExtension,
Text,
Heading,
useAttributeValues,
useApi,
} from ‘@shopify/ui-extensions-react/checkout’;

// 1. Choose an extension target
export default reactExtension(
‘purchase.thank-you.customer-information.render-after’,
() => ,
);

function Extension() {
const [attribute1, attribute2]
= useAttributeValues([
‘attribute1’,
‘attribute2’,
]);

const [attribute1, attribute2]
= useAttributeValues([
‘attribute1’,
‘attribute2’,
]);
console.log(attribute1);
console.log(attribute2);

}

When i use outside payment method useAttributeValues all value is undefined.
its is working find when i use Shopify payment method.
How can i fixed?