Skip to content

Latest commit

 

History

History
 
 

woocommerce

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WooCommerce

License WordPress.org downloads WordPress.org rating Build Status codecov

This is the WooCommerce Core plugin. Here you can browse the source and keep track of development. We recommend all developers to follow the WooCommerce development blog to stay up to date about everything happening in the project. You can also follow @DevelopWC on Twitter for the latest development updates.

If you are not a developer, please use the WooCommerce plugin page on WordPress.org.

Getting Started

Quick start

Ensure your system meets the requirements (TLDR: NVM, PNPM 9.1.3, PHP 7.4+, Composer are required for development).

Depending on the preferred environment for running the development instance of WooCommerce, you might need Docker as well. You can learn more about supported environments here.

Once you have verified the prerequisites, you can start the development environment:

## Watch for changes in WooCommerce and all of its dependencies.
pnpm --filter='@woocommerce/plugin-woocommerce' watch:build

# Start a wp-env based development environment, which will be accessible via http://localhost:8888/.
# This step is optional and you can skip it if you are running WooCommerce on a custom setup.
pnpm --filter='@woocommerce/plugin-woocommerce' env:dev

If desired, you can also run commands without --filter='@woocommerce/plugin-woocommerce' by running pnpm <command> from within the plugins/woocommerce directory.

Building Components

There are three major client-side components included in WooCommerce Core that can be built, linted, and tested independently. We've organized these components in this way to take advantage of caching to prevent unnecessarily performing expensive rebuilds when only working in one of them.

plugins/woocommerce/client/legacy

This directory contains the Classic CSS and jQuery code for WooCommerce.

# Build the assets.
pnpm --filter='@woocommerce/plugin-woocommerce' build:classic-assets
# Lint the assets.
pnpm --filter='@woocommerce/classic-assets' lint

plugins/woocommerce/client/admin

This directory contains the React-based admin interface.

# Build the React-based admin client.
pnpm --filter='@woocommerce/plugin-woocommerce' build:admin
# Lint the React-based admin client.
pnpm --filter='@woocommerce/admin-library' lint
# Test the React-based admin client.
pnpm --filter='@woocommerce/admin-library' test
# Watch the tests of the React-based admin client.
pnpm --filter='@woocommerce/admin-library' test:watch
# Run a type check over the React-based admin client's TypeScript files.
pnpm --filter='@woocommerce/admin-library' ts:check

plugins/woocommerce-blocks

This directory contains the client for WooCommerce + Gutenberg.

# Build the Blocks client.
pnpm --filter='@woocommerce/plugin-woocommerce' build:blocks
# Lint the Blocks client.
pnpm run --filter='@woocommerce/block-library' lint
# Test the Blocks client.
pnpm run --filter='@woocommerce/block-library' test

Documentation

Reporting Security Issues

To disclose a security issue to our team, please submit a report via HackerOne here.