Developer tools
This guide provides an overview of essential tools and libraries for WooCommerce development. It's intended for developers looking to enhance their WooCommerce projects efficiently.
Productivity Tools
Use these resources to power up your WooCommerce development workflows.
Development
wp-cli
This is the command-line interface for WordPress. You can update plugins, configure multisite installations and much more, without using a web browser.
wc-cli
When WooCommerce is running on a WordPress installation, the WP-CLI is extended with additional functionality for managing your store data.
wp-env
This command-line tool lets you easily set up a local WordPress Docker environment for building and testing plugins and themes. It's simple to install and requires no configuration.
woocommerce/eslint-plugin
This is an ESLint plugin including configurations and custom rules for WooCommerce development.
WordPress Scripts
The @wordpress/scripts package is a set of tools and scripts designed to streamline the development process of WordPress projects, particularly for block development and custom Gutenberg integrations. It includes a Webpack build process along, with configuration for tasks like linting, styling, and testing.
It also includes the Dependency Extraction Webpack Plugin, which allows JavaScript bundles produced by webpack to leverage WordPress style dependency sharing without an error-prone process of manually maintaining a dependency list.
Testing
Smooth Generator
A plugin to help you generate WooCommerce-related data for testing. Use the WP Admin interface for basic operations, or the CLI tool for more advanced features. Download and install the latest version from the Releases page and review the documentation on Github.
QIT
QIT is a testing platform for WooCommerce plugins and themes with managed tests, E2E tests, and disposable local local testing environments.
Libraries
Use these resources to help take some of the heavy lifting off of fetching and transforming data -- as well as creating UI elements.
API Clients
WooCommerce REST API - JavaScript
The official JavaScript library for working with the WooCommerce REST API.
WooCommerce Store API
The Store API provides public Rest API endpoints for the development of customer-facing cart, checkout, and product functionality. It follows many of the patterns used in the WordPress REST API.
In contrast to the WooCommerce REST API, the Store API is unauthenticated and does not provide access to sensitive store data or other customer information.
wordpress/api-fetch
The @wordpress/api-fetch package is a utility for making AJAX requests to the WordPress REST API, designed to simplify the process of fetching and sending data. It's a wrapper around window.fetch
that provides a consistent interface for handling authentication, settings, and errors, allowing developers to easily interact with WordPress backend services.
Components
WooCommerce Components
This package includes a library of React components that can be used to create pages in the WooCommerce admin area. To preview these components, review the Woo Storybook.
WordPress Components
This package includes a library of generic WordPress components that can be used for creating common UI elements shared between screens and features of the WordPress dashboard. To preview these components, review the Gutenberg Storybook.
JavaScript Utility Packages
CSV Export
A set of functions to convert data into CSV values, and enable a browser download of the CSV data.
Currency
A collection of utilities to display and work with currency values.
Data
Utilities for managing the WooCommerce Admin data store.
Date
A collection of utilities to display and work with date values.
Navigation
A collection of navigation-related functions for handling query parameter objects, serializing query parameters, updating query parameters, and triggering path changes.
Number
A collection of utilities to properly localize numerical values in WooCommerce.