50e8f27bc7
The layered nav filtering doesn't work well with variable products when some variations have stock and other don't. When a term is selected in the widget, a variable product having no stock for the variation corresponding to that term but having stock for other variations will be displayed, but it shouldn't. This commit fixes that by introducing two changes: - A new override of "is_visible" for WC_Product_Variable that looks at the supplied filters, compares them against the corresponding available variations and calculates the visibility based on the query type (OR or AND). - A hook on the "found_posts" filter in WC_Query, that adjusts the posts count based on the found products visibility when there are filters available; this is needed to sync the "displaying X posts" messages and the paging when variable products are hidden due to stock status. Additionally, the visibility calculated in "found_posts" is cached as loop variables so that it isn't calculated again when actually displaying the 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.