1687d462fb
* Move `check_should_use_blockified_product_grid_templates` to `wc-template-functions.php` * add changelog entry * alias Blocks/Options as BlocksOptions * Init `BlockTemplatesController` for block themes only * Remove the `wc_current_theme_is_fse_theme()` check from BTC * Streamline the option update logic a tad * Revert "Streamline the option update logic a tad" This reverts commit 54a965d9784df253f82533991e03c1112fd386ef. * init BTC for themes that support block template parts Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * init BTC for themes that support block template parts, p.2 Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * move the check to a new OptionsManager class * make types consistent * add classic theme with block template parts support * tmp: add logs for debugging * Initialize BlockTemplatesController on init * Remove debugging code * Prevent duplicate template parts appearing in the Site Editor in classic themes that support template parts * Update e2e tests for classic themes that support template parts * Fix Checkout header not being rendered * Fix PHP tests * Simplify WC_BLOCK_USE_BLOCKIFIED_PRODUCT_GRID_BLOCK_AS_TEMPLATE logic * Rename OptionsManager class to TemplateOptions * Change format of inline comment * Use wc()->is_store_api_request() * Update plugins/woocommerce/src/Blocks/TemplateOptions.php Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com> * Update testing theme slugs * Add strict_types to TemplateOptions file * Refactor check_should_use_blockified_product_grid_templates() * Don't update 'wc_blocks_use_blockified_product_grid_block_as_template' when switching between block themes * Add extra unit test to make sure the option is not updated when switching between block themes * Update strict_types format * Remove unnecessary theme switch after tests finish running * Replace .toHaveCount( 0 ) with .toBeHidden() in several tests * Create a TestUtils to abstract logic to open Mini-Cart block * Remove unnecessary import * Replace .toHaveCount( 0 ) with .toBeHidden() in several tests (II) --------- Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com> Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com> |
||
---|---|---|
.. | ||
.github | ||
.sources | ||
.vscode | ||
.wordpress-org | ||
assets | ||
bin | ||
changelog | ||
docs | ||
packages | ||
patches | ||
storybook | ||
tests | ||
.distignore | ||
.editorconfig | ||
.env | ||
.eslintignore | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.markdownlint.json | ||
.markdownlintignore | ||
.prettierignore | ||
.prettierrc.js | ||
.stylelintrc.json | ||
.wp-env.json | ||
LICENSE | ||
README.md | ||
babel.config.js | ||
composer.json | ||
composer.lock | ||
docker-compose.yml | ||
global.d.ts | ||
package.json | ||
phpcs.xml | ||
phpunit.xml.dist | ||
postcss.config.js | ||
readme.txt | ||
tsconfig.base.json | ||
tsconfig.json | ||
webpack.config.js | ||
wp-cli.yml |
README.md
WooCommerce Blocks
This is the client for WooCommerce + Gutenberg. This package serves as a space to iterate and explore new Blocks and updates to existing blocks for WooCommerce, and how WooCommerce might work with the Block Editor.
Table of Contents
Documentation
To find out more about the blocks and how to use them, check out the documentation on WooCommerce.com.
If you want to see what we're working on for future versions, or want to help out, read on.
Code Documentation
- Blocks - Documentation for specific Blocks.
- Editor Components - Shared components used in WooCommerce blocks for the editor (Gutenberg) UI.
- WooCommerce Blocks Handbook - Documentation for designers and developers on how to extend or contribute to blocks, and how internal developers should handle new releases.
- WooCommerce Blocks Storybook - Contains a list and demo of components used in the plugin.
Getting started with block development
Run through the "Writing Your First Block Type" tutorial for a quick course in block-building.
For deeper dive, try looking at the core blocks code, or see what components are available.
Other useful docs to explore:
Long-term vision
WooCommerce Blocks are the easiest, most flexible way to build your store's user interface and showcase your products.