A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Go to file
Jason Kytros ea6e7295ec
Merge WooCommerce Brands into core (#50165)
* Move WooCommerce Brands into core

* Fix linting errors in brand-thumbnails.php

* More lint fixes for brand-thumbnails.php

* Fix lint issues in brand-description.php

* Fix lint errors for brand-thumbnails-description

* Lint errors: Fix taxonomy-product_brand

* Lint errors: fix taxonomy-product_brand

* Linting: Try adding a space between ignore command and docblock

* Another try to remove the lowercase file name error

* Another try removing lint error for lowercase files

* Lint errors: Fix brands-a-z.php

* More lint fixes for brands-a-z.php

* More lint fixes for brands-a-z.php

* Lint fixes: brand-description.php

* Another try fixing lint errors for brand-description.php

* Another try fixing lint errors for brand-description.php

* More fixes for brand-description.php

* Fix lint errors for Packages.php

* More fixes for Packages.php

* Linting fixes for Brands.php

* Added docblocks for WC_Widget_Brand_Thumbnails variables

* Add script to fix coding standards for files changed in branch

* Run autofix script for linting

* Lint fixes for class-wc-widget-brand-thumbnails.php

* More lint fixes for: class-wc-widget-brand-thumbnails.php

* More lint fixes for class-wc-widget-brand-thumbnails.php

* Lint fixes for class-wc-widget-brand-nav.php

* lint fixes: ignore docblocks

* Another try to fix missing docblocks

* Another try to fix missing docblocks

* Another try fixing missing docblocks

* Better messages for fix-branch.sh

* Fix lint errors in class-wc-widget-brand-description.php

* Fix linting errors in REST API and functions classes

* Fix linting issues in class-wc-brands.php

* More lint fixes for wc-brands.php

* More lint fixes for wc-brands.php

* Fix lint errors for wc-brands-coupons.php

* Fix lint errors for class-wc-brands-block-templates.php

* Fix linting errors for class-wc-brands-block-template-utils-duplicated.php

* Fix lint errors in class-wc-admin-brands.php

* More fixes in class-wc-admin-brands.php

* More class-wc-admin-brands.php

* More lint fixes for: class-wc-admin-brands.php

* More lint fixes for class-wc-admin-brands.php

* Transfer unit test

* Transfer e2e test

* Added specific versions to templates

* Added changelog

* Another try for HTML templates version

* Fix lint errors in test files

* More lint fixes

* Fix lint warnings

* Added brands to list of expected REST API fields

* More lint warning fixes

* More lint warning fixes

* Updated unit tests to include brands

* Remove whitespace

* Added declare( strict_types = 1); to all PHP files

* Added declare( strict_types = 1) to test file as well

* Fix: There must be exactly one blank line after the file comment

* Temporarily remove Brands e2e tests

* Move Brands blockified templates

* Remove script to fix lint errors in current branch

* Try removing pull-package-deps

* Bring back deps

* Commit pnpm-lock.yaml

* Add debug statements

* More debug statements

* Make regular expression more specific

* Make matches more specific

* Search only for PHP templates

* Bring back whitespace

* Remove unnecessary change

* Update pnpm-lock.yaml

* Change the way Brands files are included

* Include all files

* Prevent Brands assets from being double-enqueued

* Move Brands scripts handling into core

* Revert changes in the template-changes.ts script

* Use strict in_array

* Add scaffolding for Brands test

* Add more scaffolding for Brands tests

* Enhance e2e test by adding steps for creating a Brand

* Move Brands test to Playwright folder

* Added manifest

* Fix lint errors in tests

* Move Brands coupons test into core's coupons tests

* Fix linting error in tests

* Move all Brands initialization within the /Internal/Brands class

* Rename `$merged_packages` to `$merged_plugins`

* Add force disable method back

* Move Brands logic outside core files

* Rename admin styles

* Remove brands logic from core's admin class

* Roll back all changes in admin assets class

* Fix linting errors

* Move REST API logic to Brands main class

* Introduce an option to control whether the Brands package is enabled.
Prevent autoloader from loading classes already loaded by individual Packages.
Fix an issue with Brands admin styles.

* Bring back pnpm-lock

* Add comment

* Split long line into two

* Review default values for remote variant assignment

* Rename global functions and add polyfills for deprecated functions

* Bump versions

* Fix some lint errors

* More lint fixes

* Set woocommerce_remote_variant_assignment for Brands to be enabled for unit tests

* Replace reserved word class with class_name

* Another try to include Brands files in tests

* Remove Brands from REST API tests

* Skip Brands tests while Brands is behind a feature flag

* Lint fixes

* Remove empty line

* Added feature flag.

* Fix widgets form

* Fix lint errors for brand description widget

* Fix lint errors for brand description widget

* Fix lint errors

* Bump version

* Updated tooltips for Brands coupon restrictions to match core's

* Fix lint errors

* More lint fixes

* Add REST API v3 for Brands

---------

Co-authored-by: Walther Lalk <83255+dakota@users.noreply.github.com>
2024-09-17 18:13:46 +03:00
.github Update upload- and download-artifact versions in workflows (#51073) 2024-09-17 09:16:29 -05:00
.husky Monorepo: git post-checkout hook to verify pnpm version and update dependecies. (#51382) 2024-09-17 12:34:40 +02:00
bin Monorepo: rework deps patching in favour of built-in pnpm functionality (#49892) 2024-07-24 08:38:32 -07:00
changelog Docs: migrate Template structure & Overriding templates via a theme (#43571) 2024-03-20 14:49:20 +00:00
docs Merge WooCommerce Brands into core (#50165) 2024-09-17 18:13:46 +03:00
packages Use page query param consistently as string for ReportsTable (#51396) 2024-09-16 15:57:58 +02:00
plugins Merge WooCommerce Brands into core (#50165) 2024-09-17 18:13:46 +03:00
tools [dev] Monorepo: introduce reporting mode for perf utility. (#51366) 2024-09-13 08:58:44 +02:00
.codecov.yml Turn on code-cov for PR checking of unit test coverage (#36548) 2023-02-09 22:08:36 +13:00
.editorconfig JS formatting files 2021-10-19 10:35:46 +13:00
.eslintignore [testing workflows] Add optional jobs in CI workflow (#47414) 2024-05-16 13:31:17 -07:00
.eslintrc.js Designate root level eslint config 2021-12-13 08:13:40 -08:00
.gitattributes Use `ci-jobs` Utility For `ci.yml` Matrix (#43532) 2024-01-12 20:32:14 -08:00
.gitignore Allow usage of block notice templates when using classic themes (#45164) 2024-03-14 19:33:33 +07:00
.markdownlint.json Update Markdown lint allowing the same headings if they're not siblings (#51438) 2024-09-17 12:44:15 +02:00
.markdownlintignore undo changes to test fixtures 2023-11-10 15:49:08 +01:00
.npmrc Monorepo: git post-checkout hook to verify pnpm version and update dependecies. (#51382) 2024-09-17 12:34:40 +02:00
.nvmrc Update the monorepo to node v20 (#45148) 2024-04-12 13:49:55 -03:00
.pnpmfile.cjs Optimized `wireit` Fingerprinting File Inputs (#42684) 2023-12-11 16:21:35 -08:00
.prettierrc.js JS formatting files 2021-10-19 10:35:46 +13:00
.stylelintrc Deprecate stylelint-config-wordpress with current package 2021-12-14 09:14:54 -08:00
.syncpackrc Add product data views list to experimental product data views page (#51008) 2024-08-30 13:27:10 -03:00
CODEOWNERS [dev] Update code owners files: initial ownership for Flux team (#51260) 2024-09-16 09:05:29 +02:00
CODE_OF_CONDUCT.md Update @woo.com email addresses to @woocommerce.com (#46387) 2024-04-19 21:11:01 +00:00
DEVELOPMENT.md Fix markdown typos. (#50282) 2024-08-19 14:59:10 -03:00
README.md Update nvm instructions in README.md (#51240) 2024-09-13 14:20:19 -05:00
SECURITY.md Update Woo.com references to WooCommerce.com (#46259) 2024-04-09 09:50:15 +01:00
changelog.txt Produce CSV Import enhancements (cherry-pick PR#51344) (#51348) 2024-09-13 11:39:37 -07:00
package.json Use syncpack to lock pnpm version till we can fix issues (#50828) 2024-08-22 12:34:42 +12:00
phpcs.xml add exclusion for short array syntax 2023-12-14 10:07:41 -04:00
pnpm-lock.yaml Hadren styles for interactive elements in Checkout block (#51375) 2024-09-16 13:03:20 +00:00
pnpm-workspace.yaml Update the monorepo to node v20 (#45148) 2024-04-12 13:49:55 -03:00
renovate.json Converted Spaces To Tabs In JSON 2022-05-10 13:31:01 -07:00
tsconfig.base.json Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00

README.md

WooCommerce Monorepo

WooCommerce

Welcome to the WooCommerce Monorepo on GitHub. Here you can find all of the plugins, packages, and tools used in the development of the core WooCommerce plugin as well as WooCommerce extensions. You can browse the source, look at open issues, contribute code, and keep tracking of ongoing 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.

Getting Started

To get up and running within the WooCommerce Monorepo, you will need to make sure that you have installed all of the prerequisites.

Prerequisites

  • NVM: While you can always install Node through other means, we recommend using NVM to ensure you're aligned with the version used by our development teams. Our repository contains an .nvmrc file which helps ensure you are using the correct version of Node.
  • PNPM: Our repository utilizes PNPM to manage project dependencies and run various scripts involved in building and testing projects.
  • PHP 7.4+: WooCommerce Core currently features a minimum PHP version of 7.4. It is also needed to run Composer and various project build scripts. See troubleshooting for troubleshooting problems installing PHP.
  • Composer: We use Composer to manage all of the dependencies for PHP packages and plugins.

Once you've installed all of the prerequisites, you can run the following commands to get everything working.

# Ensure that correct version of Node is installed and being used
nvm install
# Install the PHP and Composer dependencies for all of the plugins, packages, and tools
pnpm install
# Build all of the plugins, packages, and tools in the monorepo
pnpm build

At this point you are now ready to begin developing and testing. All of the build outputs are cached running pnpm build again will only build the plugins, packages, and tools that have changed since the last time you ran the command.

Check out our development guide if you would like a more comprehensive look at working in our repository.

Repository Structure

  • Plugins: Our repository contains plugins that relate to or otherwise aid in the development of WooCommerce.
    • WooCommerce Core: The core WooCommerce plugin is available in the plugins directory.
  • Packages: Contained within the packages directory are all of the PHP and JavaScript provided for the community. Some of these are internal dependencies and are marked with an internal- prefix.
  • Tools: We also have a growing number of tools within our repository. Many of these are intended to be utilities and scripts for use in the monorepo, but, this directory may also contain external tools.

Reporting Security Issues

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

Support

This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core WooCommerce issues only. Support can take place through the appropriate channels:

NOTE: Unfortunately, we are unable to honor support requests in issues on this repository; as a result, any requests submitted in this manner will be closed.

Community

For peer to peer support, real-time announcements, and office hours, please join our slack community!

Contributing to WooCommerce

As an open source project, we rely on community contributions to continue to improve WooCommerce. To contribute, please follow the pre-requisites above and visit our Contributing to Woo doc for more links and contribution guidelines.