Skip to content

Instantly share code, notes, and snippets.

@megasmack
Last active May 7, 2026 12:44
Show Gist options
  • Select an option

  • Save megasmack/29b5cf5540df2815d7e6d0823f1245ca to your computer and use it in GitHub Desktop.

Select an option

Save megasmack/29b5cf5540df2815d7e6d0823f1245ca to your computer and use it in GitHub Desktop.
LWC Commerce get API Methods Available.
import checkoutApi from "commerce/checkoutApi";
...
connectedCallback() {
console.log("cartApi:", cartApi);
console.log("cartApi keys:", Object.keys(cartApi));
// Optional: Log function names individually
Object.keys(cartApi).forEach((key) => {
console.log(`cartApi[${key}] =`, cartApi[key]);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment