Checkout Extension Metafield array is empty

Topic summary

Checkout JavaScript extension at target purchase.checkout.shipping-option-list.render-after cannot access metafields; metafields.current logs as an empty array. Subscribing to metafields also yields blank arrays.

Configuration details:

  • .toml declares two metafields under namespace “kickee”: keys “notforwholesale” and “nfs”.
  • Only one target is defined in the .toml.

Verification steps taken:

  • The product has both metafields set and metafield definitions exist (screenshots provided). Images are used to show product metafield definitions and values.

Open questions / status:

  • Why the metafields array is empty despite configuration and product metafields being present remains unresolved. No working workaround or fix was identified in the thread.
  • No decisions or action items were concluded; the author is requesting guidance on what is misconfigured or missing.
Summarized with AI on January 1. AI used: gpt-5.

This is a JavaScript (not React) extension:

export default extension(
	"purchase.checkout.shipping-option-list.render-after",
	async (root, {lines, applyCartLinesChange, query, i18n, shippingAddress, shop, buyerJourney, buyerIdentity, storage, settings, ui, metafields}) => {
    console.log(metafields.current); // the array is empty
.
.
.
});

my .toml file includes the following:

[[extensions.metafields]]
namespace = "kickee"
key = "notforwholesale"
[[extensions.metafields]]
namespace = "kickee"
key = "nfs"

I only have one target in my .toml so that’s not the issue.

I have a product with both those metafields and the metafields are defined:

What am I doing wrong?

thank you,

Chris

This also does not work:

metafields.subscribe((newMetafields) => {
  currentMetafields = newMetafields;
  console.log(`metafields: `, currentMetafields, newMetafields); // blank arrays
});