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?