Loading…
Loading…
Install and configure @woographql/next to generate your headless WooCommerce storefront
This guide walks you through installing @woographql/next and generating your WooCommerce storefront components.
Your WordPress site must have the following plugins installed and activated:
npm install @woographql/next @woographql/react-hooks @woographql/session-utils @woographql/codegen
npx woonext install
The install command will:
The install command prompts for configuration options:
| Prompt | Description | Example |
|---|---|---|
| Backend domain | Your WordPress site domain | mysite.com or localhost:8080 |
| Protocol | HTTP or HTTPS | https |
| GraphQL endpoint | WPGraphQL endpoint path | graphql |
| Site name | Your store name | My Store |
| Site description | Store tagline | The best products online |
| Prompt | Description |
|---|---|
| Product types | Select additional types: grouped, external, subscription, bundle, composite |
| Authentication | withAuth (guests + registered users) or withoutAuth (guests only) |
| JWT plugin | Which JWT plugin you're using on WordPress |
| Credential storage | cookies (recommended) or browser storage |
| Include cart | Generate cart page and components |
| Include checkout | Generate checkout flow (requires cart) |
| Include account pages | Generate user account dashboard |
| Internationalization | Add next-intl with locale-prefixed routing and a translatable string catalog (default: off) |
Your answers are saved to woonext.json in the project root. This file is used when running woonext reinstall to remember your configuration.