woocommerce/plugins/woocommerce
Karol Manijak dace7ba296
Product Collection: add control to toggle whether block is filterable in non archive context (#49627)
* Add syncWithFilters attribute to Product Collection

* Add SycnWithFilters Inspector Control to PC

* Minor import adjustments

* Move the controls to Inherit as they share the same labels

* Rename the attirbute to filterable

* Hide control for collections

* Consume the filterable

* Consume filterable attribute so it enables the filtering

* Bring back file format

* Bring back filterable

* Move filterable from attribute to query

* Improve checks

* Fix incorrent function name

* Add changelog

* Set the default filterable value on insert

* Update test selector

* Add E2E tests to #49627 (#49715)

* Remove unnecessary call to create new post

* Fix "Use page context" control tests

* Fix post ↔ template collection sync test

* Fix non-thenable linter errors

* Extend the "Use page context" default setting test

* Add test for filtering in non-archive context

* Add test for combining editor and front-end filters

* Fix lint

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/edit/inspector-controls/inherit-query-control.tsx

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Improve query properties access

* Rename inherit-query-control to use-page-context-control to better depict its purpose

* Lint fix

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-07-24 11:51:53 +02:00
..
.wordpress-org
assets Update APMs BNPL suggestions when WooPayments can handle them (#49234) 2024-07-12 12:40:24 +03:00
bin Monorepo: zips build script update (frozen lock files) (#49640) 2024-07-19 13:07:48 +02:00
changelog Product Collection: add control to toggle whether block is filterable in non archive context (#49627) 2024-07-24 11:51:53 +02:00
client Update the footer section in "Add products" task (#49782) 2024-07-23 21:31:46 +08:00
i18n Update symbol and formatting of the XPF currency (#46960) 2024-05-15 04:50:55 +07:00
includes Fix warning: Attempt to read property "order_awaiting_payment" on null (#45821) 2024-07-24 03:09:44 +02:00
lib Re-add "mobiledetect/mobiledetectlib" library 2023-11-27 18:59:10 +01:00
packages Update Woo.com references to WooCommerce.com (#46259) 2024-04-09 09:50:15 +01:00
patterns Deprecate and create new coming soon block version (#49786) 2024-07-24 15:12:38 +08:00
sample-data Update @woo.com email addresses to @woocommerce.com (#46387) 2024-04-19 21:11:01 +00:00
src Product Collection: add control to toggle whether block is filterable in non archive context (#49627) 2024-07-24 11:51:53 +02:00
templates [Accessibility] Add scope attributes to the order table on My Account (#49201) 2024-07-15 14:38:39 +01:00
tests Fix the undefined array key "name" warning in ComingSoonRequestHandler.php when the font name is not set (#49795) 2024-07-24 09:55:19 +08:00
.distignore Try reducing blocks build size (#43344) 2024-01-08 11:33:49 -06:00
.eslintignore Add JS lint scripts for woocommerce plugin (#46214) 2024-04-12 07:30:17 +03:00
.eslintrc.js Add JS lint scripts for woocommerce plugin (#46214) 2024-04-12 07:30:17 +03:00
.gitattributes
.gitignore Fixed Blocks INI File Path 2023-12-09 21:33:34 -08:00
.phpunit-watcher.yml Add php unit watcher and update unit test docs (#44681) 2024-02-19 16:40:29 +08:00
.wp-env.json [e2e tests] Fix tests for WP 6.6 (#49634) 2024-07-19 08:12:02 +00:00
NEXT_CHANGELOG.md
README.md Update Woo.com references to WooCommerce.com (#46259) 2024-04-09 09:50:15 +01:00
composer.json Update Action Scheduler to 3.8.1 (#49483) 2024-07-12 08:44:00 -07:00
composer.lock Update Action Scheduler to 3.8.1 (#49483) 2024-07-12 08:44:00 -07:00
license.txt
package.json [testing workflows] Add new workflow to trigger any jobs in ci.yml on demand (#49674) 2024-07-19 10:14:12 +02:00
phpcs.xml Monorepo: tweak CodeSniffer rules conflicting with strict types declaration requirements (#49183) 2024-07-05 11:46:30 +02:00
phpunit.xml
readme.txt Prepare for WP 6.6 by updated tested / required versions. (#49619) 2024-07-17 11:46:20 +08:00
tsconfig.json
uninstall.php
woocommerce.php Prepare for WP 6.6 by updated tested / required versions. (#49619) 2024-07-17 11:46:20 +08:00

README.md

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

Please make sure you follow the repository's getting started guide first!

# Make sure that WooCommerce Core and all of its dependencies are built
pnpm --filter=@woocommerce/plugin-woocommerce build 
# Make sure you're in the WooCommerce Core directory
cd plugins/woocommerce
# Start the development environment
pnpm -- wp-env start

You should now be able to visit http://localhost:8888/ and access WooCommerce environment.

Building Components

There are two 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/classic-assets build 
# Lint the assets.
pnpm --filter=@woocommerce/classic-assets lint 

plugins/woocommerce-admin

This directory contains the React-based admin interface.

# Build the React-based admin client.
pnpm --filter=@woocommerce/admin-library build 
# Lint the React-based admin client.
pnpm --filter=@woocommerce/admin-library lint 
# Test the React-based admin client.
pnpm --filter=@woocommerce/admin-library test 

plugins/woocommerce-blocks

This directory contains the client for WooCommerce + Gutenberg.

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

Helper Scripts

Here is a collection of scripts that can help when developing the React-based admin interface.

# Create a develoment build of the React-based admin client.
pnpm --filter=@woocommerce/admin-library dev 
# Create and watch a development build of the React-based admin client.
pnpm --filter=@woocommerce/admin-library start 
# 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 

Documentation

Reporting Security Issues

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