* Move redirect logic to its own callback
* Update comment for updateAttributeFilter
* Remove condition for updating state for active filters only when filter button is not available
* Replace onSubmit with updateAttributeFilter
* Update logic lost in merge
* Replace checked stateful data with activeFilters data from URL
* Remove catalog_visibility from filteredCounts useCollectionData query for PHP templates
* Set the min and max price from the URL to make the active filters work with PHP templates
* Extract price formatting into a separate function
* Rename the `hasSetPriceDefault` variable and improve comments
Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
* Enable Attribute Filter block to work with the PHP rendered Classic Template block
* Check for presence of option before rendering it
* improve filter product by attribute
* fix pagination problem
* fix check when two filter block with same attribute are used
* fix filter by stock for PHP templates
* fix naming and comment
* Update filter key in ClassicTemplate
* Update stock filter block for PHP templates when the filter button is enabled
* Remove unused useEffect and fix ESLint error
* Set active stock filter and track using local state
* ESLint fix
* Remove unncessary dependencies from useEffect
Co-authored-by: tjcafferkey <tjcafferkey@gmail.com>
* Enable more options for the Featured Category block
* Fix the focal point picker
* Fix the resizeable handle
* Fix the overlay and move to own section
* Enable gradient and duotone
* Add padding and fix min height
* Export ConstrainedResizeable from Featured Product
* Wrap duotone in feature plugin flag
* Add support for `border-radius`
* Change prop order
* Add SSR for new options on Featured Category block
* Optional chaining on border radius
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
* Add default to overlay and height
* Optional chaining on border radius for Featured Product block
* Fix gradient persistence and default overlay discrepacies
* Explicitly add box-sizing to the featured-product/category wrapper
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
If the Featured Product block was added but not modified at all,
the block would not match the editor on the front end.
This was due to the fact that, on the frontend, the
block is SSR and was missing some defaults which
were present in JS.
* Cart & Checkout translations test use the already installed language nl_NL
* Extra timeout when checking for shipping and billing addresses
* wait for selector instead of increase timeout
* Change waitForSelector selector:
* Clean up
* Increase idleTime for waitForNetworkRequest
* Fix random timeouts and increase timeout of verifying shipping option
* feedack
* Add has_filterable_products data to the AllProducts block to be used by product filter blocks
* Add has_filterable_products data to the ClassicTemplate block to be used by product filter blocks
* Add ClassicTemplatesCompatibility class which will add necessary data to the front-end of core PHP templates of Classic Themes for filter blocks being used as widgets.
* Update comment of set_php_template_data method on ClassicTemplatesCompatibility class
* Move conditional checking if the current theme is a block theme in ClassicTemplatesCompatibility class
* Add correct context to checkout and cart errors from API
* Correct typo in add-to-cart context
* Add correct context in add to cart form
* Add correct context in add to cart form
* Add correct context in Checkout State
* Enable Attribute Filter block to work with the PHP rendered Classic Template block
* Check for presence of option before rendering it
* improve filter product by attribute
* fix pagination problem
* fix check when two filter block with same attribute are used
Co-authored-by: Luigi <gigitux@gmail.com>
* Empty commit for release pull request
* Add Changelog to readme.txt
* Update WC tested and required versions
* Add testing notes
* Register missing C&C inner blocks and update fallback template for older C& C versions (https://github.com/woocommerce/woocommerce-blocks/pull/6195)
* Register missing C & C inner blocks and update fallback template for older C & C versions
This will fix the issues with missing order summary inner blocks: Coupons (both in C & C blocks) and the Cart header. The issue was happening because, for example, for Cart the coupons were registred on the on frontend, but it just wasn't forced in the attributes. Because it also wasn't added to the PHP fallback layout, the render function didn't include it. For the Checkout block the coupons inner block wasn't registered at all.
* Revert changes to Checkout.php, we don't need to test for inner blocks
* Revert "Revert changes to Checkout.php, we don't need to test for inner blocks"
This reverts commit fc39535f8476d02e35353374d9434a8723458cfa.
* Fix the returned template for older Checkout block iterations
* Fix Cart and Checkout templates to accommodate the Summary order inner blocks
* Hide coupon form div from inner blocks if coubons are not enabled
* Fix checkout coupon tests in checkout
They have been written for logged in user
* Fix Order Summary Heading inner block's default text
* Update comments with better wording
* Revert "Hide coupon form div from inner blocks if coubons are not enabled"
This reverts commit ab09021b923fad4218b3016e47760ad07f6bc960.
(cherry picked from commit 0b18ff59bd)
* Update the zip file link
* Update testing instructions
* Remove experimental build related PR from testing notes
* Fix/order summary sidebar css (https://github.com/woocommerce/woocommerce-blocks/pull/6231)
* Add box sizing to Totals item
* Add some unit tests for Order summary blocks
* Fix Proceed to checkout button size
(cherry picked from commit d22ce7cd0b)
* Update the WC required/tested versions
* Mini Cart Contents: Use block pattern to make the empty cart message translatable (https://github.com/woocommerce/woocommerce-blocks/pull/6248)
* try: use block pattern to make empty cart message translatable
* Update src/BlockTypes/MiniCart.php
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* rename function
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
(cherry picked from commit 93ad72f6ff)
* Update the release's ZIP file
* Update testing notes
In woocommerce/woocommerce-blocks#6065, for Cart only Order Summary Heading & Coupon form can
be removed, and for Checkout only the Coupon form.
* Update the testing notes
Remove woocommerce/woocommerce-blocks#5870 testing notes because they can't be tested as a user
* Update Testing notes
Add screenshots to the woocommerce/woocommerce-blocks#5967 testing notes
* Remove woocommerce/woocommerce-blocks#6166 testing instructions
We reverted this PR
* Revert (https://github.com/woocommerce/woocommerce-blocks/pull/6166) (https://github.com/woocommerce/woocommerce-blocks/pull/6253)
Revert "Prevent Featured Product block from breaking when product is out of stock + hidden
from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6166)"
This reverts commit 92387e2
(cherry picked from commit c586b1a5f3)
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Raluca Stan <ralucastn@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* try: use block pattern to make empty cart message translatable
* Update src/BlockTypes/MiniCart.php
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* rename function
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
* Add support for overlay color and duotone
* Add support for custom inner padding
* Wrap all block experimental features in `isFeaturePluginBuild`
* Fix resizable container min height
The container now resizes if, e.g., padding is increased, and can't be resized down
with the handle to a height lower than it's minimum size determined by content and
padding box.
* Fix resizable handle not being fully visible
Previously, `overflow: hidden` was needed because the height constraint and
padding could push the content out of the container. Now this should not be
possible.
* Add an option to the block to decide how is the image fitted to the container
* Register missing C & C inner blocks and update fallback template for older C & C versions
This will fix the issues with missing order summary inner blocks: Coupons (both in C & C blocks) and the Cart header. The issue was happening because, for example, for Cart the coupons were registred on the on frontend, but it just wasn't forced in the attributes. Because it also wasn't added to the PHP fallback layout, the render function didn't include it. For the Checkout block the coupons inner block wasn't registered at all.
* Revert changes to Checkout.php, we don't need to test for inner blocks
* Revert "Revert changes to Checkout.php, we don't need to test for inner blocks"
This reverts commit fc39535f8476d02e35353374d9434a8723458cfa.
* Fix the returned template for older Checkout block iterations
* Fix Cart and Checkout templates to accommodate the Summary order inner blocks
* Hide coupon form div from inner blocks if coubons are not enabled
* Fix checkout coupon tests in checkout
They have been written for logged in user
* Fix Order Summary Heading inner block's default text
* Update comments with better wording
* Revert "Hide coupon form div from inner blocks if coubons are not enabled"
This reverts commit ab09021b923fad4218b3016e47760ad07f6bc960.
* Remove the ToggleButtonControl in favor of ToggleGroupControl
* Remove ESLint errors. Use experimental feature as this is low risk
* Fix the 'Expected preceding comment block' ESLint error
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
* rename some things
* Refactor e2e tests
* remove only from checkout test
* Typo in test
* Add --testPathIgnorePatterns performance back into package.json
* Niels feedback and fix a test
* Update import from utils
* Increase timeout of translations test to 30000
* Wait for network idle in goToCart and goToCheckout
* Increase timeout to 30000
* fix E2E tests
* try fix
* test
* test
* test
* another test
* fix test
* 60s timeout
* test
* Update product constants
* Simplify orderSummary check
* Go back to page.$
Co-authored-by: Luigi <gigitux@gmail.com>
* Make useStoreNotices interact directly with the store
* Get/set error notices directly in store in paymentMethodDataContext
* Add hasNoticesOfType util
* Remove useStoreNotices and interact directly with data store
* Create/remove notices directly in store
* Remove tests for useStoreNotices
* Add tests for notices util
* Use setIsSuppressed from useStoreNoticesContext
* remove useStoreNotices hook
* Update context typedef to define only isSuppressed and setIsSuppressed
* Remove all values from StoreNoticesContext besides setIsSuppressed
* Wrap Cart and Checkout blocks in StoreNoticesProvider (for isSuppressed)
* Make StoreNoticesContainer a named export
This is required so we can import it from @wooommerce/base-context
* Change addErrorNotice to createErrorNotice to match store action
* Remove unnecessary StoreNoticeProviders and pass only context to container
* Accept a context in StoreNoticesContainer
* Pass relevant context to StoreNoticesContainer
* Add function to remove notices by status
* Prevent checkout from breaking when removing notices during processing
* Prevent TS error about not included path
* Add StoreNoticesContainer to single product block
* Add StoreNoticesContainer to All Products Block
* Ensure errors are shown when using All Products & Single Product Blocks
* Add a context arg to removeNoticesByStatus
* Use correct contexts for all products and single product block
* Update tests to reflect new context argument
* Re-add missing block file for order-summary
* Remove block file for order-summary
* Send context to useStoreCartCoupons to show errors correctly