For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Here is the export statement:
export default extension(
"purchase.checkout.shipping-option-list.render-after",
(root, {lines, applyCartLinesChange, query, i18n},api}) => {
but api is always null.
I can do (root,api) and it works fine but then I lose all my other options -- lines, query, etc.
Solved! Go to the solution
This is an accepted solution.
I figured it out. You don't need to export all the Checkout components separately - you can just do this:
export default extension('purchase.checkout.contact.render-after', (root, api ) => {
and then you can access the components via the api object like so:
let bI = api.buyerIdentity;
let loc = api.localization;
let sA = api.shippingAddress;
// and so on
I have the same issue
This is an accepted solution.
I figured it out. You don't need to export all the Checkout components separately - you can just do this:
export default extension('purchase.checkout.contact.render-after', (root, api ) => {
and then you can access the components via the api object like so:
let bI = api.buyerIdentity;
let loc = api.localization;
let sA = api.shippingAddress;
// and so on
Yup. Thank you.
"export default extensio"n takes two arguments, the second being the complete api or else an object of of api objects: {shop, metafields, shippingAddress}, for example.