Commit Graph

4396 Commits

Author SHA1 Message Date
dependabot[bot] d63c9ff429 Bump simple-git from 3.7.1 to 3.15.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7877)
Bumps [simple-git](https://github.com/steveukx/git-js/tree/HEAD/simple-git) from 3.7.1 to 3.15.1.
- [Release notes](https://github.com/steveukx/git-js/releases)
- [Changelog](https://github.com/steveukx/git-js/blob/main/simple-git/CHANGELOG.md)
- [Commits](https://github.com/steveukx/git-js/commits/simple-git@3.15.1/simple-git)

---
updated-dependencies:
- dependency-name: simple-git
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-12-12 15:18:26 +00:00
Luigi Teschio 306ce007d0 Product Query - Enable "Inherit Query from template" option (https://github.com/woocommerce/woocommerce-blocks/pull/7641)
* Add Inherit Query from template option

* Update label
2022-12-12 16:06:25 +01:00
Daniel Dudzic 0249011551 Product Elements: Fix block settings (https://github.com/woocommerce/woocommerce-blocks/pull/7914)
* Product Elements: Fix block settings

* Rating: Fix inactive star color

* Product Rating: Fix color inheritance
2022-12-12 15:53:42 +01:00
Tarun Vijwani c3ed875906 Document the selectors for the wc/store/cart data store (https://github.com/woocommerce/woocommerce-blocks/pull/7708)
* Add selectors doc for Cart store

* update readme file to include cart and payment documentation

* Add more description to the objects.
2022-12-12 17:07:55 +04:00
Daniel Dudzic bdbee5cbf8 StyleAttributesUtils: Fix PHP notices and invalid CSS output (https://github.com/woocommerce/woocommerce-blocks/pull/7909)
* StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closes woocommerce/woocommerce-blocks#7899.

* StyleAttributesUtils: Fix border radius and width support

* StyleAttributesUtils: Fix border radius and border color support

* StyleAttributesUtils: Include additional checks to deal with PHP warnings

* StyleAttributesUtils: Improve the custom border array check
2022-12-12 12:43:41 +01:00
Alex Florisca 62bda845d9 Update GH token to fine grained token (https://github.com/woocommerce/woocommerce-blocks/pull/7887) 2022-12-12 11:06:31 +00:00
Tung Du e306334911 Fix: encode and decode term slug to support non-ASCII terms (https://github.com/woocommerce/woocommerce-blocks/pull/7906) 2022-12-12 17:46:20 +07:00
Luigi Teschio 8bbb14f23b Add more clarity about the responsibility of reviewing/merging the PR on WC Core during the release process (https://github.com/woocommerce/woocommerce-blocks/pull/7913)
* add more clarity about the responsibility of reviewing/merging the PR on WC Core during the release process

* Update .github/release-initial-checklist.md

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-12-12 10:37:05 +01:00
Luigi Teschio 1f96800326 Fix Markdown lint errors (https://github.com/woocommerce/woocommerce-blocks/pull/7912) 2022-12-12 10:20:47 +01:00
Luke O'Regan cd82fa28a5 Update MiniCart.php to fix price total amount on page load prices are including tax (https://github.com/woocommerce/woocommerce-blocks/pull/7832)
* Update MiniCart.php

Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket.

* Update MiniCart.php

Removed white spaces?

* Update MiniCart.php

Fixed IF statement

* Remove whitespace at end of line

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-12-09 17:36:28 +01:00
Mike Jolley 4616d4e1d9 Clarify that the extend class in Store API is for schema (https://github.com/woocommerce/woocommerce-blocks/pull/7858) 2022-12-09 13:32:12 +00:00
Daniel W. Robert 83ff85e008 Fix Global Styles Block Icon Color for Mini Cart (https://github.com/woocommerce/woocommerce-blocks/pull/7762)
* Update hex color val to currentColor.

* Remove fill attributes on SVG

Having the fill attributes explicitly defined on the SVG was setting the
icon to purple in unexpected cases.

This also reverts the quick attempt to adjust CSS selector for a fix, as
it was the incorrect approach.
2022-12-08 09:55:25 -05:00
Mike Jolley bc17c19262 ValidatedTextInput fields should validate on mount (https://github.com/woocommerce/woocommerce-blocks/pull/7888)
* Validate on mount

* Update e2e text for email validation check

* Markdown linting
2022-12-08 12:14:14 +00:00
Raluca Stan bd7cd91061 Update payment-method-integration.md 2022-12-08 10:40:38 +00:00
Tung Du e878431068 Product Query unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/7747) 2022-12-08 08:48:42 +07:00
Raluca Stan c2f640352f Update payment-method-integration.md 2022-12-07 18:48:08 +00:00
github-actions[bot] dbde4876fc Release: 9.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7854)
* Empty commit for release pull request

* add changelog

* add testing notes

* rename stuff

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2022-12-07 14:06:20 +01:00
Luigi Teschio 9436488da4 Product Query: implement compatibility with Filter by Rating block (https://github.com/woocommerce/woocommerce-blocks/pull/7792)
* Product Query: implement compatibility with Filter by Rating block woocommerce/woocommerce-blocks#7631

Product Query: implement compatibility with Filter by Rating block

* address feedback

* address feedback

* add comment
2022-12-07 12:32:31 +01:00
Tarun Vijwani 47aa2ae27b Fix payment store performance by getting a focused selector (https://github.com/woocommerce/woocommerce-blocks/pull/7811)
* Fix payment store performance by getting a focused selector

* Replace getState selector with focused selectors in saved payment methods options
2022-12-07 13:12:55 +04:00
Tarun Vijwani a7f3e22453 Convert radio-control-accordion component to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/7849) 2022-12-06 21:23:46 +04:00
Mike Jolley 6c438acb5c Fixes validated text input tests (https://github.com/woocommerce/woocommerce-blocks/pull/7859) 2022-12-06 16:22:34 +00:00
Nadir Seghir 79a3d397c2 Bumping version strings to new version. 2022-12-06 15:41:29 +01:00
Luigi Teschio 58f3217690 Remove workarounds for site-editing-templates tests woocommerce/woocommerce-blocks#7151 (https://github.com/woocommerce/woocommerce-blocks/pull/7568)
* Remove workaround for site-editing-templates tests woocommerce/woocommerce-blocks#7151

remove workaround for site-editing-templates tests

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-06 15:40:05 +01:00
Nadir Seghir 1ad5418cfe rename stuff 2022-12-06 15:30:26 +01:00
Mike Jolley 7758ee05fe Improve inline validation to avoid invalid server pushes (https://github.com/woocommerce/woocommerce-blocks/pull/7755)
* Allows custom validation rules to be applied to fields - in this case, email address

* Add local state to only push valid changes

* Do not need required

* unused isString

* Move to push level

* Update packages/checkout/components/text-input/validated-text-input.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update packages/checkout/components/text-input/validated-text-input.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update packages/checkout/components/text-input/validated-text-input.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update packages/checkout/components/text-input/validated-text-input.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Validate when the data store changes

Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-12-06 13:13:21 +00:00
Nadir Seghir ec9196d0cb add testing notes 2022-12-06 13:38:47 +01:00
Nadir Seghir 8e73d879d9 add changelog 2022-12-06 12:55:20 +01:00
Luigi Teschio e58e468685 Fix Query Loop crash when an icon of a variation is registered with src attribute (https://github.com/woocommerce/woocommerce-blocks/pull/7852)
* Fix Query Loop crash when an icon of a variation is registered with src attribute

* change scope variation
2022-12-06 12:13:04 +01:00
dependabot[bot] 8de944dee7 Bump decode-uri-component from 0.2.0 to 0.2.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7821)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 14:07:22 +07:00
Lucio Giannotta dc63c2dc46 Product Query: create variation of `core/post-excerpt` as a Product Query inner block (https://github.com/woocommerce/woocommerce-blocks/pull/7837)
* Creates a new block variation based on the core “Post Excerpt” called “Product Summary”.
* Brands it as our old “Product Summary” atomic element.
* Creates a utility function to allow easy creation of such variations.
2022-12-05 17:25:13 +01:00
Lucio Giannotta 7dc5643dff Product Query: create variation of `core/post-title` as a Product Query inner block (https://github.com/woocommerce/woocommerce-blocks/pull/7836)
As much as we can, we should use core blocks when the functionality is mostly overlapping. In the case of the Post Title block, we don't need to add and maintain our own block most likely, so we should just brand the Post Title block instead.

This PR does the following:

* Creates a new block variation based on the core “Post Title” called “Product Title”.
* Brands it as our old “Product Title” atomic element.
* Use this variation as the default within the Product Query template.
* Also removes some old code used for variations before the namespace attribute was available on the core Query Loop and repurposes it to create this variation.
2022-12-05 16:56:53 +01:00
Darren Ethier c6c6122dd7 Add "Just Arrived Full Hero" commerce adjacent pattern (https://github.com/woocommerce/woocommerce-blocks/pull/7812)
* Add just arrived full hero commerce adjacent pattern.

* Remove group block as wrapper.

* use more responsive font-size and add i18n
2022-12-05 08:24:58 -05:00
Darren Ethier 9f495fb937 add i18n to pattern strings (https://github.com/woocommerce/woocommerce-blocks/pull/7841) 2022-12-05 08:24:13 -05:00
Darren Ethier e70cb68480 Add "Product Hero 2 Column 2 Row" commerce adjacent pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/7814)
* Add commerce adjacent block pattern

Product Hero 2 Column 2 Row.

* Wrap strings in i18n
2022-12-05 08:23:57 -05:00
Lucio Giannotta 99ba060720 Product Query: Polishing touches for the feature plugin debut (https://github.com/woocommerce/woocommerce-blocks/pull/7815)
* Product Query: add Feedback Prompt in inspector

The prompt doesn't appear at the very bottom as there isn't
currently any straightforward way to do this in the block variation.

More investigation is required.

* Product Query: Change icon, description and name

* Product Query: switch to Feature plugin flag

* Add all currently available atomic blocks to the default Product Query template

* Update feature flags doc

* Change SKU and Stock Indicator feature flags

* Change feature flags docs

* Add title prop to the `FeedbackPrompt` and add a title to the Product Query one

* Hacky solution to display the feedback block at the bottom

The order of the inspector controls is set in Gutenberg.
We can hack our way down by hooking to the “color” group and
display our feedback there.

Other panels would be displayed below that if added, such as borders
and margin.

* Reduce Product Query default template

* Fix e2e tests after Product Query block name change (https://github.com/woocommerce/woocommerce-blocks/pull/7840)

* Product Query: Add a better default pattern (https://github.com/woocommerce/woocommerce-blocks/pull/7833)

* Product Query: Add a better default pattern

* Product Price: Add bottom margin

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
2022-12-05 13:46:50 +01:00
Darren Ethier 6ed137e1e8 Add "Store Info Alternating Image and Text" commerce adjacent pattern (https://github.com/woocommerce/woocommerce-blocks/pull/7827)
* Add new commerce-adjacent pattern

This pattern is an alternating image and text layout that provides store info for the shopper.

* fix pattern title
2022-12-05 06:57:51 -05:00
Tung Du f35bbd7b0e Fix: Product Query editor preview with Stock Status setting (https://github.com/woocommerce/woocommerce-blocks/pull/7682)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-05 09:14:17 +07:00
Daniel Dudzic e1a0866e4a Product Price: Hide alignment setting for the All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7825) 2022-12-02 18:05:53 +01:00
Daniel Dudzic 3d64bfe69c Rating: Add support for alignment setting (https://github.com/woocommerce/woocommerce-blocks/pull/7790)
* Rating: Add support for alignment setting

* Rating: Fix PHP warning

* Rating: Fix linting error

* Rating: Update StyleAtributesUtils.php

* Product Rating: Escape alignment class

* Product Rating: Hide alignment setting for the All Products block
2022-12-02 17:11:26 +01:00
Daniel Dudzic b6303c8493 Add to Cart: Add support for the alignment setting (https://github.com/woocommerce/woocommerce-blocks/pull/7816)
* Add to Cart: Add support for the alignment setting

* Add to Cart button: Hide alignment setting for the All Products block
2022-12-02 15:17:22 +01:00
Manish Menaria dd40d2bfce Revert "Add product query support for Product Summary block (https://github.com/woocommerce/woocommerce-blocks/pull/7774)" (https://github.com/woocommerce/woocommerce-blocks/pull/7818)
This reverts commit 3b131f6d35.
2022-12-02 17:11:57 +05:30
Manish Menaria 830ea38a82 Revert "Adds product query support for Category list block (https://github.com/woocommerce/woocommerce-blocks/pull/7675)" (https://github.com/woocommerce/woocommerce-blocks/pull/7819)
This reverts commit c263ba83d4.
2022-12-02 17:11:44 +05:30
Niels Lange 86e381b7fd Respect tax label in cart and checkout (https://github.com/woocommerce/woocommerce-blocks/pull/7785)
* Respect Settings Tax Name in Cart & Checkout

* Update storybook

* Fix TS error

* Fix TS errors
2022-12-02 18:40:56 +07:00
Tarun Vijwani 24468ba212 Hide the shipping address form from Checkout Block in Editor and rename the Billing Address label when "Force shipping to the customer billing address" is enabled. (https://github.com/woocommerce/woocommerce-blocks/pull/7800)
* Rename billing address labels and hide shipping address from the editor when Force shipping to the customer billing address is enabled
2022-12-02 15:34:27 +04:00
Luigi e7d097be71 Merge branch 'release/8.7.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-12-01 19:13:29 +01:00
github-actions[bot] f06c43ab4c Release: 8.7.6 (https://github.com/woocommerce/woocommerce-blocks/pull/7804)
* Empty commit for release pull request

* Added readme.txt changelog entry

* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)

* 8.7.2 Testing notes

* Update testing notes

* Update testing notes

* Bumped version

* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)

Co-authored-by: Niels Lange <info@nielslange.de>

* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393

* Updated testing zip

* Bumping version strings to new version.

* Empty commit for release pull request

* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)

* Construct args for canMakePayment with correct keys

* When the CheckoutEventsContext mounts, initialize payment store

* Destructure useSelect correctly

* Dispatch __internalInitializePaymentStore in selector tests

* Update selector name to __internalUpdateAvailablePaymentMethods

* Remove check for editor when registering checkout store

* Add check for when express payment methods have updated too

* Ensure billingAddress key exists in canMakePayment arg

* Use editor context to know if we're in editor

* Updated readme.txt

* Reverted stable tag change on readme.txt

* Testing instructions

* Cleaned out testing instructions

* Bumping version strings to new version.

* Empty commit for release pull request

* Testing instructions

* package-lock.json version bump

* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)

This reverts commit 25e24708b5.

* Testing zip

* Bumping version strings to new version.

* add testing instructions

* upload a new zip file

* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)

* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)

* Fixed Price Slider Issue

Located where the price slider was hard coded and replaced it.

* fix CSS lint

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130

use currentColor instead of hard-coded color for the slider of the Filte By Price block

* remove background-color

Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>

* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)

* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)

* fix inconsistent button styling with TT3

* use wc_wp_theme_get_element_class_name

* add check to be sure that wc_wp_theme_get_element_class_name function exists

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)

* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379

Fix Mini Cart Block global styles

* add font_size

* upload a new build

* Bumping version strings to new version.

* update changelog

* Empty commit for release pull request

* add testing instructions

* update zip file link

* Prevent Mini Cart loading the same script twice (https://github.com/woocommerce/woocommerce-blocks/pull/7794)

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
2022-12-01 19:10:33 +01:00
Luigi a2b5ae09ac Merge branch 'release/8.9.0' of https://github.com/woocommerce/woocommerce-blocks into trunk 2022-12-01 19:04:28 +01:00
github-actions[bot] 7c5f4ca627 Release: 8.9.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7803)
* Empty commit for release pull request

* Display correct block template when filtering by attribute (https://github.com/woocommerce/woocommerce-blocks/pull/7640)

* Fix error when trying to access the queried object when it's null (https://github.com/woocommerce/woocommerce-blocks/pull/7664)

* Fix error when trying to access the queried object when it's null.

* Check if the `slug` exists

* Use the taxonomy name instead of the slug, otherwise it returns false

* Update readme changelog

* Add testing notes

* Improve testing notes format

* Bumping version strings to new version.

* Prevent Mini Cart loading the same script twice (https://github.com/woocommerce/woocommerce-blocks/pull/7794)

* Empty commit for release pull request

* update changelog

* add testing instructions

* update zip file link

* Mini Cart: load wc-blocks-registry package at the load of the page instead of lazy load it (https://github.com/woocommerce/woocommerce-blocks/pull/7813)

* update changelog

* update testing instructions

* update zip file link

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Luigi <gigitux@gmail.com>
2022-12-01 19:02:50 +01:00
Luigi Teschio 34140b197f Mini Cart: load wc-blocks-registry package at the load of the page instead of lazy load it (https://github.com/woocommerce/woocommerce-blocks/pull/7813) 2022-12-01 18:31:24 +01:00
Lucio Giannotta 4e340ee3ed Product Query: make sure request params are set when enhancing REST query (https://github.com/woocommerce/woocommerce-blocks/pull/7796)
This fixes a bug in which in certain cases Products wouldn't load in the editor because the Product Query
block was doing some REST API request with some invalid parameters.
2022-12-01 16:42:25 +01:00
Daniel Dudzic 936979dc33 Product Price: Fix alignment setting on the frontend (https://github.com/woocommerce/woocommerce-blocks/pull/7795)
* Product Price: Fix alignment setting on the frontend

* Product Price: Remove the Feature plugin flag from the alignment setting

* Product Price: Code clean-up

* Product Price: Fix PHP warning
2022-12-01 14:51:44 +01:00
Manish Menaria 70619b5cdb Escape values just before rendering (https://github.com/woocommerce/woocommerce-blocks/pull/7797)
* Escape all values in output of Product category list

* Escape all values in output of Product Sale Badge

* Escape values before rendering

Whenever you’re rendering data, make sure to properly escape it. Escaping output prevents XSS (Cross-site scripting) attacks.

* Remove unnecessary space

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-12-01 17:51:01 +05:30
Manish Menaria 3b131f6d35 Add product query support for Product Summary block (https://github.com/woocommerce/woocommerce-blocks/pull/7774)
* Add product query support for Product Summary block

On the client side, when the Product Summary block is used within the product query block, the markup will be rendered on the server side - No javascript related to Product Summary block will be rendered.

* Update variable names for clarity & readability

* Escape all values in output string

* Fix custom style not working

More info: https://github.com/woocommerce/woocommerce-blocks/pull/7774#discussion_r1035909243
2022-12-01 17:37:41 +05:30
Manish Menaria 0d851fdb29 Add product query support for Stock indicator block (https://github.com/woocommerce/woocommerce-blocks/pull/7734)
* Add product query support for Stock indicator block

On the client side, when the Stock indicator block is used within the product query block, the markup will be rendered on the server side - No javascript related to Stock indicator block will be rendered.

* Escape all values in output string

Whenever we are rendering data, we should escape it. Escaping output prevents XSS (Cross-site scripting) attacks.

* Change $is_on_backorder type & escape just before printing

For more info:
https://github.com/woocommerce/woocommerce-blocks/pull/7734#discussion_r1035971939
https://github.com/woocommerce/woocommerce-blocks/pull/7734#discussion_r1035975712
2022-12-01 17:14:05 +05:30
Albert Juhé Lluveras 9f3d61e1ea Prevent Mini Cart loading the same script twice (https://github.com/woocommerce/woocommerce-blocks/pull/7794) 2022-12-01 11:54:28 +01:00
kmanijak 796e952b92 Align text sizing in filter blocks: chips, checkboxes, buttons, dropdown (https://github.com/woocommerce/woocommerce-blocks/pull/7707)
* Align the font-size of checkbox-control component to the price slider amount

* Align the font-size of Price Slider Button to the price slider amount

* Align the font-size of Filter Reset Button to the price slider amount

* Align the font-size of Clear All Button to the price slider amount

* Align the font-size of Apply button in Editor to the price slider amount

* Align the font-size of Apply button in Frontend to the price slider amount

* Align the font-size of Price Slider Amount to the standard size

* Align the font-size of Active Filter chips to the price slider amount

* Align the font-size of Filter by Price (text) to the price slider amount

* Align the font-size of Filter by Attribute (dropdown) to the price slider amount

* Align the font-size of placeholder of Filter by Attribute (dropdown) to the price slider amount

* Change font-size for text in filters from font-size(smaller) to font-size(smaller)

As a result of discussion in PR it was agreed to check the styles with bigger font size hence the change

* Align the font-size of input text of Filter by Attribute (dropdown) to the price slider amount

* Change margin-right of checkbox-control to relative value so it better adapts to the fonts
2022-11-29 16:42:24 +01:00
Lucio Giannotta 181838bfdf Product Query: Add support for filtering by attributes within the block (https://github.com/woocommerce/woocommerce-blocks/pull/7743) 2022-11-29 14:44:52 +01:00
Luigi Teschio 0517c06495 disable translations test for the Checkout block (https://github.com/woocommerce/woocommerce-blocks/pull/7776) 2022-11-29 12:16:30 +01:00
Tung Du 653e838d79 Refactor `ProductQuery::merge_queries` to accept multiple queries (https://github.com/woocommerce/woocommerce-blocks/pull/7697) 2022-11-29 10:13:57 +07:00
Luigi Teschio 58423a2025 Product Query - add support for the global query (https://github.com/woocommerce/woocommerce-blocks/pull/7382)
* Product Query: Fix pagination issue

* Product Query - Add support for the Filter By Price Block woocommerce/woocommerce-blocks#6790

Product Query - Add support for the Filter By Price Block

* fix query relation

* fix on sale query

* Product Query - Add support for the Filter By Attributes block woocommerce/woocommerce-blocks#6790

Product Query - Add support for the Filter By Attributes block

* fix bugged pagination and on-sale filter after refactor

* address feedback

* Product Query - Add support for the Filter By Stock Block woocommerce/woocommerce-blocks#6790

Product Query - Add support for the Filter By Stock Block

* Fix filter blocks: the data (e.g: max price or stock-status) match the variation woocommerce/woocommerce-blocks#7245

fix filter blocks: the data (e.g: max price or stock-status) match the variation

* rename allowControls to allowedControls

* add support to the global query

* fix eslint error

* bot: update checkstyle.xml

* Update src/BlockTypes/ProductQuery.php

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* fix global query generation

* bot: update checkstyle.xml

* try: refactor merge_queries

* remove debug code

* fix: unpack assoc array php 7.4

* try: refactor merge_queries to take any form of input without unpacking
and preparing the input arrays

* add missing query vars

* add feature flag

* updates comment

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-28 15:31:31 +01:00
Albert Juhé Lluveras c7bfa1d89c CSS cleanup from /assets/css/ (https://github.com/woocommerce/woocommerce-blocks/pull/7751)
* Remove unused SCSS variables

* Unify mixins style

* Remove legacy editor styles

* Move SearchListControl styles into its component

* Remove unused styles
2022-11-28 15:09:31 +01:00
kmanijak 13ff157278 Register footer and header patterns as template parts, so they are available in contextual chooser (https://github.com/woocommerce/woocommerce-blocks/pull/7699) 2022-11-28 12:11:08 +01:00
Manish Menaria c263ba83d4 Adds product query support for Category list block (https://github.com/woocommerce/woocommerce-blocks/pull/7675)
* Adds product query support for Category list block

On the client side, when the Category list block is used within the
product query bloc, the markup will be rendered on the server side -
No javascript related to Category list block will be rendered.

* bot: update checkstyle.xml

* Fix extra space after the category link

I used the solution from following link: https://css-tricks.com/fighting-the-space-between-inline-block-elements/#aa-remove-the-spaces

Here is the content from the above link:

The reason you get the spaces is because, well, you have spaces between the elements (a line break and a few tabs counts as a space, just to be clear). Minimized HTML will solve this problem, or one of these tricks:

```CSS
<ul>
  <li>
   one</li><li>
   two</li><li>
   three</li>
</ul>
```

or

```CSS
<ul>
  <li>one</li
  ><li>two</li
  ><li>three</li>
</ul>
```

or with comments…

```CSS
<ul>
  <li>one</li><!--
  --><li>two</li><!--
  --><li>three</li>
</ul>
```

They’re all pretty funky, but it does the trick.

* Fix custom style doesn't work on the frontend side

For more info, check this comment on the PR:
https://github.com/woocommerce/woocommerce-blocks/pull/7675#pullrequestreview-1179267957

In summary, user can set the custom styles like text color, link color, font size, font weight, line height using the editor sidebar.
These styles weren't showing on the frontend side.

* Add support for additional CSS class(es)

* Fix "custom style -> link color" not working

To understand the issue in more details please check following comment:
https://github.com/woocommerce/woocommerce-blocks/pull/7675#issuecomment-1319822535

* Fix classname undefined issue

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-28 11:47:27 +05:30
Albert Juhé Lluveras 91ff195c07 Rename Active Product Filters block to Active Filters (https://github.com/woocommerce/woocommerce-blocks/pull/7753)
* Rename Active Product Filters block to Active Filters

* Rename wc-block-active-product-filters__placeholder to wc-block-active-filters__placeholder

* Rename active filters fixture
2022-11-25 17:17:45 +01:00
dependabot[bot] 4f18a71899 Bump loader-utils from 1.4.0 to 1.4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7688)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2022-11-25 11:08:43 -03:00
Alba Rincón 304f2c3c23 Make `Products by category/tag/attribute` fallback to the `Product catalog` template (https://github.com/woocommerce/woocommerce-blocks/pull/7712)
* Add archive-product to the hierarchy

* Fallback to archive-product and get titles from blocks if the templates from theme don't have one

* Rename function

* Fix comment

* Add fallbacks to the db and blocks versions

* Add missing product attribute blockified template

* Update docs

* Add comment and fix comment type on wp_template

* Replate template name if we know the template in blocks

* Add comment and fix linting error

* Fix archive-product template

* Clone the fallback template from db to show them in the template lsit

* Return the fallback template when querying for a single template

* Remove unneeded condition

* Use wp function instead of gutenberg one

* Fix tests

* Fix tests on Product Catalog templates

It was checking a single product for the customization, but it should check the /shop page

* Disable tests related with deleteAllTemplates function
2022-11-24 16:45:39 +01:00
Alex Florisca c9109183b8 Remove CustomerDataContext (https://github.com/woocommerce/woocommerce-blocks/pull/7686)
* Remove CustomerDataContext

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-24 14:20:44 +00:00
Alex Florisca ff414acd63 Add checkout selectors (https://github.com/woocommerce/woocommerce-blocks/pull/7713)
* Add checkout selectors

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-24 14:19:59 +00:00
Luigi Teschio 1b55c5633b Product Query - Add E2E tests for the Filter by Attribute block (https://github.com/woocommerce/woocommerce-blocks/pull/7405)
* Product Query: Fix pagination issue

* Product Query - Add support for the Filter By Price Block woocommerce/woocommerce-blocks#6790

Product Query - Add support for the Filter By Price Block

* fix query relation

* fix on sale query

* Product Query - Add support for the Filter By Attributes block woocommerce/woocommerce-blocks#6790

Product Query - Add support for the Filter By Attributes block

* fix bugged pagination and on-sale filter after refactor

* address feedback

* Product Query - Add e2e tests for the Filter By Price block

* Product Query - Add e2e tests for the Filter By Attribute block

* fix comment

* fix comment

* remove not used import

* remove not used import

* address feedback

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-11-24 14:42:58 +01:00
Lucio Giannotta 55face4338 Product Query: Add order by “Top rated” as a preset (https://github.com/woocommerce/woocommerce-blocks/pull/7715)
* Add safety guard to `extend_rest_query_allowed_params`
2022-11-23 20:28:17 +01:00
Daniel Dudzic 81d0994213 Post 9.0.0 release version bump (https://github.com/woocommerce/woocommerce-blocks/pull/7737) 2022-11-23 18:01:04 +01:00
Manish Menaria 983ecc03d7 Add product query support for Sale badge block (https://github.com/woocommerce/woocommerce-blocks/pull/7709)
* Add product query support for Sale badge block

On the client side, when the Sale badge block is used within the product query block, the markup will be rendered on the server side - No javascript related to Sale badge block will be rendered.

* Add support for additional CSS class(es)

ADDITIONAL CSS CLASS(ES)(available in advanced toggle in sidebar) should be added to the container div

* Convert preset to css variable for padding

We are getting padding value in preset format like this:
"var:preset|spacing|50"
Therefore I added a function to convert it to CSS variable like this:
"var(--wp--preset--spacing--50)"

i.e. "var:preset|spacing|50" -> "var(--wp--preset--spacing--50)"

* Add reference for preset to css variable conversion logic
2022-11-23 17:12:55 +05:30
github-actions[bot] ed192ab48e Release: 9.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7725)
* Empty commit for release pull request

* Update compatibility sections and add release 9.0.0 changelog

* Add testing instructions for the 9.0.0 release

* Update testing instructions for the 9.0.0 release

* Remove testing instructions for an unmerged PR

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com>
2022-11-23 12:37:31 +01:00
Tung Du 418d33e22e E2E: Change label of product filters from `Product filters` to `Advanced Filters` (https://github.com/woocommerce/woocommerce-blocks/pull/7726)
* E2E: Change label of product filters from `Product filters` to `Advanced
Filters` to match with the updates from woocommerce/woocommerce-blocks#7687

* rename test file and test title to advanced filters

* E2E: Fix flaky test related to `waitForAllProductsBlockLoaded` (https://github.com/woocommerce/woocommerce-blocks/pull/7727)

* explain the reason for try/catch
2022-11-22 15:28:27 +01:00
Lucio Giannotta 04c689b0ff Product Query: Add order by “best selling” as a preset (https://github.com/woocommerce/woocommerce-blocks/pull/7687)
* Add support for “Popular Presets” for PQ block

This commits achieves the following:

* Adds a section in the inspector control called “Popular Presets”,
which contains a dropdown with popular presets.
* Adds support for the first preset: “Best selling products”.
By selecting this, users can sort products by total sales.
* Switches the order of the custom inspector controls and the default
Query Loop inspector controls: our controls will be now on top
as per the latest design spec (see pdnLyh-2By-p2).
* Restricts the allowed Query parameters to the sort orders we want to
allow according to the latest design spec (disabling title and date).
* Removes the core “Order By” dropdown.
* Refactor `setCustomQueryAttribute` to `setQueryAttribute` because
since a few iterations, our custom query attributes are not deeply nested
anymore, and this function can be used for the normal query too.
* Add back-end support for sorting by Best Selling via the Product Query block
* Adds the `popularity` value as an allowed value for `orderby` on
`product` REST API calls.
* Handles the query differently if the `orderby` value is one among the
custom ones.
2022-11-21 19:21:58 +01:00
Tarun Vijwani 482d3e3224 Change action type name for use shipping as billing option (https://github.com/woocommerce/woocommerce-blocks/pull/7695) 2022-11-21 18:04:53 +04:00
Thomas Roberts 7f8be00f74 Add tests to ensure argument passed to `canMakePayment` is correct (https://github.com/woocommerce/woocommerce-blocks/pull/7478)
* Add tests to ensure argument passed to canMakePayment is correct

* bot: update checkstyle.xml

* bot: update checkstyle.xml

* Fix import and type after rebase

* bot: update checkstyle.xml

* Trigger Build

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-21 04:13:24 -08:00
Tung Du 8108f42c30 Refactor TypeScripts error monitoring workflow to avoid tracking checkstyle.xml (https://github.com/woocommerce/woocommerce-blocks/pull/7717) 2022-11-21 19:07:23 +07:00
Tung Du 65afb95e35 Product Query E2E tests: Sale and Stock status filters tests (https://github.com/woocommerce/woocommerce-blocks/pull/7684)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-21 08:08:12 +07:00
Luigi Teschio 21beb29442 Product Query - Add e2e tests for the filter by price block (https://github.com/woocommerce/woocommerce-blocks/pull/7351)
* Product Query - Add e2e tests for the Filter By Price block

* fix comment

* remove not used import

* update description

* update functions after merge

* improve check
2022-11-18 16:44:39 +01:00
Niels Lange 11815133d5 Fix various GitHub Actions warnings (https://github.com/woocommerce/woocommerce-blocks/pull/7573)
* Remove git checkout HEAD^2

* Add assertion to Cross-Sells e2e test

* Replace deprecated set-output calls

* bot: update checkstyle.xml

* Remove obsolete eslint-disable comment

* Change “actions/cache@v2” to “actions/cache@v3”

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-18 07:41:30 -08:00
Alex Florisca a73d6af443 Move paymentResult to the payment store (https://github.com/woocommerce/woocommerce-blocks/pull/7692)
* Move paymentResult to the payment store

* bot: update checkstyle.xml

* Update docs

* Fix typerror

* bot: update checkstyle.xml

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
2022-11-18 12:13:00 +00:00
Raluca Stan 98480c4dc2 Update cart.md (https://github.com/woocommerce/woocommerce-blocks/pull/7700)
* Update cart.md

Add information on how to add extra data to the /add-item request

* Update src/StoreApi/docs/cart.md

Co-authored-by: Niels Lange <info@nielslange.de>

* Update src/StoreApi/docs/cart.md

Co-authored-by: Niels Lange <info@nielslange.de>
2022-11-18 12:16:26 +01:00
Niels Lange 21e30a2956 Convert product-elements/image to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/7572)
* Updated package-lock.json

* fixed method sig

* PHP versions matrix

* removed extra space

* renamed step

* Update E2E and coding standards to use PHP 8.0

* Un-linted unit-tests.yml. Github flows use 4 spaces indent, while our .editorconfig file enforces 2 spaces.

* Refactor unit-tests.yml

* Linted unit-tests.yml to proper 2 space indents

* Removed composer caching

* Test without hacky permissions step

* Concurrency disable.
Jobs renaming.

* Add step to install wp-env for PHP unit tests.

* Another try at fixing perms for wp-env

* Another try at fixing perms for wp-env

* Restore missing steps

* Convert product-elements/image to TypeScript

* bot: update checkstyle.xml

* Refactor edit.tsx

* bot: update checkstyle.xml

* Add interface to attributes.ts

* Convert product-elements/image to TypeScript

* bot: update checkstyle.xml

* bot: update checkstyle.xml

* Refactor edit.tsx

* Add interface to attributes.ts

* bot: update checkstyle.xml

* bot: update checkstyle.xml

* Solve TS error

* Solve TS error

* bot: update checkstyle.xml

* Solve TS errors

* bot: update checkstyle.xml

* Solve TS errors

* bot: update checkstyle.xml

* Document types

* Adjust TS interface

* Correct merge mistakes

* bot: update checkstyle.xml

* Solve TS errors

* bot: update checkstyle.xml

* Fix broken JS unit test

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-18 13:52:37 +07:00
Thomas Roberts 9bc245f006 Add `clearValidationErrors` action to validation data store (https://github.com/woocommerce/woocommerce-blocks/pull/7601)
* Add clearValidationErrors to validation data store actions

* Add reducer case for CLEAR_VALIDATION_ERRORS

* Add tests for CLEAR_VALIDATION_ERRORS

* Add documentation for clearValidationErrors

* Deprecate clearAllValidationErrors in actions.ts

* Remove CLEAR_VALIDATION_ERRORS action and reducer case

* Update reducer test for clearAllValidationErrors

* Make error message in test describe the test better

* Update reducer to handle CLEAR_VALIDATION_ERRORS with no error passed

* Update documentation for validation data store

* Remove unnecessary linebreaks in documentation
2022-11-17 09:19:44 -08:00
Albert Juhé Lluveras f2748f84ee Update Filter by Stock block name in readme.txt (https://github.com/woocommerce/woocommerce-blocks/pull/7599) 2022-11-17 16:08:48 +01:00
Saad Tarhi a5970697ea Fix missing translations in inspector — Cross-Sells Block (https://github.com/woocommerce/woocommerce-blocks/pull/7616)
* Fix CartCrossSellsBlock inspector's translation

* Fix CartCrossSellsProductsBlock inspector's translation

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2022-11-17 14:41:15 +01:00
Thomas Roberts 8087adc49d Move `StoreNoticesContainer` to `@woocommerce/blocks-checkout` package and add tests (https://github.com/woocommerce/woocommerce-blocks/pull/7558)
* Move StoreNoticesContainer to checkout package & convert to TS

* Update @types/wordpres__notices version

* Export StoreNoticesContainer from checkout package

* Remove PropTypes from StoreNoticesContainer

* Remove store-notices/index file

* Update import of StoreNoticesContainer

* Remove store notices export

* Add docblock to StoreNoticesContainer component

* Add tests for StoreNoticesContainer

* bot: update checkstyle.xml

* Fix typo and incorrect component name

* Update import for StoreNoticesContainer

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-17 05:33:58 -08:00
Alba Rincón 87510929b5 Create the `Products by Attribute` template (https://github.com/woocommerce/woocommerce-blocks/pull/7660)
* Create the `Products by Attribute` template

* bot: update checkstyle.xml

* Fix typo

* Rename template to `taxonomy-product_attribute`

* Rename test template file

* bot: update checkstyle.xml

* Fix test enabling archives for shade attribute

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-16 14:37:41 +01:00
Alex Florisca ddd0cc2300 Move payment utils and delete orderPaymentMethods (https://github.com/woocommerce/woocommerce-blocks/pull/7679)
* Moved all payment utils functions in a utils folder

* Delete  as it's not being used

* bot: update checkstyle.xml

* bot: update checkstyle.xml

* Fix TS error

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-16 09:38:48 +00:00
kmanijak 5e1896d98a Fix: skewed placeholder of product image - issuewoocommerce/woocommerce-blocks#7553 (https://github.com/woocommerce/woocommerce-blocks/pull/7651)
* Fix typo in HTML markup of ProductImage block placeholder

Typo caused rendering of incorrect HTML attributes: width and height of Product Image placeholder that were anyway ignored by the browser

* Remove inline styles (width and height) from ImagePlaceholder in ProductElements > Image block

Inline height took precedence over the inherited styles which made the placeholder image skewed (in loading and loaded state). Removal of those styles allows the ImagePlaceholder to adapt the height to the available space keeping the ratio or inherit the styles from the parent

* Remove inline styles (width and height) from placeholder image in ProductImage.php block

Inline styles applied to the placeholder image of ProductImage block were overriden by other styles with higher specificity, which made them redundant. Additionally, corresponding styles were removed from the placeholder image from Editor code as they caused UI glitches. Additional proof that it's safe to remove them is in the first commit in this branch, the purpose of which was to fix those styles as there was a typo which corrupted them and eventually inline width and height were ignored by the browser and not applied to the element

* Add test to check placeholder image renders without width and height inline attributes

This is to prevent adding inline width and height attributes so the sizing of the placeholder image is controlled by the inherited styles or element styles, in the same way as a regular product image

* Fix TypeScript errors in the block test file of Product Image

* Add generic alt text to placeholder image

Alt text added in this commit is a generic text, not description of the actual image. That's because the image itself is set externally through the settings and may change over time

* Revert adding placeholder image alt text and add comments to make the empty alt explicit

After a Github discussion: https://github.com/woocommerce/woocommerce-blocks/pull/7651\#discussion_r1019560494 it was decided the placeholder should NOT have alt text as it serves the purpose of decorative image. According to the guidelines decorative images should not have alt text: https://www.w3.org/WAI/tutorials/images/decorative/. Comments were added also to other places where it happens

* bot: update checkstyle.xml

Co-authored-by: Karol Manijak <karolm@Karols-MacBook-Pro.local>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-16 10:25:40 +01:00
Tung Du e59c931a9b E2E: Fixing failed tests with Gutenberg (https://github.com/woocommerce/woocommerce-blocks/pull/7554)
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
2022-11-16 08:52:51 +07:00
Alexandre Lara da594b87a4 Make loading placeholder colors match the current font color (https://github.com/woocommerce/woocommerce-blocks/pull/7658)
* Make loading placeholder colors match the current font color

Currently, the loading placeholder effect has a default gray color. However, since users can modify their themes with the Site Editor and choose a different set of colors for their websites, it would be interesting to make those placeholders match the color palette.

In this commit, the idea was to modify the `placeholder` mixin to replace the transparent font color with the current color and also modify the background-color and the linear-gradient to match the current font color. Furthermore, transparency was added to the middle color of the linear-gradient so we can keep the loading animation close to what it currently is.

* Add opacity to placeholder mixin

Before our changes, when the font color was dark, we had a lighter placeholder background color. After the changes the color is currently darker than before so the idea for this commit is to change the opacity of the placeholder in a way that the current color blends with the background color set for the theme.

* Change placeholder mixin opacity

After testing different combinations of colors, we decided to change the opacity to 0.15 so when the font color is darker the placeholder will have a lighter background color.

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-15 18:08:44 -03:00
Alex Florisca bf8d56ec72 Refactor the payment status (https://github.com/woocommerce/woocommerce-blocks/pull/7666)
* Add actions and selectors for new paymemt status

* Remove set_complete from reducer

* Replace all usages of getCurrentStatus with specific sepectors

* Replace all `setCurrentStatus` with individual actions

* Update docs

* Removed currentStatus

* bot: update checkstyle.xml

* Update docs/third-party-developers/extensibility/data-store/payment.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Address Thomas feedback

* Add link to deprecated message

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-11-15 12:27:39 +00:00
Niels Lange 6d60ce501f Convert product-elements/stock-indicator to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/7567)
* Convert product-elements/stock-indicator to TypeScript

* bot: update checkstyle.xml

* Add interface for blockAttributes

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-15 06:16:02 +07:00
Niels Lange 94734a968b Bump version number of @types/wordpress__blocks (https://github.com/woocommerce/woocommerce-blocks/pull/7674)
* Bump version number of @types/wordpress__blocks

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-14 18:58:01 +07:00
Alba Rincón 5aae9940cb Merge branch 'release/8.9.0' of github.com:woocommerce/woocommerce-blocks into trunk 2022-11-14 10:22:21 +01:00
github-actions[bot] 8270730298 Release: 8.9.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7670)
* Empty commit for release pull request

* Display correct block template when filtering by attribute (https://github.com/woocommerce/woocommerce-blocks/pull/7640)

* Fix error when trying to access the queried object when it's null (https://github.com/woocommerce/woocommerce-blocks/pull/7664)

* Fix error when trying to access the queried object when it's null.

* Check if the `slug` exists

* Use the taxonomy name instead of the slug, otherwise it returns false

* Update readme changelog

* Add testing notes

* Improve testing notes format

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2022-11-14 10:08:53 +01:00
Alex Florisca fc44b9fc4d Remove the experimental flag that's used to include thunks in wp.data (https://github.com/woocommerce/woocommerce-blocks/pull/7617)
* Remove the experimental flag that's used to include thunks in wp.data

* bot: update checkstyle.xml

* Fix ts error from previous PR

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-14 09:07:49 +00:00
dependabot[bot] 9a7f1e17e1 Bump @woocommerce/eslint-plugin from 2.0.0 to 2.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/6837)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-12 02:14:18 +07:00
Alba Rincón 54c65287ed Fix error when trying to access the queried object when it's null (https://github.com/woocommerce/woocommerce-blocks/pull/7664)
* Fix error when trying to access the queried object when it's null.

* Check if the `slug` exists

* Use the taxonomy name instead of the slug, otherwise it returns false
2022-11-11 17:16:40 +01:00
Albert Juhé Lluveras 4c06377e47 Display correct block template when filtering by attribute (https://github.com/woocommerce/woocommerce-blocks/pull/7640) 2022-11-11 11:32:40 +01:00
Daniel W. Robert 37a6b2ef63 Add Product Query Support for Atomic SKU Block (https://github.com/woocommerce/woocommerce-blocks/pull/7385)
* Add attributes, settings, and editor PQ settings.

- Adds isDescendentOfQueryLoop attribute and sets up usage in editor.
- Connects Context (via useContext) in editor.
- Sets up necessary hierarchy in block index file settings.

* Update parent inner blocks config.

Reassign parent array to ancestor array which allows for blocks to be
included with more flexibility - i.e., added within groups that are
children of the ancestor block.

* Add dynamic render function for PQ support.

* Update to use correct classnames on PHP side.

SSR markup was accidentally using rating classname instead of sku so it
was not applying the proper text transform seen in the editor.

* Rename BlockAttributes type to Attributes

This keeps things consistent with the type naming on the other blocks.

* Remove redundant spread of sharedConfig object.

We don't need to spread the `sharedConfig` object into the `blockConfig`
object when defining `blockConfig` since we spread/merge these two
objects when registering the block via `registerExperimentalBlockType`.

* bot: update checkstyle.xml

* bot: update checkstyle.xml

* Empty commit to trigger checks.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-10 13:32:07 -05:00
Alex Florisca 9fa34effce Remove paymentStatuses, isDoingExpressPayment and isExpressPaymentMethodActive from the payment store state (https://github.com/woocommerce/woocommerce-blocks/pull/7643)
* Remove isExpressPaymentMethodActive and paymentStatus.isDoingExpressPayment from the payment store

* Remove uneccessary paymentStatuses key from the payments store
2022-11-10 16:15:31 +00:00
Alex Florisca c52dc91f67 Update from deprecated registerStore to register for data stores (https://github.com/woocommerce/woocommerce-blocks/pull/7310)
* Update from deprecated registerStore to register for data stores

* Rollback cart changes

* bot: update checkstyle.xml

* Explain keeping the deprecated "registerStore"

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-11-10 15:37:01 +00:00
Mike Jolley 25b4e18df2 Remove UPDATE_LEGACY_CART_FRAGMENTS (https://github.com/woocommerce/woocommerce-blocks/pull/7644)
* Remove UPDATE_LEGACY_CART_FRAGMENTS

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-10 11:41:00 +00:00
Paulo Arromba 7eeabeea69 Updated rate-limiting example snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7650) 2022-11-10 11:39:46 +00:00
Thomas Roberts 32c402413a Update ValidatedTextInput TypeScript & move to `@woocommerce/blocks-checkout` (https://github.com/woocommerce/woocommerce-blocks/pull/7583)
* Move ValidatedTextInput and ValidationInputError to checkout package

* Include checkout package in tsconfig file

* Remove unnecessary index file

We export these components from packages/checkout/index.js instead

* Import ValidatedTextInput & ValidationInput error from checkout package

* Only add validationError.message when validationError is an object

* Explicitly add undefined to optional props

* Import isObject to test validationError

* Extend the HTML Input element attributes

* Use more performant useDispatch instead of dispatch

* Export component without withInstanceId hoc for testing

* Add tests for ValidatedTextInput

* bot: update checkstyle.xml

* Rename export of unwrapped component to have __

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-10 02:05:41 -08:00
Tarun Vijwani 4f75d12188 Add woocommerce_blocks_loaded hook information to actions doc (https://github.com/woocommerce/woocommerce-blocks/pull/7600)
* Add woocommerce_blocks_loaded hook information to actions doc

* add docs to woocommerce_blocks_loaded hook inline

* fix docs

* Switch to updated wp-hooks/generator package

* Prevent syntax error in doc script from storeapi.php

* Remove footer from internal docs and examples

* Doc footer script should ignore examples and internal developer docs

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-11-10 09:52:04 +01:00
Paulo Arromba f857afae0f Add PHP8 Unit Testing (https://github.com/woocommerce/woocommerce-blocks/pull/7528)
* fixed method sig

* Updated to @wordpress/env@5.5.0 and set default PHP 7.4 for wp-env.

* updated Coding Standards flow to use PHP 8.0

* Added comment to E2E flows explaining what PHP version is used

* Revert "Updated to @wordpress/env@5.5.0 and set default PHP 7.4 for wp-env."

This reverts commit 696cd7f42edc9d9726b777cf4f83a501a6d63936.

* Added comment to Unit test flows explaining what PHP version is used.
Specified PHP version on .wp-env.json

* Fixed composer-lock.json version.

* Updated tests to run on PHP Unit 9.2.6

* Updated tests to run on PHP 8

* Reverted test, mismatched results between local and pipeline

* Removed Todo

* Updated platform overrides

* Update Migrationb tests with Mockery for PHP8 compat

* try at PHP unit flow matrix

* Fix blocks.ini invalid config

* Temp disable E2E

* Downgraded woocommerce/woocommerce-sniffs as it introduced new sniffs we should be handling on a different PR

* re-enable E2E tests

* blocks.ini fix

* revert blocks.ini fix

* Update @wordpress/env

* remove .htaccess mapping

* Fix permissions for tests

* Debug permissions

* Attempt at perm fix

* Attempt at perm fix

* Downgraded @wordpress/env

* Another attempt at upgrade @wordpress/env

* Attempt at cleaning wp-env before run

* Attempt at destroying wp-env before run. Disabled E2E.

* Attempt at destroying wp-env before run.

* debug wp-env data

* attempt at deleting wp-env data (destroy won't work due to prompt)

* re-enable E2E

* Fix deprecation warnings

* Cleaned wp-env data for E2E

* Fix perms for E2E

* Updated RateLimitsTests

* debug

* Force 7.4 for wp-env

* Run sh outside of npm

* Reverted E2E flow

* reverted wp-env-config.sh debug test

* reverted .wp-env.json phpVersion force

* Update tests/php/StoreApi/Utilities/ProductQueryFilters.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/CartExtensions.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/CartItems.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/Products.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/ProductCollectionData.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/Batch.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/Checkout.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/CartCoupons.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/ProductAttributes.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Update tests/php/StoreApi/Routes/Cart.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* downgraded @wordpress/env to v4

* Reverted back to reflection class for pivate attribs manipulation on tests

* reverted JS unit testing job name

* Update tests/php/StoreApi/Formatters/TestMoneyFormatter.php

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Typo fix

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-11-09 15:28:08 +00:00
Luigi Teschio 4947193eec TS monitor: Update comment instead of create a new one (https://github.com/woocommerce/woocommerce-blocks/pull/7593)
* Monitor TS: Update comment instead of create a new one

* Monitor TS: Update comment instead of create a new one
2022-11-09 15:42:04 +01:00
Alba Rincón 8df15079d0 Revert "Add milestone only when the PR is merged (https://github.com/woocommerce/woocommerce-blocks/pull/7544)" (https://github.com/woocommerce/woocommerce-blocks/pull/7636)
This reverts commit 2109f34275.
2022-11-09 11:59:23 +01:00
Thomas Roberts 6252b951e3 Fix TypeScript errors in `CartLineItemRow` (https://github.com/woocommerce/woocommerce-blocks/pull/7605)
* Import Currency type from correct location

* Add type for productPriceValidation argument

* Default tabIndex to undefined

null is not an acceptable value for the tabIndex prop, but undefined is, so we should use that.

* Explicitly set type of CartLineItemRow to ForwardRefExoticComponent

* bot: update checkstyle.xml

* Change CartLineItemRow to extend React.RefAttributes

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-09 02:26:28 -08:00
Alba Rincón 9ae1f91440 Update to next dev version 2022-11-09 10:38:57 +01:00
Alba Rincón 2109f34275 Add milestone only when the PR is merged (https://github.com/woocommerce/woocommerce-blocks/pull/7544) 2022-11-09 09:59:56 +01:00
Tung Du fc4ce6dac6 E2E: Product Query: Testing atomic blocks (https://github.com/woocommerce/woocommerce-blocks/pull/7482)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-09 08:53:26 +07:00
Kathy ddf8e56cc9 Add the option of providing a custom class for the product details on the Cart Block
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-11-08 16:57:52 +00:00
Albert Juhé Lluveras f65b0f64e4 Add a link to check WC core minimum WP supported version in the release checklist (https://github.com/woocommerce/woocommerce-blocks/pull/7598)
* Add a link to check WC core minimum WP supported version in the release checklist

* Rephrase
2022-11-08 14:35:13 +01:00
Alba Rincón 013ce2b9af Update to next dev version 2022-11-08 13:36:59 +01:00
github-actions[bot] 371f5980bb Release: 8.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7596)
* Empty commit for release pull request

* Update readme changelog

* Bump versions

* Bump versions

* Fix the minimum_supported_wp_version

* Update readme.txt

* Add testing instructions

* Change Filter Wrapper to Filter Block

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Remove Light from test instructions

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Fix version

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Remove experimental section

* Improve formatting of instructions

* Bumping version strings to new version.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 13:30:03 +01:00
Alba Rincón b8e0283d5b Bumping version strings to new version. 2022-11-08 12:08:01 +01:00
Luigi Teschio 190ab45d26 fix markdown linter (https://github.com/woocommerce/woocommerce-blocks/pull/7597) 2022-11-08 10:26:47 +01:00
Alba Rincón bf8ad6e592 Improve formatting of instructions 2022-11-08 09:54:27 +01:00
Tung Du 7467be8605 Fix: use correct type specifier for rating HTML (https://github.com/woocommerce/woocommerce-blocks/pull/7592) 2022-11-08 15:34:08 +07:00
dependabot[bot] 9a2a4f5c9f Bump wp-phpunit/wp-phpunit from 6.0.3 to 6.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7602)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 15:23:14 +07:00
Alba Rincón 0e5cb3efdd Remove experimental section 2022-11-08 08:42:09 +01:00
Alba Rincón 2770520bb2 Fix version
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 08:41:32 +01:00
Alba Rincón 9941a26aa0 Remove Light from test instructions
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 08:41:15 +01:00
Alba Rincón d6d3793c6d Change Filter Wrapper to Filter Block
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-08 08:40:56 +01:00
Alba Rincón b3abf6bcd0 Add testing instructions 2022-11-07 16:42:46 +01:00
Alba Rincón 478cddb1ec Update readme.txt 2022-11-07 16:40:31 +01:00
Alba Rincón 97bc2844e9 Fix the minimum_supported_wp_version 2022-11-07 15:59:05 +01:00
Alba Rincón a466981a39 Bump versions 2022-11-07 15:39:27 +01:00
Alba Rincón 12ae36f187 Bump versions 2022-11-07 15:19:32 +01:00
Alba Rincón 5c8419a79f Update readme changelog 2022-11-07 15:04:49 +01:00
Daniel W. Robert 00c3396184 Fix Price Block Inserter Visibility (https://github.com/woocommerce/woocommerce-blocks/pull/7559)
* Remove `parent` from block config.

By removing the `parent` property from the block config, we can have
more flexibility to where we can use the pricing block - i.e., it does
not need to be a direct descendent of a `core/group` block.

* Remove unused save function/file.

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2022-11-07 14:09:26 +01:00
Thomas Roberts f0405c9ffc Update notices documentation (https://github.com/woocommerce/woocommerce-blocks/pull/7539)
* Update notices docs

* Remove reference to Notices Context

* Remove manual linebreaks
2022-11-07 02:49:15 -08:00
Thomas Roberts 3e6aaf47b3 Fix E2E errors with debounced `updatePaymentMethods` function (https://github.com/woocommerce/woocommerce-blocks/pull/7507)
* Add non-debounced versions of updatePaymentMethods

* Call undebounced function until store is ready then call debounced

* Reset debounce timer to 1 second

* Add better comments

* Try setting the trail setting of the debounce function

* Revert "Try setting the trail setting of the debounce function"

This reverts commit 040fb63cb612c19ac396396d1949b6429f402616.

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2022-11-07 02:48:27 -08:00
Mike Jolley 3c6a365697 Store API: Add missing documentation for reviews, categories, and tags (https://github.com/woocommerce/woocommerce-blocks/pull/7519)
* Update index

* Add missing docs
2022-11-07 10:37:00 +00:00
Niels Lange 7b84be1156 Convert product-elements/summary to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/7566)
* Convert product-elements/summary to TypeScript

* bot: update checkstyle.xml

* Update assets/js/atomic/blocks/product-elements/summary/index.ts

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Resolve introduced TS error

* bot: update checkstyle.xml

* Remove default subproperties

* Add TODO to refactor this part in the future

* Make attribute type more strict

* Add more context to the todo regarding removing the HOC

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-11-07 16:50:15 +07:00
dependabot[bot] 2a3a39bdcd Bump automattic/jetpack-autoloader from 2.11.10 to 2.11.11 (https://github.com/woocommerce/woocommerce-blocks/pull/7549)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 09:19:36 +07:00
dependabot[bot] 173738b885 Bump WebFreak001/deploy-nightly from 1.1.0 to 1.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/7557)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 08:43:25 +07:00
Alexandre Lara ab55341361 Prevent padding from placeholder instructions to be overriden (https://github.com/woocommerce/woocommerce-blocks/pull/7552)
* Prevent padding from placeholder instructions to be overriden

Inside the AttributeFilter component we are using a component Placeholder from the @wordpress/components library. This component has its own styles applied to itself including the part related to the instructions that are displayed.

Currently there is no way to override the styles specifically for the instructions part so the only possible way is to force the style to be applied over the inner styles set by the Placeholder component.

* Add a wrapper to the instructions content and apply the styles to it

The initial idea was to force the style to be applied by using `!important` on the padding-bottom property. However, after discussing more about it, it was decided that a better alternative is to add the instructions content to the body of the Placeholder content instead of relying on the `instructions` prop of the component.

This way, instead of forcing the style to be applied which could cause some side effects in the future, we are wrapping the instructions content in an HTML element that we control and, thus, can modify the styles independently of the external library it's being used (@wordpress/components).
2022-11-04 15:22:40 -03:00
Mike Jolley 07a612f575 Experiment: Add Rate Limits to Store API (https://github.com/woocommerce/woocommerce-blocks/pull/5962)
* Add rate limiting to cart endpoints based on session

* Handle nonce and rate checks in permission_callback

* Rate limit checkout only

* Debug

* Unused AbstractRoute

* Code standards

* Modify core rate limit table

* Add rate limit at rest api level, not route level

* Rate limit helper

* Remove rate limit from routes

* Usused dep

* Remove custom error logic no longer needed

* Remove dependency

* Remove custom permission_callback

* Hash IP and handle null

* Remove error response handler

* revert error_to_response changes

* Remove add_response_headers

* Remove IDENTIFIER

* Remove white space

* Increase limit

* Missing class comment

* Move rate limiting code within store api codebase

* white space

* Fix return type

* Check rate limit expiry greater than now

* Remove x- prefix

* reorder functions

* remove table

* pass request to add_nonce_headers

* return early and avoid elseif on AbstractCartRoute:get_response()

* Refactor get_ip_address() before implementing options for functionality

* Change rate limit to 5 requests

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Change rate limit window to 60 seconds

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Disable rate limiting by default

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Updated limits comment

* Example for Forwarded header

* Updated "woocommerce_store_api_enable_rate_limit_check" filter doc

* Added filter for the Store API rate limit check proxy support

* Add an action here that carries over the IP address being blocked.

* Added logic around setting the action_id, and returns an error when ip cannot be determined for users not logged in.

* Renamed action for limit exceeded.

* Common rate limiting header naming prefix, and fixed comment typos.

* Doc for Rate Limiting (wip)

* Example for Rate Limiting docs

* Remove private IP range block for rate limiting

* Refactored get_response() to add nonce headers to response instead of request

* Disable batching for Checkout calls to prevent bypassing Rate Limiting.

* Removed redundant arg.

* package-lock.json update

* Removed repeated func calls.

* Fix failing tests.

* Tests wip.

* Request limit and timeframe are now constants for RateLimits utility class.

* Tests for Rate Limit headers.

* Reverted PHPUnit config to enable all tests again.

* Update src/StoreApi/Authentication.php comment wording

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Removed possibly unnecessary get_ip_address() call.

* Changed wording on comment for get_ip_address() method.

* Simplified validate_ip() method.

* Fixed wrong header entry for "Forwarded" check.

* Unit testing for Authentication::get_ip_address()

* Comment explaining the reason to use ReflectionClass for testing get_ip_address().

* Support for error output outside batch request.

* MD linting.

* Refactor to implement options through a single filter.

* fixed md lint error and config file

* reverted accidental default func arg value removal

* re-enabled batch support for checkout

* action for limit exceed now also triggered in case we can't resolve the IP.

* Doc tweak.

* Return unresolved IP address when REMOTE_ADDR isn't set with proxy support disabled.

* Group unresolved ips for rate limiting

* Fixed bug where current limit wasn't properly initialized.

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2022-11-04 15:53:00 +00:00
Alba Rincón 1884040a6a Fix menus on 'large', 'simple' and 'with 2 menus' footers (https://github.com/woocommerce/woocommerce-blocks/pull/7579)
* Fix menus on simple and with 2 menus footers

* Fix large menu
2022-11-04 16:14:44 +01:00
Daniel Dudzic ca1e65cbef Filter by Rating: Remove the Feature Plugin flag (https://github.com/woocommerce/woocommerce-blocks/pull/7580)
* Filter by Rating: Remove the Feature Plugin flag
2022-11-04 15:53:16 +01:00
Daniel Dudzic da0a5157bf Active Filters: Fix active filter grouping for Ratings and Stock Status (https://github.com/woocommerce/woocommerce-blocks/pull/7577)
* Active Filters: Fix active filter grouping for Ratings and Stock Status

* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-04 13:30:33 +01:00
Alba Rincón 8e7718a36a Set a the color as white for the dark header/footer patterns (https://github.com/woocommerce/woocommerce-blocks/pull/7524)
* Set a the color as white for the dark header/footer patterns

That way we make sure they will be visible no matter which theme is active.

* Adapt light patterns to inherit colors from theme

* Remove light from pattern names and color from social icons

* Make links inherit color

* Remove background

* Remove wp:page-list

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-11-04 11:59:20 +01:00
Raluca Stan 86a3997463 Update release checklists to include checks for WC PR (https://github.com/woocommerce/woocommerce-blocks/pull/7442)
* Update release-initial-checklist.md

* Revert "Update release-initial-checklist.md"

This reverts commit 757c96b9b4950afc0439b1ea3acdd7fee563d954.

* Fix lint errors

* Update with user facing documentation

* Apply suggestions from code review

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-11-04 11:05:02 +01:00
Daniel Dudzic 2e7b0acce2 Filter by Rating: Add E2E tests (https://github.com/woocommerce/woocommerce-blocks/pull/7575)
* Filter by Rating: Add E2E tests
* bot: update checkstyle.xml

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-04 10:41:53 +01:00