-
Notifications
You must be signed in to change notification settings - Fork 2
docs(example): Next - WooCommerce basic example #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new WooCommerce integration example for Next.js, demonstrating headless WordPress setup with e-commerce functionality. The example includes template hierarchy implementation, authentication, cart management, and checkout functionality.
Key Changes:
- Added complete WooCommerce example with Next.js Pages Router integration
- Implemented WordPress template hierarchy system for dynamic routing
- Created authentication and cart management providers with session handling
Reviewed changes
Copilot reviewed 106 out of 119 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/nuxt/template-hierarchy-data-fetching/.wp-env.json | Updated development and test port numbers |
| examples/nuxt/template-hierarchy-data-fetching/example-app/nuxt.config.ts | Updated WordPress URL port to match new wp-env configuration |
| examples/next/woocommerce/package.json | Added package configuration with wp-env scripts and dependencies |
| examples/next/woocommerce/wp-env/setup/.htaccess | Added Apache configuration for CORS and WordPress permalinks |
| examples/next/woocommerce/wp-env/sample_products.csv | Added sample WooCommerce product data for development |
| examples/next/woocommerce/example-app/tsconfig.json | Added TypeScript configuration for the Next.js application |
| examples/next/woocommerce/example-app/src/wp-templates/* | Implemented WordPress template hierarchy templates |
| examples/next/woocommerce/example-app/src/lib/* | Added core utilities for GraphQL, authentication, and routing |
| examples/next/woocommerce/example-app/src/components/* | Created UI components for products, cart, checkout, and layout |
| examples/next/woocommerce/example-app/src/interfaces/* | Defined TypeScript interfaces for type safety |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/next/woocommerce/example-app/src/components/OrderReceived/OrderReceived.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/ui/Field.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Products/Price.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Checkout/CheckoutFields.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Products/SingleProduct.tsx
Outdated
Show resolved
Hide resolved
|
Thanks @alexwpengine, thats an impressively comprehensive example. I've tested locally and everything seems to work nicely, except the suggestions I've placed above. |
…ived/OrderReceived.tsx Co-authored-by: Copilot <[email protected]>
…SingleProduct.tsx Co-authored-by: Huseyn Aghayev <[email protected]>
Ready. All points are resolved. Did also some improvements. Removed the screenshots, not sure if its needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 107 out of 119 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/next/woocommerce/example-app/src/lib/templates/templates.js
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Account/Tabs/Orders.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Cart/MiniCart.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/wp-templates/page-order-received.js
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Products/Grouped.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 107 out of 119 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
examples/next/woocommerce/example-app/src/components/Products/Variations.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Products/Variations.tsx
Outdated
Show resolved
Hide resolved
examples/next/woocommerce/example-app/src/components/Checkout/CheckoutFields.tsx
Show resolved
Hide resolved
…Variations.tsx Co-authored-by: Copilot <[email protected]>




Description
WooCommerce basic example - add/remove/update item in cart, checkout, my account, coupons, basic validations.
Plugins Required
Pages
Core functionality
Related Issue
Dependant PRs
Type of Change
How Has This Been Tested?
Screenshots
Checklist