Commit Graph

62785 Commits

Author SHA1 Message Date
Damián Suárez f1236696d9
[Product Block Editor]: use Textarea block in the variation description field (#44151)
* use text-area for variation desctiption field

* changelog

* tweak // Translators string

* use var to define textarea border color

* remove optional from description label
2024-02-02 15:50:36 -04:00
Jonathan Lane f93dcc292c
Misc e2e test fixes (#44325)
* Change local workers to 1

* Add helpers for adding shipping

* Add shipping zone before order

* Fix tax assertion

* Fix assertion

* Tightened up locators

* Dismiss tour if visible

* Back to function

* Update tax label

* Enable shipping

* Update locator

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-02-02 10:17:32 -08:00
Thomas Roberts 8ac959f4e7
[Experimental] Prevent string-based sanitization on non-string field types in additional checkout fields (#43999)
Co-authored-by: github-actions <github-actions@github.com>
2024-02-02 10:16:02 -08:00
Brent MacKinnon 16f2f9024a
Adjusting internal links within docs folder (#44288)
* Adjusting internal links within docs folder

* Update docs-manifest.json

* Fix linting + update manifest

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-02-02 15:57:18 +00:00
Luigi Teschio 5937b3dec1
CYS - Core: Font Library: disable the installation of the fonts (#44311)
* avoid crash when Gutenberg is not installed

* add issue link

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-02 16:34:33 +01:00
Álvaro Thomas 5fd4176ad0
[e2e tests] Check email for completed order (#44186)
* Add completed order email test

Add test structure to verify completed order email arrival and content

* Verify Email JSON Content

Parse email content in JSON format

* Record email content in JSON

Record email content in JSON

* Update emails completed order checks

Added checks to verify the content of completed order's emails

* Add changefile(s) from automation for the following project(s): woocommerce

* Update email content const & remove duplicated test

Updated with a new const to record email content const and removed duplicated assertion.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-02 16:13:16 +01:00
nigeljamesstevenson aa349b31a7
Update test-assistant-issue-review.yml 2024-02-02 14:17:42 +00:00
nigeljamesstevenson 40921d457d
Update test-assistant-issue-review.yml 2024-02-02 14:17:18 +00:00
nigeljamesstevenson 7c466218aa
Create test-assistant-issue-review.yml 2024-02-02 14:00:25 +00:00
Maikel Perez eaa791f7da
Hide Downloads section under Toggle for product variations (#44152)
* Create DownloadableProductTrait for common downloadable blocks creation

* Use DownloadableProductTrait in SimpleProductTemplate

* Use DownloadableProductTrait in ProductVariationTemplate

* Remeber downloadable files in product variations

* Add changelog file

* Fix php linter error

* Unlink downloads and downloadable product props so they can be managed separately

* Remove invalid margin bottom from the uploader label

* Add changelog file
2024-02-02 10:04:42 -03:00
github-actions[bot] f383284ba6
Delete changelog files based on PR 44207 (#44302)
Delete changelog files for 44207

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-02 12:31:53 +01:00
github-actions[bot] 11daa0d5ee
Delete changelog files based on PR 44178 (#44300)
Delete changelog files for 44178

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-02 11:45:54 +01:00
github-actions[bot] d7a294cb32
Delete changelog files based on PR 44174 (#44293)
Delete changelog files for 44174

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-02-02 09:58:46 +01:00
Jorge A. Torres ececdf0c1b
Add background HPOS cleanup process (#43293)
* Make legacy data cleanup more performant

* Add legacy data cleanup processor

* Make legacy cleanup available in the UI

* Add some validation around data synchronizer / data cleanup settings

* Add some error handling

* Add changelog

* Make CI happy

* Improve option handling

* Add unit tests

* Partially revert “real time” cleanup

* Re-schedule cleanup on ‘shutdown’ if necessary

* Revert CSS changes for HPOS settings screen

* Revert JS changes for HPOS settings screen

* Allow tools to display a status text

* Move order cleanup to Tools

* PHPCS fixes

* Extend bail early protection to other batch processing functions

* Log and stop cleanup when a full batch fails

* Make PHPCS happy
2024-02-02 12:09:08 +05:30
Manish Menaria 1d8007b822
Product Collection: Return to top after page change (#43817)
* Initial working version

* Update scrolling behavior in product collection block frontend

This commit updates the scrolling behavior in the product collection block's frontend script.

Previously, the code focused on the first anchor or button within a product collection block. This approach was taken to maintain accessibility and ensure that the focused element was scrolled into view. However, this behavior has been changed to improve the user experience.

The updated code now directly scrolls to the first product in the collection. This is achieved by selecting the product using a new selector that targets the `.wc-block-product` class within the `.wc-block-product-template` of the specified `data-wc-navigation-id`. Once the product is selected, the `scrollIntoView` method is used with smooth behavior and start block alignment, offering a more visually appealing scroll effect.

This change enhances the user experience by smoothly directing attention to the beginning of the product collection, making it easier for users to browse products.

* Remove code related to animation

* Fix the issue related to pagination block rendering

- I have improved the code by breaking it into smaller functions
- Added unique `data-wc-key` to each anchor tag

* Enhance Product Collection Block with Interactive Prefetching

* Refine Prefetch Logic & other improvements

This commit further refines the prefetch logic and interactivity in the Product Collection block. It focuses on enhancing code clarity and improving the prefetch behavior based on user interactions.

Key changes include:
1. Renamed 'isPrefetchNextAndPreviousLink' to 'isPrefetchNextOrPreviousLink' in ProductCollectionStoreContext for better readability and accuracy.
2. Modified the scrollToFirstProductIfNotVisible function to accept a wcNavigationId as a parameter instead of a reference
3. Introduced checks for the existence of wcNavigationId in scrollToFirstProductIfNotVisible to prevent unnecessary executions.
4. Updated comments throughout frontend.tsx for enhanced clarity, explaining the prefetch logic and its triggers in detail.
5. Adjusted the logic in the navigate and prefetch functions to align with the new context structure and prefetch strategy.
6. In ProductCollection.php, updated data attributes to align with the revised prefetch strategy.
7. Refined the attribute setting in process_pagination_links function to correctly implement the updated interactivity and prefetch logic.

These changes aim to optimize the prefetch functionality, reduce unnecessary prefetching on initial page load, and ensure a smoother and more efficient navigation experience within the Product Collection block.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Improve comments

* Use wp_json_encode for data-wc-interactive attribute

This commit updates the `ProductCollection` class to use `wp_json_encode` for setting the `data-wc-interactive` attribute value. Previously, the attribute value was hardcoded as a JSON string. Now, by utilizing `wp_json_encode`, we ensure the JSON encoding is handled correctly by WordPress standards, enhancing readability and maintainability of the code.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-02 12:07:29 +05:30
Sam Seay 6da45f6bed
[Experimental] Add e2e tests for the new active filter block (#44190) 2024-02-02 15:08:01 +13:00
Brent MacKinnon 2249b7a4c5
moving webhooks doc (#44098)
* moving webhooks doc

* Move webhooks doc to building a woo store

It's not really extension development related

* Update docs manifest

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-02-01 19:56:34 +00:00
Barry Hughes ded33b7049
Update JS Cookie library to v3.0.5. (#43686) 2024-02-01 11:36:12 -08:00
Brent MacKinnon 1bd5ab738a
updating link on wccli readme (#44100)
* updating link on wccli readme

* Fix links that were incorrect

* Update docs manifest

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-02-01 19:10:39 +00:00
Luigi Teschio ae1503f588
CYS - AI flow: fix regression - no fonts visible (#44280)
* CYS - AI flow: fix regression - no fonts visible

* Add changefile(s) from automation for the following project(s): woocommerce

* Trigger Build

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 18:44:28 +00:00
Paul Sealock 33c2c0c0ca
Package Release: Update usage of NPM auth token (#44215)
* update .npmrc

* try project specific .npmrc

* try whoami

* try package .npmrc

* whitespace

* try in tool

* try adding line

* set auth explicitly

* test whoami

* does this work?

* add script call
2024-02-01 13:23:26 -04:00
Luigi Teschio e0972ef6ea
[WIP] CYS - Core: add integration with the font library (#44004)
* CYS - Core: add integration with the font library

* install font only when necessary

* refactor logic

* add try catch

* renaming font

* refactor some code

* refactor some logic

* Add changefile(s) from automation for the following project(s): woocommerce

* remove not used import

* avoid mutability

* improve performance

* update name variable

* fix naming

* fix endpoints after font collection rest controller improvements

* use promise.all into the map

* improve performance

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 17:16:12 +00:00
Karol Manijak 84f2de633d
Fix incorrect product data displayed in Product Collection in context of Single Product block (#44123)
* Initial approach to fix incorrect product data displayed in Product Collection in context of Single Product block

* Remove the BlockCOntextProvider

* Add Block context for title and summary

* Add changelog

* Improve typing

* Add E2E test with Product Collection inside Single Product block

* Improve insertBLock function description

* Make productPrices selector in Product Collectionmore specific

* Extract components props into a types
2024-02-01 17:55:38 +01:00
Jacklyn Biggin 402b9bf096
DOCS - Fix 404 link to logging page (#44275)
* Fix broken link to debugging doc

* Update docs manifest
2024-02-01 16:36:03 +00:00
Nathan Silveira 862383e1eb
Fix invalid value being propagated on change event for number input (#44195) 2024-02-01 12:49:12 -03:00
Maikel Perez 861cc7cc02
Add common options to the variations options empty state (#44001)
* Always show Variation options and Variations sections within the Variations tab

* Remove woocommerce/product-variations-fields block since it's not needed anymore

* Create ProductTShirt image for variation options empty state

* Add renderCustomEmptyState to the attribute control component to be able to set a not default empty state

* Render a custom empty state for variation options

* Adds defaultSearch prop to NewAttributeModal so it can be used to start searching right after the modal is shown

* Let the empty state adds an attribute that matches a given text

* Add changelog files

* Fix linter errors
2024-02-01 11:18:23 -03:00
Luigi Teschio 42a2d00cba
CYS - Core - Check the Font Library availability (#44206)
* Ensure that the Font Library is available

* Add changefile(s) from automation for the following project(s): woocommerce

* fix iframe issue

* improve comment

* don't return any object

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 11:30:50 +00:00
Thomas Roberts 1130380f73
[Experimental] Allow Additional Information block to be moved but not removed (#44193)
Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 02:58:05 -08:00
Thomas Roberts 77d2dd9453
Make combobox suggestions have same border as main input (#44183)
Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 02:57:57 -08:00
Albert Juhé Lluveras d936e4afee
Merge Checkout Header and Mini-Cart template parts tests into parameterized test files (#44176)
* Rename block template customization test files

* Move Checkout Header template part tests to parameterized tests

* Make it so 'userText' in tests is different in each template, so prevent false positives

* Move Mini-Cart template part tests to parameterized tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Make sure there are products in cart before going to the Checkout template

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 11:43:33 +01:00
Vedanshu Jain 4c0f7605b3
Fix refund props not updating properly with HPOS (#44214) 2024-02-01 11:38:17 +01:00
Alfredo Sumaran 9bb7cd7b8b
Apply Rector suggestions for PHP 8.1 (#41482)
* Apply Rector suggestions

* Add changefile(s) from automation for the following project(s): woocommerce

* Restore false positive

$missing_tables will always be an array

* Restore false positive.

Rector issue: AddDefaultValueForUndefinedVariableRector.

This time the early return is valid so there’s no need to move the $process_limit assignment to the top.

* Ask if $orders is an array

$orders is used as an array lines below. Add `is_array` just in case the “paginate” param is used which would change $orders to an object.

* Check if variable is array

Simplifies variable check given that they are used as an array lines below.

* Restore code as taxes is always an array

* Restore false positive

In the previous loop the $data variable is being built as an array of arrays. Then $value in this loop will allways be array.

* Restore false positive

get_children’s method. of a WC_Product instance will always return an array.

* Simplify variable check

Ask if varialbe is array since it only can be array or false.

* Restore false positive

WC_Blocks_Utils::get_blocks_from_page() will always return an array.

* Restore false positive

There’s a check asking if $existing_meta_data[ $meta_data->key ] is array.

* Restore false positive

$child_ids will always be an array.

* Restore false positives

WC_Product->get_visible_children() will always return an array.

* Restore false positives

WC_Product->get_children() will always return an array.

* Restore false positive

WC_Product->get_visible_children() will always return an array.

* Restore false positive

WC_Order->get_items() will always return an array.

* Restore false positive

The get_matching_rates private method will always return an array.

Updated the @return declaration to be an array instead of boolean.

* Remove unnecessary array type casting.

* Restore false positive

$this->get_children() will always return an array.

* Fix lint issues

* Remove unnecessary default assignment

* Remove unnecessary is_array check

* Remove unnecessary is_array check

* Remove unnecessary is_array check

* Change default value from null to false

* Remove unnecessary is_array check

* Update changelog entry

* Update changelog entry

* Update changelog entry

* Add changefile(s) from automation for the following project(s): woocommerce

* Update changelog entry

* Use self for consistency

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-01 10:06:12 +00:00
Christopher Allford 7f556d07b2
Removed Unnecessary `@woocommerce/plugin-woocommerce` Asset Copy Caching (#44234) 2024-01-31 16:12:00 -08:00
Jonathan Lane 9c00c2676b
Improve flaky e2e tests (#44208)
* Fix flaky guest checkout tests

* Removed a couple of extra assertions (not needed)

* Enable payment gateway

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-31 10:08:11 -08:00
Veljko V 7c4dca8348
Rename and move test Cart & Checkout Tax Calculation out of isolation and update some locators to use getBy (#44115)
* Move test out of isolation and update it

* Add changelog file
2024-01-31 08:31:33 -08:00
Adrian Moldovan 62101246ca
[e2e tests] Add downloadable product test (#44112) 2024-01-31 17:51:14 +02:00
Karol Manijak a164c8afa9
Fix CI Lint errors (#44228)
* Fix linter issues

* Add changelog
2024-01-31 16:12:30 +01:00
Cem Ünalan f2b77b1ada
Marketplace: Fix the bug hiding connection warning (#44207)
* Marketplace: Fix the bug hiding connection hiding

Actually, this bug causes all modal state to be lost. But since we
check the connection only when the page loads, on a subsequent tries, we can 't show the connection warning.

* Marketplace: update documentation and typos

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-31 12:50:47 +03:00
Paulo Arromba 1e815751ab
Fix/31582 special characters in password on checkout page lead to not working account (#43777)
* Fix registration during checkout

* Added changelog.

* Moved changelog.

* Added correct spacing

* Move password slashing into WC_Checkout:get_posted_data()

* Lint fix
2024-01-31 09:36:58 +00:00
Niels Lange c704ae2cab
Migrate coupon- and shipping-related tests to Playwright (#44108)
* Migrate coupon- and shipping-related tests

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix prettier issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-31 01:23:09 -08:00
github-actions[bot] 495bf4eeb2
Prepare Packages for Release (#44211)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-01-31 18:58:06 +13:00
Paul Sealock aed0d879ed
Package Release: Fix missing dependencies (#44168) 2024-01-31 17:22:26 +13:00
Jonathan Lane c96f68e88d
Adds tests to monitor number of JS files included in pages (#44046)
* Adds tests to monitor number of JS files included in pages

* Changelog

* Update file counts

* Changed assertion to LTE

* Revise file counts

* Update numbers

* Increased numbers

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-30 14:23:33 -08:00
Fernando Marichal e703b3d947
Add slotFills for header items (#43687)
* Add slotFills for header items

* Refactor plugin-header-items

* Add changelog

* Remove order prop

* Fix lint

* Change constant name

* Rename constant

* Add callback to fills

* Make icon not required

* Add fallback plugin
2024-01-30 16:58:20 -03:00
Damián Suárez 05aa24df0b
[Product Block Editor]: introduce note attribute to Label component (#44198)
* do not use createInterpolateElement

* introduce `note` to Label component

* changelog
2024-01-30 16:40:30 -03:00
Brent MacKinnon ad7ae08d77
adjusting internal links for the docs front-end (#44101)
* adjusting a link for the docs front-end

* fixing some relative urls

* fixing relatieve links

* Updated manifest to include links

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-01-30 13:32:54 -05:00
Nathan Silveira e0728e6d11
Fix undefined meta_data on slow connections (#44197) 2024-01-30 18:08:08 +00:00
Thomas Roberts d0b0c4c90b
Set `$plain_text` to false in new email addresses hook (#44178)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-30 10:00:19 -08:00
Mike Jolley 610022150e
Change specificity of date picker rules (#44174)
* Change specificity of date picker rules

* changelog
2024-01-30 17:06:05 +00:00
Damián Suárez 20fe832f8b
[Product Block Editor]: fix e2e test that happens in the text-area block (#44184)
* add components-summary-content class to rich text

* changelog
2024-01-30 12:33:52 -03:00