* Throw an exception if there is no selected shipping method on an item that needs shipping
* Update src/StoreApi/Utilities/OrderController.php for ensure error message ends with a period.
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Remove i2 from build
* Remove i2 php registration
* Rename old checkout dir
* Rename i2 dir
* Migrate i1 to i2 code
* Register block metadata to fix frontend rendering when migrating to i2
* Register in correct order
* Missing styles
* add register-components to side effectful list
* wrong block class in e2e test
* wp prefix missing on selector
* Fix top level block test
* Reselect labels to work around rerendering
* missing empty cart styles
* Consolodate duplicate styles
* remove init code
* update selectBlockByName
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* Add back end E2E tests for Filter by Stock
* Add unit/snapshot tests for Filter by stock block
* Refactor Filter by Stock block to load stock statuses in the block body
This is required to make the code easier to test, since the mocked settings were being applied immediately after the block was imported, which didn't give time to let the `allSettings` override take place in the unit tests.
* Add PHP Unit tests for test_custom_stock_counts of ProductQueryFilters
* Remove useMemo from stock filter block
This felt like an overoptimisation, it's very inexpensive to run this every render. The result is less complex code, so it's better this way imo.
* Move initial stock options and the values they are derived from into useState
* Add class name to block in editor
* Tidy up bootstap so it uses autoloaders and works with the known plugin paths
* eslint ignore woocommerce bin
* Use WC from bin in wp-env
* Git ignore woocommerce in bin
* Remove reliance on core framework across phpunit tests
* Simplify bootstrap - since test framework is no longer required, there is no need to pull in woo from github
* Remove unused configs
* Update CI
* Implement PHPunit Polyfill
* Abstract the test case
* Update lock
* remove chown
* experiment: try sudo
* move phpversion to first run
* Remove 7.0 tests :(
* test plugin override for 5.5 test
* Use dev version
* Fix formatting
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* update README files with version requirements
* update phpcs config
* update default environment for tests locally
* update workflows to only test against versions matching new policy
* update plugin header for new version policy
* restore older WP version support in E2E tests and PHPCS
I realized that we might still want to test against L2 WP versions in our E2E tests until those tests can be moved to WC core. While the feature plugin is L0, we still need to support L2 for existing features that are already surfaced in the WooCommerce plugin package.
Also with PHPCS if there are fixes to older things in the codebase, we will need to preserve the usage of L2 friendly (back-compat) code.
* add detection of Woo Core version to bootstrap
* update version used in phpunit tests
* add links to version policy update post
* restore 5.5.1 for Woo Core version
Getting errors with 5.5.2 - not sure what's going on but might be the tag isn't available as expected for 5.5.2 maybe?
* switch to hardcoded version header reference
PHPUNIT was tripping on this for some reason.
* remove older WP version e2e test workflows
* fix phpunit tests for new woo test suite
Woo Core now uses a container and has some mocks that are used in some legacy test helpers.
* remove explicit set WOO_VERSION for phpunit tests.
This should default to latest for the GH workflow runs.
* Update release PR template.
Add some explicit instructions around updating required WP and WC versions at time of release.
* use latest WOO_VERSION in .env
* some improvements to reduce the things needing updated
* remove extraneous code
* Add some more checklist items to release PR templates
* remove unnecessary conditional
* remove is-dismissible css classes
* Improve clarity of error messaging
* Update README.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* remove checklist items about versions for patch releases
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Remove paypal from fixture data
* Fix scroll hoc tests
* Missing return type in cart causing TS error
* update e2e utils
* Replace searchForBlock method in e2e utils
* Single block update insert block
* Use insertBlockDontWaitForInsertClose
* Move text-input to checkout package
* Add support to TextInput for inputs with type number
* Add ExperimentalDiscountsMeta.Slot to Cart sidebar
* Add extra styles for Button and Panel components
* Add updateCartFromApi util to @woocommerce/blocks-checkout
* Change updateCartFromApi to TypeScript
* Stop passing contexts through the discounts slot fill
* Add CartExtensionsSchema class
* Add CartExtensions Route
* Add register_update_callback and get_update_callback fns
* Add extensionCartUpdate function
* Add applyExtensionCartUpdate action
* Make extensionCartUpdate use batching
* Add ExtensionCartUpdateArgs type definition
* Execute a success/error function after request in extensionCartUpdate
* Remove success and error functions
* Avoid including all schemas in CartExtensionsSchema instantiation
This is achieved by inheriting AbstractSchema and slightly modifying the way in which the latest cart data is returned from this endpoint.
* Update docs for extensionCartUpdate
* Handle errors from extension callbacks
* Throw better errors when incorrect namespace/functions are used
* Add tests for CartExtensions route, ExtendRestApi update callback registration
* Add dummy get_properties method to CartExtensionsSchema
* allow for WOO_VERSION config in tests setup
* pass through WOO_VERSION environment var to container
* force specific WOO_VERSION value for phpunit test run
* try passing through environment variable via docker arg
Also set .env for controlling local runs of phpunit
* Move type defs
* Move type guards
* Fix imports
* Extract prepareTotalItems to TS file
* usePaymentMethodInterface as TS file
* Fix TS props
* Fix currency type defs
* Add return type to usePaymentMethodInterface
* Add key prop to CartTotalItem
* Fixed up js tests
* Move SymbolPosition into type-defs package
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Fix checkout test
- make tests independent & test also for empty cart case
- make sure the Order summary is expanded with a better selector
* Remove unnecessary localStorage operations from tests
* Go to cart page before removing an item from cart
* Remove logging observing before tests
This removes unnecessary console.log interception. A big part of the logic was done for Puppeteer 1.6.1, but since 3.0.0 message.text() returns string. We allow console.error messages to surface in our tests. Although they don't cause the test to fail it might be a good addition for debugging purposes.
* Wip: fix e2e fe tests
* Test that navigation ends
* Fix waitForNavigation
* comment out failing php test
* click the dom element
* Ensure navigation happens by waiting for it. Test page title.
* remove skip and update docs
* Revert "comment out failing php test"
This reverts commit 7c40e8caf3aa32e35e3b70eb32051251b06e0613.
* Fix USD from merge conflict
* Add missing check for page title
* Try page.waitForFunction for text search
* test to see checkout page title is correct
* test checkout page url on CI
* unde jest config change
* Fix assertion for checkout page
* remove extra localStorage item remove call
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
* BLOCK SETTINGS: Remove unused constants/settings
* AssetDataRegistry: Helpers to check for settings that exist, and registering page ID/permalinks
* Move checkout and cart block settings to checkout and cart blocktypes
* Move isShippingCalculatorEnabled to cart block
* Remove HAS_DARK_EDITOR_STYLE_SUPPORT and IS_SHIPPING_CALCULATOR_ENABLED in favour of getSetting
* Move displayCartPricesIncludingTax to blocktypes, and implement getSetting
* Move block settings to core settings and blocktypes
* Fix namespace usage
* Move review settings
* move tag settings
* Keep productCount in core data
* Move min and default height
* Improve storePages code
* Move attributes to attribute filter block type
* Move $word_count_type outside of settings array
* Remove unneeded setting in preview data (shippingCostRequiresAddress)
* Move min/max settings dependency from GridLayoutControl to Blocks themselves and use getSettings
* DEFAULT_COLUMNS and ROWS to settings
* Move product columns/rows to block types
* Add grid settings to AllProducts block
* Correct default rows
* correct min rows default
* Move hasDarkEditorStyleSupport
* Move hideOutOfStockItems to block type settings
* Move build settings to inline script dependency
* Pass data through asset api and move restApiRoutes
* Export all core settings as constants
* Remove WORD_COUNT_TYPE from core settings
* Move some other core settings to assets
* Update constants
* Make settings use TypeScript
* Update CURRENT_USER_IS_ADMIN usage
* WORD_COUNT_TYPE
* REST_API_ROUTES
* REVIEW_RATINGS_ENABLED and SHOW_AVATARS
* Remove REVIEW_RATINGS_ENABLED and SHOW_AVATARS constants
* Remove MIN_HEIGHT
* Remove DEFAULT_HEIGHT
* PLACEHOLDER_IMG_SRC
* LIMIT_TAGS
* HAS_PRODUCTS
* HOME_URL
* HAS_TAGS
* COUPONS_ENABLED
* SHIPPING_ENABLED
* TAXES_ENABLED
* DISPLAY_ITEMIZED_TAXES
* SHIPPING_COST_REQUIRES_ADDRESS
* SHIPPING_STATES and SHIPPING_COUNTRIES
* STORE_PAGES
* ALLOWED_COUNTRIES
* ALLOWED_STATES
* SHIPPING_METHODS_EXIST
* PAYMENT_GATEWAY_SORT_ORDER
* CHECKOUT_SHOW_LOGIN_REMINDER
* CHECKOUT_ALLOWS_GUEST and CHECKOUT_ALLOWS_SIGNUP
* ATTRIBUTES
* DISPLAY_CART_PRICES_INCLUDING_TAX
* DISPLAY_CART_PRICES_INCLUDING_TAX
* update build for TS files
* fix build dir
* Move blocks build config params
* Move placeholderImgSrc to core settings
* Move rest api hydration hoc to shared hocs and provide it restApiRoutes directly to avoid asset data registration
* Move wordCountType to abstract block
* Remove WORD_COUNT_TYPE in favour of getSetting
* Move IS_LARGE_CATALOG and PRODUCT_COUNT to abstract block type and use getSetting inline
* Add wcBlocksConfig
* fix tests
* Remove unused $asset_data_registry
* remove console.log
* Move build settings to abstract block
* Trigger build again
* Move hydration back to regular hocs for compatibility with trunk (merge conflict)
* Removed wcSharedHocsConfig
* esc home url
* Update search fixture
* Update search snap
* 40000 timeout
* hasProducts -> productCount
* Product Count is part of blocks config
* update mocks
* Use version comparison to determine if batching is enabled
* Change isWpVersion
* scrollTo button
* Add batch route
* Register batch route
* Allow batching on writable endpoints
* Batch in client
* Batch non-GET requests
* Batching support with typescript defs
* Remove unused hook
* Prevent multiple fragment updates
* Only use batch route if detected
* Correct var name
* Move nonce check to validate_callback so it runs before requests are completed
* remove unused imports
* updateCartFragments function as const
* Add phpunit tests for batching functionality
* Reduce batch delay
* increase timeout
* Update isCartUpdatePostRequest for batch support
* Update Endpoint used in test
* Move nonce check back inline - custom headers are not returned otherwise
* Fix error handling
* Back to 30s
* Update assets/js/middleware/cart-update.ts
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* whitespace
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
This reverts commit 5b65a02297.
This commit broke cart updates for the cart block (surfaced with changing quantity)
There were also legit e2e test fails for the cart-update middleware behaviour that weren’t addressed.
* Add batch route
* Register batch route
* Allow batching on writable endpoints
* Batch in client
* Batch non-GET requests
* Batching support with typescript defs
* Remove unused hook
* Prevent multiple fragment updates
* Only use batch route if detected
* Correct var name
* Move nonce check to validate_callback so it runs before requests are completed
* remove unused imports
* updateCartFragments function as const
* Add phpunit tests for batching functionality
* Reduce batch delay
* increase timeout
* Remove unused fixtures
* Update package-lock.json
* Update product-search fixture and snapshot
* Ensure the product is selected before continuing with the test.
This clicks the test at least once, or at most thrice to ensure it is checked before trying to evaluate the rest of the test.
* Revert "Remove unused fixtures"
This reverts commit e4a4e11b72c6723341d60391bd9cb9cc4197efaf.
* Look for button with aria-label: 'Toggle block inserter'
* Revert "Look for button with aria-label: 'Toggle block inserter'"
This reverts commit a25ea8d9abafead372ef24b2feb92ff58bd95cea.
* Update @wordpress/e2e-test-utils to 5.1.2
* Check for existence of add block button
* Add initial e2e tests to Checkout block frontend
* Fix comment format
* Scroll to payment methods before checking if they are clickable
* Typos
* Implement caching in getBlockPagePermalink to improve e2e test performance
* Revert "Typos"
This reverts commit 1b544276056084f73d5bcdfa391d5438590e4782.
* Simplify product price definitions
* Move scrollTo function to utils
* Strip tags that are added to notices
* Add test to ensure HTML is stripped by convert_notices_to_exceptions
* Test function directly, rather than through validate_cart_items
* Apply correct formatting to tests/php/StoreApi/Utilities/NoticeHandler.php
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add cartUpdate middleware
* Include timestamp for when cart data was generated
* Add getCartFromApi action
* Check whether cart can be hydrated or needs to be fetched from API
* Add cartDataIsStale action and remove getCartFromApi action
* Add isCartDataStale selector
* Don't load cart until staleness check is complete
* Add comment to ease worry about locaStorage execution
* Correct doc block and fix typographical error
* Cater for lastCartUpdate or the timestamp being undefined
* Include @woocommerce/api and @woocommerce/e2e-utils
* Add getNormalPagePermalink test utility
This will allow us to get the permalink of a "normal" page, i.e. one that is not using the block editor.
* Add getBlockPagePermalink test utility
This will get the permalink for a page using the Block editor.
* Emit action to update cart staleness in all execution paths
* Add visitPostOfType function
This will allow us to visit the editor page for a post based on its name and post type.
* Add functions to get permalinks from editor pages
* Add front-end tests for cart
* Update package-lock.json
* Create local function to ensure the page permalink is visible
* Change functions for getting permalinks
They were often failing for unknown reasons, these _somehow_ make them more stable.
* Add logging for GitHub actions
* Add more logging for tests
* Add more logging for tests
* Add more logging for tests
* Wait for networkidle on back
* Remove logging except timestamp
* Wait for timestamp to be added to localStorage
* Split tests to make runs slightly shorter
* Wait for add to cart request before continuing test
* Fix formatting in cart.test.js
* Rename cartDataStale to setIsCartDataStale
* Create constant for localStorage timestamp name
* Rename cartDataIsStale to isCartDataStale
This is for consistency, the action to change this is called setIsCartDataStale - I think this reads better.
* Use cleaner logic when determining if the cart should render or fetch
* Change docblock for isCartDataStale selector
* Remove boolean cast from SET_IS_CART_DATA_STALE reducer
* Set longer timeouts for frontend cart tests
* Enclose cart staleness checks in condition/prevent unnecessary execution
* Remove unnecessary boolean cast from selector
* Use constant for local storage key in tests
* Use new localstorage key in tests. cant access constants in page context
* Add tsconfig to components directory and include it as project
* Add @types/classnames package
* Migrate Label component to TSX
* Remove unused imports from Label component
* fix package-lock.json
It was generated with npm 7 and we don’t support that yet (and that update should be done in a separate pull)
* Add interface for LabelProps and implement.
Also:
- import `Fragment` from @wordpress/element.
- import `HTMLAttributes` explicitly as a type from react (@types/wordpress__element doesn’t export this interface).
* fix jest configuration
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Add new exceptions for out of stock scenarios
These are needed to differentiate between the different stock validation errors, and so we can create the correct error message.
* Catch new out of stock exceptions when checking the cart for errors
This is so we can get the cart sent back to the client, if we don't catch these, then the route will just return a 500 error and crash.
* Add ArrayUtils class
This will contain methods used to operate on arrays that don't fit anywhere else.
* Handle the case in Checkout where the error is already a WP_Error
This will happen when the cart fails validation.
* Handle StockAvailabilityException in AbstractRoute
This will happen when an item or number of items in the cart are out of stock/insufficient stock.
* Throw exceptions for each type of invalid stock in validate_cart_items
This will allow us to create an error message for each type of violation to display to the user.
* Display additional error notices returned by the API
* Fix wording when throwing exceptions relating to stock
* Handle TooManyInCartException in CartController
* Abstract the merging of cart, status, and additional data into new fn
This allows us to simplify the way errors are returned from the API. The reason we have to add all of the data at once is because of how WP_Error works with the additional data, if there is already existing data in a WP_Error object, it gets moved into additional_data. By adding all of the data in one place, we stop this from happening. Also since we're only adding status and/or cart explicitly, it makes sense to just do it in one place.
* Add get_route_error_response_from_object method
This is so we can differentiate between a string and WP_Error object.
* Remove unnecessary slashes from WP_Error instantiation
* Add option to enclose each item in quotes in natural_language_join
* Abstract adding error messages to error object into single function
A lot of code was repeated, so doing this cuts down on that and ensures any changes only need to be made in one place.
* Create new parent exception for each type of out of stock exception
This is so we don't have to repeat code inside each different exception and we can simply inherit StockAvailabilityException.
* Catch the generic StockAvailabilityException in get_cart_item_errors
* No longer recalculate totals in validate function
It is not needed, the totals are recalculated elsewhere. This call was superfluous.
* Reduce nesting, and only throw exception if error object has errors
* Improve comment on get_route_error_response_from_object method
* Fix nesting when throwing the InvalidStockLevelsInCartException
* Catch errors during cart validation
* Add get_error_message_for_stock_exception_type function
This will be used to get an error message depending on the type of extension, and whether the plural form, or singular form is needed. This abstraction is better because the code is used in more than one place in the API.
* Use error message generation function instead of creating errors individually
* Use specific error codes for each type of error & fix PHPDoc
Now the stock_exceptions_to_wp_errors function will return an array of WP_Errors this is better as the client needs a distinct error code to display and replace notices.
* No longer remove items from cart or modify quantity if there is an error
* Return the WP_Error from RouteException or all Stock WP_Errors
* Fix error in PHPDoc
* No longer necessary to add get_cart_item_errors into an array
This is because the method always returns an array now.
* Rename variables in get_cart_item_errors to be more descriptive
* Improve PHPDoc on get_cart_item_errors
* Replace underscores with hyphens in error code
* Only return WP_Errors that have an actual error in them
* Add unit test for ensure the cart errors relating to stock are handled
* Fix typo in comment
* Use optional chaining to add errors to cart
* Pass get_country_locale via assets
* Create helper to prepare and merge address fields
* Use new helper in address form
* Only pass field overrides now that fields are merged
* Fixc configs and remove lodash usage
* Prevent formatting of empty postcodes to suppress api error
* prevent memo on rerender
* Conitonal enqueue of locale data
* define index in increments of 10
* remove address-form
* circ deps changes
* Workaround for core data issue
* fix test
* remove prepareAddressFields export
* Remove old comment
* object from.entries polyfil
* Revert "object from.entries polyfil"
This reverts commit ba343adcf5fd2f843b225aebe340cce9b664c851.
* replace fromentries
* fix final fromentries
* Expose schemas
* Accept strings for select shipping rate
* strings are allowed
* Refactor shipping package to hold it's own state
* Add extension data to cart hook
* Progress but state is broken
* Move state back to hook
* Progress but state is broken
* use shipping hook updates
* Fix re-render issue
* hide x1
* Shipping slot fill
* Working slot fills
* Do not export package
* Update extend usage in unit tests
* update mock test data
* Package per slotfill
* Resolved merge conflicts
* Update assets/js/blocks/cart-checkout/subscriptions-integration.js
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* rename slot
* deriveSelectedRates return doc
* useCallback in throwError
* final class ExtendRestApi
* spacing
* Move shipping rate selection to package level
* remove const for counts
* Remove schemas from extend
* unused use
* move to a single fill for packages
* add todos
* move subs code
* fix extra extensions
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Add protection around mock queries in unit tests.
This adds additional checks before mocking wc_get_orders query results to prevent overriding refunds query. This is needed with WC core 4.9 since it does an addtional wc_get_orders query to preload and hydrate cache for refunds in order to improve performance.
* update jetpack autoloader to 2.7.1
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* add plugin area
* add invisible errorBoundary
* introduce slot
* change name to OrderMeta
* fix rebase
* wip
* create checkout file
* Import ExperimentalOrderMeta from @woocommerce/checkout
* Rename wc-checkout-packages handle to wc-blocks-checkout
* Only import wc-blocks-checkout in the feature plugin
* Move checkout package to packages folder
* Add @woocommerce/blocks-checkout to tsconfig
* Move TotalsItem to @woocommerce/checkout
* Use Fragment short syntax
* Remove example code
* Honor renderError prop in BlockErrorBoundary
* Rename error boundary
* Add example code
This reverts commit 9b6af7178cbef05589779ef7f5a750d53e7fc8cf.
* Revert "Add example code"
This reverts commit 2f50349692f53c5bb143516365eee7a98d580dfd.
* Add @woocommerce/blocks-checkout to jest config
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Create end-to-end-tests.yml for E2E testing action
* Change actions to run on push instead of PR
* Install libstdc++-4.9-dev on E2E tests action
* Add correct apt repository for libstc++
* Reconfigure apt-get commands for installing libstdc++
* Remove accidental inclusion of Travis config from E2E tests action
* Install libkrb5-dev as part of e2e test action
* Run apt commands as sudo
* Install gutenberg plugin and e2e testutils
* Add environment variables to E2E tests
* Rename action and add further config for composer and wp-env
* Rename workflow
* Add jobs for WP 5.6, 5.5, and 5.4
* Fix YML indentation
* Apply 767 permissions to wp-env directory
* Run chmod as sudo
* Comment 5.6 and 5.6 with GB out to test 5.4 more easily
* Remove WP install job, since it should run on each step
* Change order of wp-env start and chmod
* Reorder commands for 5.4 job
* Try running 5.4 tests in isolation
* Reenable tests for all WP versions
* Move commands out of bash script into a series of commands
* Fix indentation on 5.5 job
* Re-enable libkrb5-dev install
* Clean wp-env before each run & upgrade wp-env to 3.0.0
* Update lock file for wp-env@3.0.0
* Reorder wp-env start and clean commands
* Reorder wp-env permissions commands
* Reorder wp-env permissions setup for all jobs
* Reorder wp-env permissions setup for 5.5 and 5.4
* Ensure correct order for env setup and flush permalinks twice
* Update jest snapshots
* Remove rewrite flush command from yml
* Remove npm build from every step and try it just at the start
* Set correct e2e build script
* Add jobs for PHP 8
* Specify PHP 8 minor version
* Run PHP 8 jobs first
* Remove PHP 8 jobs
* Add JS Unit tests job
* Remove js-unit-tests.js workflow
* Remove composer install from every step, add it to its own step
* Cache composer files
* Bust npm cache to test nodegit
* Rename npm cache
* Renove npm cache entirely
* Revert "Renove npm cache entirely"
This reverts commit d6fac6a6ebd9162e48f64daaa8c971320756579e.
* Rename npm cache back to how it was
* Fix yml indentation
* Remove echo from composer cache step
* Revert back to composer example
* Add PHP Unit tests to workflow
* Add PHP Unit tests to workflow
* Rename E2E tests workflow and file
* deliberately break e2e and unit tests to test workflow 👺
* fix php test, should see e2e fail
* revert broken e2e test
* Change steps into jobs, rename workflow
* Remove Travis workflow file
* Add all necessary setup steps to each job
* Rename Setup job and remove dependency
* Add individual jobs for each E2E test environment
* Add npm install and build to setup job
* YML syntax fix
* Remove error-causing chmod
* Rename blocks.ini setup step
Fixes a typographical error.
* Get the latest stable version of WooCommerce for PHPUnit testing
* Add PHP8.0 and PHP5.6 Unit tests
* Run composer update for PHP 5.6 and PHP 8.0
* Revert "Run composer update for PHP 5.6 and PHP 8.0"
This reverts commit 4f90522d0b52b7a8b9e896e9c783795be9dc5399.
* Revert "Add PHP8.0 and PHP5.6 Unit tests"
This reverts commit 66e317dec4af6e3a2ac6f78b6efd050e7fc5aa8e.
Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
* use consistent product name `WooCommerce Blocks:
- readme.md title
+ update product vision paragraph
- update references in readme.txt preamble
- update in tests bootstrap message
* add WCCOM/docs links front & centre in readme for convenience
* Trim input values before validation on Checkout
* Fixes required field checking at schema level
* Require country during checkout and ensure values are formatted
* Add handling for rest_invalid_param messages
* Remove prepare_address_fields - handled by schema
* Add address validation to OrderController
* Implement address validation
* Error errors from all endpoints more gracefully
* update non-true description
* required prop
* Update tests
* Fix equalityFn so updates are triggered when address changes
* Remove debounce so fields update if context changes
* Update src/StoreApi/Schemas/AbstractAddressSchema.php
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Add missing wp_unslash
* Validate allowed countries should block checkout if no countries are allowed
* Type in locale variable
* Update assets/js/base/utils/errors.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Fix validator calls
* Remove refererence
* Restore onChange order
* eslint fix
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>