woocommerce/plugins/woocommerce-admin
Ilyas Foo 3b7c05a845 WordPress 5.8 compatibility UI fixes (https://github.com/woocommerce/woocommerce-admin/pull/7255)
* Add appropriate text props to supplement variant revamp

* Add font styles to navigation title since its removed in wp.components

* Add more missing styles

* Accidental change

* Add changelog

* Fix lint

* Update jest snapshots
2021-06-28 09:14:59 +08:00
..
.github Attempt to remove fixed WP version in e2e. (https://github.com/woocommerce/woocommerce-admin/pull/7111) 2021-06-03 09:14:48 -03:00
bin Update the wordpress/babel-preset to avoid crashes in WP5.8 beta2 (https://github.com/woocommerce/woocommerce-admin/pull/7202) 2021-06-18 13:13:17 +08:00
client WordPress 5.8 compatibility UI fixes (https://github.com/woocommerce/woocommerce-admin/pull/7255) 2021-06-28 09:14:59 +08:00
config Prepare Remote Free Extensions for release (https://github.com/woocommerce/woocommerce-admin/pull/7144) 2021-06-09 22:43:09 +12:00
docker Update docker test suite readme (https://github.com/woocommerce/woocommerce-admin/pull/6783) 2021-04-12 17:04:06 -03:00
docs Add `slotFill` to Abbreviated Notification panel (https://github.com/woocommerce/woocommerce-admin/pull/7091) 2021-06-11 10:37:21 -03:00
images Adding WCPay payment configuration defaults (https://github.com/woocommerce/woocommerce-admin/pull/7097) 2021-06-03 09:19:50 -07:00
includes Fix use of feature checks and remove deprecated method calls (https://github.com/woocommerce/woocommerce-admin/pull/6687) 2021-03-26 13:00:05 -04:00
languages Master -> main. (https://github.com/woocommerce/woocommerce-admin/pull/4618) 2020-06-17 13:39:41 -04:00
packages WordPress 5.8 compatibility UI fixes (https://github.com/woocommerce/woocommerce-admin/pull/7255) 2021-06-28 09:14:59 +08:00
src Fixing invalid key props, changing to id (https://github.com/woocommerce/woocommerce-admin/pull/7229) 2021-06-25 18:58:55 -04:00
storybook Publish storybook docs, remove react docgen based docs (https://github.com/woocommerce/woocommerce-admin/pull/7055) 2021-06-02 15:54:00 +12:00
tests Add E2E tests for analytics overview screen section removal (https://github.com/woocommerce/woocommerce-admin/pull/7238) 2021-06-24 17:08:16 -03:00
typings Fix some minor inbox panel issues, left over from re-factor (https://github.com/woocommerce/woocommerce-admin/pull/7125) 2021-06-09 16:38:22 -03:00
.browserslistrc Add CSS autoprefixer (https://github.com/woocommerce/woocommerce-admin/pull/244) 2018-07-30 10:05:22 -04:00
.distignore Add Feature Flags (https://github.com/woocommerce/woocommerce-admin/pull/1500) 2019-02-12 15:02:02 -05:00
.editorconfig Remove Trailing Whitespace in `readme.txt` (https://github.com/woocommerce/woocommerce-admin/pull/6940) 2021-05-11 13:41:45 +08:00
.eslintignore Add initial end to end test suite (https://github.com/woocommerce/woocommerce-admin/pull/5028) 2020-09-04 14:31:09 +12:00
.eslintrc.js Typescript conversion of DynamicForm Component (https://github.com/woocommerce/woocommerce-admin/pull/6981) 2021-05-18 12:46:21 -07:00
.gitattributes Update Paths to Exclude from Composer (https://github.com/woocommerce/woocommerce-admin/pull/6642) 2021-04-09 07:50:59 +08:00
.gitignore When publishing the docs on gh workflow the WP css was not imported (https://github.com/woocommerce/woocommerce-admin/pull/7102) 2021-06-02 16:39:34 +12:00
.nvmrc Add nvmrc for newest lts release (https://github.com/woocommerce/woocommerce-admin/pull/1108) 2018-12-18 16:06:27 -06:00
.prettierrc.js Update @wordpress/eslint-plugin dependency to latest version. (https://github.com/woocommerce/woocommerce-admin/pull/5856) 2021-01-26 13:24:28 +13:00
.stylelintignore CSS Linting: Exclude Storybook CSS (https://github.com/woocommerce/woocommerce-admin/pull/6785) 2021-04-13 10:03:44 +12:00
.stylelintrc.json Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674) 2020-02-14 15:23:21 +13:00
.wp-env.json Add docker setup using WP-ENV (https://github.com/woocommerce/woocommerce-admin/pull/6448) 2021-03-02 13:13:21 -08:00
CONTRIBUTING.md Add some guidelines on changelog and testing instructions. (https://github.com/woocommerce/woocommerce-admin/pull/6653) 2021-03-25 11:28:13 +13:00
Gruntfile.js Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674) 2020-02-14 15:23:21 +13:00
LICENSE.md update to consistent license 2019-05-16 13:14:03 -03:00
README.md Publish storybook docs, remove react docgen based docs (https://github.com/woocommerce/woocommerce-admin/pull/7055) 2021-06-02 15:54:00 +12:00
SECURITY.md Add a security doc based on other woocommerce repos (https://github.com/woocommerce/woocommerce-admin/pull/6931) 2021-05-06 09:20:41 +12:00
TESTING-INSTRUCTIONS.md Add testing instructions for payment gateway suggestions (https://github.com/woocommerce/woocommerce-admin/pull/7205) 2021-06-24 10:59:31 -04:00
babel.config.js Add Typescript and page objects to E2E suite (https://github.com/woocommerce/woocommerce-admin/pull/6582) 2021-03-17 16:22:09 -03:00
chunk-src-version-param.js Remove dynamic content hash from chunk names. (https://github.com/woocommerce/woocommerce-admin/pull/5229) 2020-10-06 08:58:15 -04:00
composer.json Update version to 2.5.0-dev and sync changelog and testing instructions (https://github.com/woocommerce/woocommerce-admin/pull/7156) 2021-06-11 11:38:19 +08:00
composer.lock Update version to 2.4.0-dev and sync changelogs with release/2.3.0 branch (https://github.com/woocommerce/woocommerce-admin/pull/6991) 2021-05-14 14:50:15 -07:00
docker-compose.yaml Add initial end to end test suite (https://github.com/woocommerce/woocommerce-admin/pull/5028) 2020-09-04 14:31:09 +12:00
lerna.json Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674) 2020-02-14 15:23:21 +13:00
license.txt include license.txt and update component package.json files 2019-05-18 01:19:20 -03:00
lint-staged.config.js Improve the pre-commit hook setup for wc-admin (https://github.com/woocommerce/woocommerce-admin/pull/5233) 2020-10-02 17:38:13 +13:00
package-lock.json Update dependency locutus to v2.0.15 [SECURITY] (https://github.com/woocommerce/woocommerce-admin/pull/7162) 2021-06-28 10:34:10 +12:00
package.json Update the wordpress/babel-preset to avoid crashes in WP5.8 beta2 (https://github.com/woocommerce/woocommerce-admin/pull/7202) 2021-06-18 13:13:17 +08:00
phpcs.xml.dist Bump PHP test version to 7.0 in PHPCS config (https://github.com/woocommerce/woocommerce-admin/pull/6706) 2021-03-31 07:42:56 +08:00
phpunit.xml.dist Update PHPUnit to version 7 (https://github.com/woocommerce/woocommerce-admin/pull/3571) 2020-01-16 10:03:44 -04:00
readme.txt WordPress 5.8 compatibility UI fixes (https://github.com/woocommerce/woocommerce-admin/pull/7255) 2021-06-28 09:14:59 +08:00
renovate.json Adjust renovate to automerge devDependencies. (https://github.com/woocommerce/woocommerce-admin/pull/4979) 2020-08-14 13:11:09 +12:00
tsconfig.json Add typescript to Nav utils (https://github.com/woocommerce/woocommerce-admin/pull/6477) 2021-03-18 16:38:38 +13:00
uninstall.php Fix usage of "package" tag in file headers (https://github.com/woocommerce/woocommerce-admin/pull/4940) 2020-08-11 16:18:47 -03:00
unminify.js Use Route based code splitting to optimize bundle size (https://github.com/woocommerce/woocommerce-admin/pull/4094) 2020-04-29 12:01:27 -06:00
webpack.config.js Use sass-migrator to migrate division to math.div (https://github.com/woocommerce/woocommerce-admin/pull/7136) 2021-06-10 17:09:27 +08:00
woocommerce-admin.php Update version to 2.5.0-dev and sync changelog and testing instructions (https://github.com/woocommerce/woocommerce-admin/pull/7156) 2021-06-11 11:38:19 +08:00

README.md

WooCommerce Admin

This is a feature plugin for a modern, javascript-driven WooCommerce Admin experience.

Prerequisites

WordPress 5.4 or greater and WooCommerce 4.8.0 or greater should be installed prior to activating the WooCommerce Admin feature plugin.

For better debugging, it's also recommended you add define( 'SCRIPT_DEBUG', true ); to your wp-config. This will load the unminified version of all libraries, and specifically the development build of React.

Development

After cloning the repo, install dependencies:

  • npm install to install JavaScript dependencies.
  • composer install to gather PHP dependencies.

Now you can build the files using one of these commands:

  • npm run build : Build a production version
  • npm run dev : Build a development version
  • npm start : Build a development version, watch files for changes
  • npm run build:release : Build a WordPress plugin ZIP file (woocommerce-admin.zip will be created in the repository root)
  • DRY_RUN=1 npm run build:release : Builds a Wordpress plugin ZIP without pushing it to Github and creating a release.

For more helper scripts see here

For some debugging tools/help see here

For local development setup using Docker see here

Testing

End-to-end tests

Tests live in ./tests/e2e. An existing build is required prior running, please refer to the section above for steps. E2E tests use the @woocommerce/e2e-environment package which hosts a Docker container for testing, by default the container can be accessed at http://localhost:8084

All the commands from @woocommerce/e2e-environment can be run through npx.

# Set up the e2e environment
npm i
npx wc-e2e docker:up

Run tests using:

npx wc-e2e test:e2e-dev

or in headless mode:

npx wc-e2e test:e2e

Run a single test by adding the path to the file name:

npx wc-e2e test:e2e-dev tests/e2e/specs/activate-and-setup/complete-onboarding-wizard.test.ts

Documentation

There is documentation in 2 forms available in the repo. A static set of documentation supported by docsify and also a Storybook containing component documentation for @woocommerce/components.

To view the docsify docs locally you can do:

npm install
cd docs
npx docsify serve

When deployed the docsify docs also host an embedded version of the storybook docs. To generate that and test it locally in docsify you'll need to run:

npm install
npm run docs
cd docs
npx docsify serve

Then navigate to Components from the left hand menu in the docs.

If you would like to view the storybook docs hosted standalone, then you can run:

npm install
npm run storybook

Common Issues

If you're encountering any issue setting things up, chances are we have been there too. Please have a look at our wiki for a list of common problems.

Privacy

If you have enabled WooCommerce usage tracking ( option woocommerce_allow_tracking ) then, in addition to the tracking described in https://woocommerce.com/usage-tracking/, this plugin also sends information about the actions that site administrators perform to Automattic - see https://automattic.com/privacy/#information-we-collect-automatically for more information.

Contributing

There are many ways to contribute reporting bugs, adding translations, feature suggestions and fixing bugs. For full details, please see CONTRIBUTING.md