* add align wide and full support for legacy template block
* fix PHP warning
* add a comment on get_markup_with_classes_by_attributes
* rename function
* add align wide and full support for legacy template block
* fix PHP warning
* add a comment on get_markup_with_classes_by_attributes
* rename function
* fix regex
* update regex
* update regex
* fix code styling
* Don't allow to insert negative values on input for Filter Products By Price block woocommerce/woocommerce-blocks#2695
Don't allow to insert negative values on input for Filter Products By Price block
* renaming util functions and add comments
* Align Woo Block template locations with the newest convention
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.
See: woocommerce/woocommerce-blocks#5455Fixes: woocommerce/woocommerce-blocks#5343
* Simplify `generate_template_slug_from_path` function
* Change `BlockTemplatesController` constructor to get correct dir names
* Update Mini Cart template path
Legacy blocks were previous locked for removal to avoid unintended
consequences. However, this would lock the ability to move the block within
other e.g. layout blocks and unnecessarily limit merchant customization ability.
Now that we have reverted this decision, merchants could delete this block,
which is likely **not** what they want to do. While we investigate other, more
long-term, solutions, we are adding a warning notice.
Refs woocommerce/woocommerce-blocks#5180. Fixeswoocommerce/woocommerce-blocks#5207.
* Rename legacy blocks to avoid confusion with the term “Template”
* Fix duplicated error notices
StoreNoticeProvider is already being used within Block component. This
removal prevents duplicated error notices within the Payment Options
section
* Move StoreNoticeProvider from payment block
Remove StoreNoticeProvider from payment block and move it to the parent
frontend block to avoid unnecessarily loading the notice provider
* Update wp-hooks-generator
* Update inline hook documentation into consistent format
1. Hook docs for the same hook should be identical
2. Prefix with `Hook: ` so the case of the hook is not changed.
3. Use `@see` instead of `@hooked`. Hooked is not a standard PHP Doc tag.
cc @Aljullu
* Update hook doc script to support duplicate hooks across files
* Remove unused variables in function
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Empty commit for release pull request
* Update readme.txt with 6.7.0 changelog
* Add testing notes for the 6.7.0 release
* Fix typo in testing notes
* Update Testing Notes
* Remove item from testing notes for 6.7.0
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* Account for products without variations in the prime_product_variations function
* Update src/BlockTypes/AbstractProductGrid.php
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Fix whitespace
* Remove unnecessary variable declaration
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Gutenberg 12.1.0 has changed the convention for the directory paths from
`block-templates` and `block-template-parts` to `templates` and `parts` respectively.
Allow compatibility with themes which follow both conventions and also make sure that
we remain backwards-compatible.
Fixeswoocommerce/woocommerce-blocks#5450
Some of this fix has a dependency on WooCore
See: WooCommerce/woocommercewoocommerce/woocommerce-blocks#31522
* Fix custom templates with fallback being incorrectly attributed
Category and tags templates can fallback to the generic archive if, e.g., the theme
provides one for the latter but not for the former. However, since Gutenberg is not
aware of this fallback mechanism, it would incorrectly attribute the custom template
to the user instead of the theme.
Here we are explicitly setting the `has_theme_file` to make sure Gutenberg knows
we do, in fact, have a theme fail (if not what it expects).
Also skip the loop if template is duplicate but has no fallback
Fixeswoocommerce/woocommerce-blocks#5441
* Add clear and fill input test util
* Add tests for Filter Products by Price
* Add class name to filter products by price block in editor
* Update wp-env
* Fix formatting
* Update lock
* Revert "Update lock"
This reverts commit f4e809e000430eea3972c94fd2aea0a19ba6961b.
* Create product attributes during setup
* Remove product attributes during teardown
* Add attributes in fixture-data
* Add two new products, for attribute testing
* Load attributes into store and apply them to products
* Add class to Filter by Attribute when editing
This is so it can be targeted in E2E tests more easily.
* Add tests for Filter Product by Attribute
* Fix formatting in attribute-filter.test.js
* Add tests for active filters block
* Add doc block for ensuteCleanAttributes
* Update wording of title test in all filter block E2E
* Update test wording to read better
* Update snapshots
* Use pptr-testing-library selectors to click elements
This makes the tests easier to reason with, and lets us take a step back from the implementation details (classnames etc.)
* Add saveOrPublish test util
* Use pptr-testing-library selectors to click elements in attribute filter
* Use pptr-testing-library selectors to click elements in price filter
* Add `puppeteer-testing-library`
* Use puppeteer-testing-library API to look for H6 button
* Use correct argument in jest-puppeteer.dev.config
* Update package.json & package-lock.json
* remove tests for 5.3
* remove snapshots
* Remove ensureCleanAttributes
* Remove puppeteer-testing-library, install missing expect-puppeteer package and update tests
The puppeteer-testing-library, although added by gutenberg is not actively used.
I have removed it and realised that the added functionality can be easily replaced by expect-puppeteer.
This is a package that we specify in the jest configuration but it was not part of our package.json.
The selectors from puppeteer-testing-library have been replaced with .toClick and the utility clearAndFillInput with .toFill
The Filter by Attribute block has been skiped until tests are fixed.
* Add back setupPageSettings to jest setup
* Fix filter by attribute block test
* Fix linting error
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
* Add isCheckout prop to NoShippingPlaceholder and TotalsShipping
* Pass isCheckout to TotalsShipping in Checkout sidebar
* Show the NoShippingPlaceholder if no rates are found
* Show better error message when no shipping is available in checkout
* Remove Storybook knobs
They are now fully replaced by controls
* Update Storybook to 6.4.9
* Add Storybook documentation and VSCode snippets
* Add VSCode snippets
* Convert stories from checkout packages and include them in Storybook
* Empty commit for release pull request
* Add changelog and version info
* 6.6.0 testing notes
* Remove mini cart from testing instructions
* Clarify testing instructions
* Remove experimental feature from changelog
* fix not found template for the template editor
* update zip
* Remove test instructions for icon
* Testing steps for 5425
* Link order controller to cart routes
* Remove order controller from checkout route
* Fix PHP warnings in abstract schema
* Fix PHP warnings in abstract route
* Update shipping phone handling
* Includes are handled in core now
* Remove maybe_update_order_from_customer
* Add cart_updated routine to all cart routes
* Remove abstract method
* Remove test for woocommerce_blocks_cart_update_order_from_customer_request
* Remove do_order_callback
* Update readme
* Update tests
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Link order controller to cart routes
* Remove order controller from checkout route
* Fix PHP warnings in abstract schema
* Fix PHP warnings in abstract route
* Update shipping phone handling
* Includes are handled in core now
* Remove maybe_update_order_from_customer
* Add cart_updated routine to all cart routes
* Remove abstract method
* Remove test for woocommerce_blocks_cart_update_order_from_customer_request
* Remove do_order_callback
* Add archive-product template into block template hieachy
* Add archive-product condition to product tag block template render method
* Move taxonomy hierarchy filter to WC core
* Undo template amends
* Duplicate the themes archive-product template if it has one for taxonomy block templates
* Review feedback
* Use TextDomain instead of Name
* use correct if/else syntax
* Remove unncessary boolean syntax