9c6c0d73d8
Product attributes are currently recorded as terms in wp_term_relationships (product attributes are actually taxonomies). In the case of variable products this is true for the main product, but not for the variations. The attributes used to define variations are stored as post meta, but nothing is recorded in the term relationships table. This is a problem when using the layered nav filtering plugin, since the attribute counters displayed are calculated based solely on the contents of the term relationships table. Adding meta queries would be really messy (especially when the widget is configured with AND operator) and would probably also hurt performance. This commit adds a change to store the attributes for variations as term relationships, additionally to storing them as post meta. Terms are stored on variation creation, and updated/deleted together with the variation as appropriate. "Any" variations (stored in meta as empty values) are not stored as terms. Additionally, a database upgrade is included in order to backfill terms for already existing products. |
||
---|---|---|
.github | ||
.wordpress-org | ||
assets | ||
bin | ||
i18n | ||
includes | ||
packages | ||
sample-data | ||
src | ||
templates | ||
tests | ||
.codeclimate.yml | ||
.codecov.yml | ||
.distignore | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.scrutinizer.yml | ||
.stylelintrc | ||
.travis.yml | ||
CHANGELOG.txt | ||
CODE_OF_CONDUCT.md | ||
Dockerfile | ||
Gruntfile.js | ||
README.md | ||
babel.config.js | ||
composer.json | ||
composer.lock | ||
docker-compose.yaml | ||
lerna.json | ||
license.txt | ||
package-lock.json | ||
package.json | ||
phpcs.xml | ||
phpunit.xml | ||
readme.txt | ||
renovate.json | ||
uninstall.php | ||
webpack.config.js | ||
woocommerce.php |
README.md
Welcome to the WooCommerce repository on GitHub. Here you can browse the source, look at open issues 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.
Documentation
- WooCommerce Documentation
- WooCommerce Developer Documentation
- WooCommerce Code Reference
- WooCommerce REST API Docs
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:
- If you have a problem, you may want to start with the self help guide.
- The WooCommerce.com premium support portal for customers who have purchased themes or extensions.
- Our community forum on wp.org which is available for all WooCommerce users.
- The WooCommerce Help and Share Facebook group.
- For customizations, you may want to check our list of WooExperts or Codeable.
Support requests in issues on this repository will be closed on sight.
Contributing to WooCommerce
If you have a patch or have stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our contributor guidelines for more information how you can do this.