Commit Graph

19587 Commits

Author SHA1 Message Date
Michael Pretty e7647333a1
Fix bug when searching orders with a term starting with d, s, or f (#43085)
* Don't prepare the order search $meta_sub_query twice.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-01-03 11:49:17 +01:00
Sam Seay 187780905f
[Experimental] Use CheckboxList component in interactivity attribute filter (#43217) 2024-01-03 22:58:57 +13:00
Sam Seay 161bf51bd3
[Experimental] Allow overriding placeholder in interactivity Dropdown::render (#43211)
* add: multiple select support to attribute dropdown
* fix: remove active filter from dropdown
* chore: remove unused extractBuiltinColor

---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-01-03 20:52:45 +13:00
Tung Du 97e4c55aeb
[Experimental] Rating Filter block: fix wrong import path (#43198) 2024-01-03 09:31:50 +07:00
Alexandre Lara 44e4a75419
[E2E Tests] Product Gallery > Thumbnails block: Refactor code to remove unnecessary wait for timeout (#43180)
* Refactor code to remove unnecessary wait for timeout

* Add changelog
2024-01-02 16:29:37 -03:00
Alexandre Lara e968c329c6
Add e2e tests for image transition in Product Gallery block (#43095)
* Add e2e tests for image transition in Product Gallery block

* Create e2e tests for the Product Gallery block when it is inside the pop-up

* Add changelog

* Remove unnecessary lodash dependency import
2024-01-02 16:19:28 -03:00
Alba Rincón f9cdce486a
Increase Pexels product images width to 400px to have a better resolution (#43174)
* Increase product images width to 400 to have a better resolution

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-02 13:59:38 +01:00
Sam Seay 5de0f4a274
[Experimental] Refactor the interactivity dropdown to remove dependence on FormTokenField (#43183)
* Also fix https://github.com/woocommerce/woocommerce/issues/43154
2024-01-02 17:13:27 +13:00
github-actions[bot] e43eb1dcab
Delete changelog files based on PR 43177 (#43203)
Delete changelog files for 43177

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-01 23:05:34 +00:00
Sam Seay 7619549091
Check if WOOCOMMERCE_BLOCKS_PHASE is set inside build-zip script. (#43169) 2024-01-01 17:20:01 +13:00
Tung Du bd9ddc830a
[Experimental] Add: QueryFilters class to calculate filter data for product queries (#42811)
* add: query filters count class

* chore: method comments

* refactor: rename class to QueryFilters

* fix: price filter count

* fix: price filter url

* chore: remove unnecessary transformation

* chore: remove unused meta query filter

* chore: put public methods on the top of the class

* fix: passing $wp_query

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

* fix: stock query clause

* fix: handle and query type for attribute filter

* fix: ensure passing non null value to floor/ceil

* [Experimental] Collection Filter blocks: ensure the namespace is always rendered (#43112)

* fix: ensure the namespace is always rendered

* fix: target only wc queries

* fix: properly reset part of query to make new filter blocks work with Product Collection block
2024-01-01 10:18:50 +07:00
Albert Juhé Lluveras c58b0cf936
Fix error when adding to cart from the Product Collection block if Google Analytics plugin is enabled (II) (#43177)
* Revert "Trigger event `experimental__woocommerce_blocks-cart-add-item` in the SSR Product Button vis Interactivity API (#42946)"

This reverts commit 4fec136da1.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-29 17:23:35 +01:00
Alexandre Lara 4efd2123a3
[Docs] Update links from WooCommerce.com to Woo.com for the Woo Blocks documentation (#43055)
* Update woocommerce.com URLs in documentation and code files

* Add changelog

* Fix github repository link in extend-rest-api-add-custom-fields.md

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

* Add github reporter (#42974)

* Add github reporter

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>

* Fix product task redirect to support grouped and external products (#43051)

* Rearrange product redirection logic to better accept grouped and external produc types

* Add changelog

* Modify feedback modal actions (#43005)

* Adapt feedback modal actions

* Add changelogs

* Modify comments

* Fix tests

* Fix test

* Update class-wc-gateway-bacs.php (#43054)

* Update class-wc-gateway-bacs.php

Fix typo in textdomain

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* [Product Block Editor]: Add `Linked product` tab (#43009)

* add linked-products to group IDs

* add Linked Products tab

* tweak hideConditions condition

* changelog

* fix typo in doc comment

* Introduce a product type selection within the new experience (#41823)

* Create a relation between the product type and the product block template

* Add 'patterns' to name the kind of products that can be created for a specific template

* Resolve template using its id as a template query param

* Rename ProductEditPattern to ProductTemplate

* Rename get_patterns hook to woocommerce_product_editor_get_product_templates

* Return the list of templates to the client

* Set layout template events as array

* Register the layout template based on the product template or the post type in case of product variations

* Registering non supported product types

* Create and register the woocommerce/product-details-section-description block

* Add the product type to the section description

* Create product type selector

* Fix menu item style

* Highlight selected menu item

* Set the selected product template

* Set product template title to lowercase in the content description

* Rename blocks by blockTemplates under the AbstractBlockTemplate class

* Rename to woocommerce_product_editor_product_templates filter

* Remove product_template_ prefix from the supported_product_types map

* Rename get_formatted to to_JSON and convert the props to client side like

* Refactor get_product_templates

* Fix icon resolution

* Add a confirmation modal for unsupported product templates

* Add changelog files

* Remove product types using for testing

* Fix redirection when changing to a non supported product template

* Set the change button state to busy when it is saving the product

* Fix php linter errors

* Fix rebase conflict

* Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace

* Add the to_json definition to the BlockTemplateInterface

* Create default product template by custom product type if it does not have a template associated yet

* Fix some comments and product template creation validation

* Add support to load the product template icon from an external resource

* Fix php linter

* Fix the changelog description

* [Experimental] Interactivity Dropdown multi-select mode, ratings filter and introduce each directive (#42981)


---------
Co-authored-by: David Arenas <david.arenas@automattic.com>

* Introduce the transient files engine (#42877)

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

* Change marketplace install API request to POST instead of GET (#43033)

* Change marketplace install API to using POST instead of GET
* Fix linting error
* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>

* Prep trunk for 8.6 cycle (#43021)

Prep trunk for 8.6 cycle with version bump to 8.6.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* Add Playwright tests for All Reviews, Reviews by Product and Reviews by Category blocks (#42903)

* Remove Reviews blocks Puppeteer tests

* Minor code cleanup

* Typos

* Create publishAndVisitPost() editor util

* Fix subcategories when importing products in Playwright and add reviews

* Add Reviews blocks tests in Playwright

* More typos

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

* Create a 'reviews' object in data.ts so we can store reviews data in one single place

* Update test so instead of creating a new post in each test, we go to the already-created post

* Add source comments to reviews data to match it with the script

---------

Co-authored-by: github-actions <github-actions@github.com>

* Release: Remove 8.5 change files (#43022)

Delete changelog files from 8.5 release

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>

* Delete changelog files based on PR 43033 (#43079)

Delete changelog files for 43033

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* Delete changelog files based on PR 43051 (#43081)

Delete changelog files for 43051

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* Interactive Price Filter: use `context` instead of `state` (#42980)

* feat: use context instead of state

* fix: temporary move the context to inner element for diffing to work

* fix: update context before navigation for optimistic UI

* Load google analytics gtag script asynchronously in WooCommerce Blocks (#43040)

Co-authored-by: github-actions <github-actions@github.com>

* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build (#43074)

* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Revert "Fix schedule sales error" (#43094)

Revert "Fix schedule sales error (#42700)"

This reverts commit 9b800aa179.

* [Product Block Editor]: add Linked product sections. First approach. (#43013)

* add Linked products, Upsell section

* changelog

* add Cross-lens section

* add links to the Upsell sections

* changelog

* fix lint issues

* fix lint issus

* fix linting issue :-|

* check whether the linked product group is defined

* [Product Block Editor]: introduce ShoppingBags component (#43042)

* add ShoppingBags component

* Add ShoppingBag story

* changelog

* Fix: Collection data being leaked between Collection Filters blocks (#43044)

* fix: CYS - change heading color (#43076)

* fix: CYS - change heading color

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

* Delete changelog files based on PR 43074 (#43118)

Delete changelog files for 43074

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* [Product Block Editor]: fix feature flag to hide the Linked products (#43119)

* fix flag to hide/show product editor

* changelog

* Add changelog

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: louwie17 <lourensschep@gmail.com>
Co-authored-by: Fernando Marichal <fernando.marichal@automattic.com>
Co-authored-by: Marc Guay <marc.guay@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Damián Suárez <rdsuarez@gmail.com>
Co-authored-by: Maikel David Pérez Gómez <maikel.perez@automattic.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: Kyle Nel <22053773+kdevnel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-12-29 12:28:11 -03:00
Manish Menaria 1ed5d0872a
Fix: Enable Pagination Block Visibility in Product Collection Block (#43132)
* Fix: Enable Pagination Block Visibility in Product Collection Block

This commit resolves an issue where the Pagination block was not visible in the block insertor within the Product Collection block.

- The core query pagination block name, initially hardcoded, is now declared as a constant `coreQueryPaginationBlockName` in `constants.ts`. This change not only improves code readability but also ensures consistency in using the block name across different files.

- In `index.tsx`, the `addProductCollectionBlockToParentOfPaginationBlock` utility function from `utils.tsx` is imported and executed. This function plays a crucial role in the fix. It dynamically adds the Product Collection block to the parent array of the Core Pagination block, ensuring the latter's visibility in the insertor when editing the Product Collection block.

- The utility function employs WordPress hooks and version checks to gracefully handle different WordPress environments. This careful approach maintains backward compatibility while addressing the current issue.

With these changes, merchants can now easily add a Pagination block from the insertor while working on the Product Collection block, enhancing the user experience and functionality.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-29 15:45:29 +05:30
Jorge A. Torres 69a864af67
Update tracks events hooks for HPOS (#42879)
* Update ‘orders_view’ tracks event for HPOS

* Update ‘orders_view_search’ tracks event for HPOS

* Update ‘order_edit_date_created’ tracks event for HPOS

* Update ‘order_edit_add_order’ tracks event for HPOS

* Correctly enqueue order tracking JS scripts when HPOS is active

* Address TS script

* Change add_filter() to add_action()

* Fix tests

* Add changelog

* Fix some linting issues

* Make PHPCS happy

* Better handle deprecating old method

* Fix condition
2023-12-29 08:46:59 +00:00
Manish Menaria 5d5fc57e8c
Fix: migration issues when transitioning from Products (Beta) block to Product Collection block (#43130)
* Update product query block templates with WooCommerce namespace

It modifies the `<wp:post-template>` block in multiple files to include a new attribute: `{"__woocommerceNamespace":"woocommerce/product-query/product-template"}`.

The inclusion of the `__woocommerceNamespace` attribute is a strategic enhancement, ensuring that these block templates are explicitly recognized as part of the WooCommerce namespace.
This fix the issue where migration from Products beta block to Product Collection block doesn't work properly.

* Fix linting error

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-29 12:09:12 +05:30
Jorge A. Torres 9ce04dc807
Add hook to exclude certain properties from HPOS sync/verification (#43123)
Certain order properties (or metadata) are not relevant for HPOS verification. For example, `_edit_lock` which is an ephemeral key. So far we've been hardcoding these keys in various places. This provides a new API to access these keys. It also introduces hook `woocommerce_hpos_sync_ignored_order_props` which allows 3rd party code to add new keys to be ignored by sync/verification code.

Fixes #41907
2023-12-28 10:40:02 -08:00
Sam Seay eabb27c72b
[Experimental] Add block text color support to interactivity filter blocks (#43068)
* [Experimental] Render headings as inner blocks of collection filters (#43109)
2023-12-29 03:06:35 +13:00
Damián Suárez b36023e8aa
[Product Block Editor]: render empty state for the Cross-sells section (#43143)
* introduce cross-sells product field block

* export Cross-sell block

* add Cross-sells block instance into the Cross-sell section

* fix importing image bug

* changelog

* changelog

* remove unexpected console.log instance
2023-12-28 09:06:01 -05:00
Tarun Vijwani 2749cebf7f
E2E tests migration: Backend mini-cart tests to Playwright (#43093)
* Migrate Backend mini-cart tests to Playwright

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-12-28 14:33:53 +04:00
Corey McKrill 718978f840
Logging: QoL improvements to the single file view (#43146)
* Clear line highlight with a click

* Vertically center log file line when selected

* Add changelog file
2023-12-28 09:31:31 +00:00
Niels Lange 8e7c5cca1c
Show rating stars for the cross-sells products (#43069)
* Show rating stars for the cross-sells products

* Fix typo introduced in #43116 (#43148)

* Fix typo introduced in #43116

* Add changefile(s) from automation for the following project(s): @woocommerce/product-editor

---------

Co-authored-by: github-actions <github-actions@github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-28 16:20:07 +07:00
Damián Suárez 35a4f077cf
[Product Block Editor]: render empty state for the Upsells section (#43116)
* Upsells block: scafolding

* export Upsells block

* add Upsells block into the Upsells section

* render empty state for the Upsells section

* iadd hardcoded isEmpty flag

* changelog
2023-12-27 19:40:03 -03:00
Damián Suárez b41ecfe33d
[Product Block Editor]: update the conditions to hide the Cross-sells section (#43140)
* update the conditions to hide Cross-sells section

* changelog

* fix eslint issues
2023-12-27 19:39:16 -03:00
Patricia Hillebrandt de9322fb38
[CYS] Update the neutral color palette to black and white (#43114)
* Update the neutral color palette to black and white.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-27 09:30:08 -03:00
Patricia Hillebrandt 589617a41d
CYS > Update AI-generated site title, image optimizations and updated directory structure (#43086)
* Remove the last business description check to allow repetition.

* Create the new AIContent directory and update the structure and name of the classes.

* Ensure the store title is updated with new AI-generated content if the previous title was also AI-generated.

* Return if the images result in error.

* Update the name of the option for fetching the AI generated site title.

* Introduce the new adjust_image_size method for shared usage between products and patterns.

* Increase the quality of images used in patterns

* Introduce the ContentImageProcessor class.

* Undo PatternsHelper rename

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

* Address lint errors

* Ask AI to summarize the business description if the number of characters provided by the user is bigger than 150 characters.

* Rename the ContentImageProcessor class to ContentProcessor and introduce the new summarize_business_description method.

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-27 08:33:37 -03:00
Karol Manijak 37155abb0c
New flow of adding Product Collection and basic set of Collections (#42696)
* Migrate PR to Core

* Migrate test changes

* Add Custom Collection with inherit query attribute disabled

* Update copy of Product Catalog collection

* Don't choose default active collection in polaceholder and remove highlight

* Remove inherit query option from inspector controls

* Add collection names to Product Catalog and Custom one

* Unify Collection Chooser between Modal and Placeholder

* Bring back util removed by accident

* Replace the translations domain with woocommerce

* Remove leftovers after merge

* Add pagination and no results to Product Catalog and Custom collections

* Revert textdomain change

* Fix lint error

* Add changelog entry

* Change collection label

* Bring back Inherit query from template

* Remove Custom collection and bring back single Product Collection

* Simplify applying collection

* Make sure Inherit query from template is enabled in archive templates by default and disbaled in posts/pages

* Change incorrect Playwright locator

* Add test for Product Catalog inheriting the query in product archive

* Add tests for recommendation collection hiding the predefined filters

* Add reviews to multiple products

* Update expected products in Top Rated

* Remove rating creation in test env and skip undeterministic tests

* Add skip to Best Sellers test

* Update README.md

* Add more keywords to collections, like 'product collection' to recommendation collections

* Rephrase the README note about Collections registration

* Simplify types

* Rename unchangeableFilters to hideControls

* Fix typo in file name

* Remove 'pattern' references from toolbar files

* Replace hardcoded SCSS color with wc variable

* Remove changelog file from different PR

* Move hideControls to Product Collection ayttributes

* Improve responsiveness of columns in Product Collection Placeholder

* Use admin color pallette in Product Collection Placeholder

* Move Inherit query from template to the top of Inspector Controls

* Change the Collection prefix to woocommerce rather than woocommerce-blocks

* Simplify Placeholder and Modal styles
2023-12-27 11:07:27 +01:00
Damián Suárez 300e79ac7f
[Product Block Editor]: fix feature flag to hide the Linked products (#43119)
* fix flag to hide/show product editor

* changelog
2023-12-26 14:14:43 -03:00
github-actions[bot] 0f880ff7a2
Delete changelog files based on PR 43074 (#43118)
Delete changelog files for 43074

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2023-12-26 22:44:02 +08:00
Luigi Teschio 7cb10704ff
fix: CYS - change heading color (#43076)
* fix: CYS - change heading color

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-12-26 09:07:52 -03:00
Tung Du c2cab76069
Fix: Collection data being leaked between Collection Filters blocks (#43044) 2023-12-26 16:13:30 +07:00
Damián Suárez 7be2481381
[Product Block Editor]: add Linked product sections. First approach. (#43013)
* add Linked products, Upsell section

* changelog

* add Cross-lens section

* add links to the Upsell sections

* changelog

* fix lint issues

* fix lint issus

* fix linting issue :-|

* check whether the linked product group is defined
2023-12-22 18:44:44 -03:00
Damián Suárez 7f2b1c42fd
Revert "Fix schedule sales error" (#43094)
Revert "Fix schedule sales error (#42700)"

This reverts commit 9b800aa179.
2023-12-22 18:20:56 -03:00
Luigi Teschio 99aeaff6dd
set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build (#43074)
* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-22 17:43:53 +01:00
Thomas Roberts db17f27f02
Load google analytics gtag script asynchronously in WooCommerce Blocks (#43040)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-22 08:42:11 -08:00
Tung Du 0c5d01a6ac
Interactive Price Filter: use `context` instead of `state` (#42980)
* feat: use context instead of state

* fix: temporary move the context to inner element for diffing to work

* fix: update context before navigation for optimistic UI
2023-12-22 22:05:31 +07:00
github-actions[bot] d14be998f5
Delete changelog files based on PR 43051 (#43081)
Delete changelog files for 43051

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2023-12-22 13:10:20 +01:00
github-actions[bot] 3ff4385e69
Delete changelog files based on PR 43033 (#43079)
Delete changelog files for 43033

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2023-12-22 13:08:07 +01:00
github-actions[bot] 6790d2558e
Release: Remove 8.5 change files (#43022)
Delete changelog files from 8.5 release

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>
2023-12-22 09:52:00 +01:00
Albert Juhé Lluveras 2da7b73e76
Add Playwright tests for All Reviews, Reviews by Product and Reviews by Category blocks (#42903)
* Remove Reviews blocks Puppeteer tests

* Minor code cleanup

* Typos

* Create publishAndVisitPost() editor util

* Fix subcategories when importing products in Playwright and add reviews

* Add Reviews blocks tests in Playwright

* More typos

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

* Create a 'reviews' object in data.ts so we can store reviews data in one single place

* Update test so instead of creating a new post in each test, we go to the already-created post

* Add source comments to reviews data to match it with the script

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-22 09:33:18 +01:00
github-actions[bot] a355346be2
Prep trunk for 8.6 cycle (#43021)
Prep trunk for 8.6 cycle with version bump to 8.6.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2023-12-22 09:27:54 +01:00
Kyle Nel 92e1b932c3
Change marketplace install API request to POST instead of GET (#43033)
* Change marketplace install API to using POST instead of GET
* Fix linting error
* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-22 10:03:11 +02:00
Néstor Soriano a8b0f88bad
Introduce the transient files engine (#42877)
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2023-12-22 08:44:18 +01:00
Sam Seay 3eeeddfdb3
[Experimental] Interactivity Dropdown multi-select mode, ratings filter and introduce each directive (#42981)
---------
Co-authored-by: David Arenas <david.arenas@automattic.com>
2023-12-22 13:34:28 +13:00
Maikel David Pérez Gómez a592a473d3
Introduce a product type selection within the new experience (#41823)
* Create a relation between the product type and the product block template

* Add 'patterns' to name the kind of products that can be created for a specific template

* Resolve template using its id as a template query param

* Rename ProductEditPattern to ProductTemplate

* Rename get_patterns hook to woocommerce_product_editor_get_product_templates

* Return the list of templates to the client

* Set layout template events as array

* Register the layout template based on the product template or the post type in case of product variations

* Registering non supported product types

* Create and register the woocommerce/product-details-section-description block

* Add the product type to the section description

* Create product type selector

* Fix menu item style

* Highlight selected menu item

* Set the selected product template

* Set product template title to lowercase in the content description

* Rename blocks by blockTemplates under the AbstractBlockTemplate class

* Rename to woocommerce_product_editor_product_templates filter

* Remove product_template_ prefix from the supported_product_types map

* Rename get_formatted to to_JSON and convert the props to client side like

* Refactor get_product_templates

* Fix icon resolution

* Add a confirmation modal for unsupported product templates

* Add changelog files

* Remove product types using for testing

* Fix redirection when changing to a non supported product template

* Set the change button state to busy when it is saving the product

* Fix php linter errors

* Fix rebase conflict

* Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace

* Add the to_json definition to the BlockTemplateInterface

* Create default product template by custom product type if it does not have a template associated yet

* Fix some comments and product template creation validation

* Add support to load the product template icon from an external resource

* Fix php linter

* Fix the changelog description
2023-12-21 18:45:31 -05:00
Damián Suárez eac1a460f0
[Product Block Editor]: Add `Linked product` tab (#43009)
* add linked-products to group IDs

* add Linked Products tab

* tweak hideConditions condition

* changelog

* fix typo in doc comment
2023-12-21 16:00:32 -03:00
Marc Guay 65828db266
Update class-wc-gateway-bacs.php (#43054)
* Update class-wc-gateway-bacs.php

Fix typo in textdomain

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 19:54:12 +01:00
louwie17 9182efaaf6
Fix product task redirect to support grouped and external products (#43051)
* Rearrange product redirection logic to better accept grouped and external produc types

* Add changelog
2023-12-21 14:09:00 -04:00
Jonathan Lane a67a1c6efc
Add github reporter (#42974)
* Add github reporter

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2023-12-21 09:07:54 -08:00
Moon dc26c5a8f4
Fix incorrect wpBody margin top value set by TasksReminderBar (#43020)
* Use clientHeight to set the correct marginTop -- height is not a valid property

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 08:43:50 -08:00
Alba Rincón b3db937d3a
CYS - Ensure the offline modal is displayed whenever AI is unavailable (#42949)
* Show the ai offline modal independently from the onboarding tour

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

* Remove log

* Fix tests

* Add customizing parameter to avoid showing the aioffline modal when customizing

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 16:56:22 +01:00
Jaclyn Chen d1a8f91836
Analytics: add `date_type` parameter to override date type option for revenue stats (#42938)
* Add `date_type` parameter to revenue stats API for overriding the date type column.

* Update coding styles.

* Add changelog.

* Validate `date_type` value with strict matching.

* Add test cases for passing a valid/invalid `date_type` parameter.

* Remove extra validation on `date_type` value as it's already validated at the API level.

* Check for each allowed value of `date_type` in the test case.
2023-12-21 09:38:19 -04:00
Paulo Arromba 1219cadf10
Fix/ Count() warning/error on invalid data supplied by the filter `woocommerce_cart_shipping_packages` (#42964)
* Fixed count() warning on invalid data supplied by the filter.

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

* Removed unnecessary if

* Ordered comment to match if-clause
2023-12-21 13:24:39 +00:00
Fernando Marichal 9b800aa179
Fix schedule sales error (#42700)
* Fix schedule sales error

* Add changelog

* Fix lint

* Fix variable product error

* Add clear cache

* Remove sale price fix from data-store-cpt

* Fix comment

* Remove cache cleaning

* Add unit tests

* Fix lint

* Modify get_price
2023-12-21 10:10:22 -03:00
Thomas Shellberg cf52b42e26
Add React Testing Library to the Woo AI plugin. (#42993)
* Add React Testing Library and the simplest of tests to verify tests can be run successfully.
2023-12-21 12:25:08 +01:00
Niels Lange 01ede130aa
Adjust indents of old notice styles (#43031)
* Clean up old notice styles

* Adjust vertical marging for error list items on TT theme

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

* Delete obsolete CSS file

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 17:10:14 +07:00
Tom Cafferkey 505fe17db2
Product Hero Pattern: Fix button alignment (#42913)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 09:31:23 +00:00
Tom Cafferkey a9550d8894
Store API: Add support to query product_variations by attributes (#42983)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-12-21 08:09:06 +00:00
Tom Cafferkey 99fc85ae15
Block Hooks API: Add Tazza theme to the list of allowed themes for Mini Cart auto-insertion (#42900)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 08:08:54 +00:00
Manish Menaria ba4f3d4d29
Add price range filter to Product Collection block (#42858)
* Add price range filter to Product Collection block

This update introduces a price range filter feature to Product Collection. Changes include:

1. Constants Update:
   - Added `priceRange` as undefined in `DEFAULT_QUERY` and `DEFAULT_FILTERS` in `constants.ts`.

2. Style Adjustments:
   - Added CSS for `.wc-block-product-price-range-control` in `editor.scss` to align the input text to the end.

3. Component Integration:
   - In `inspector-controls/index.tsx`, the `PriceRangeControl` component is now imported and integrated.

4. New Components:
   - `PriceTextField.tsx` and `PriceRangeControl/index.tsx` have been created to handle price range inputs in the Product Collection block.

5. Backend Integration:
   - `PriceRange` interface added in `types.ts` for type support.
   - In `ProductCollection.php`, a filter (`add_price_range_filter`) is added to modify the main query based on the price range, including adjustments for tax considerations.

Overall, this enhancement allows users to filter products within a specific price range. The backend adjustments ensure that the filtering respects tax settings and displays accurate prices.

* Fix formatting

* Fix: Price range filter not working on Editor

* Improve: Share logic between Frontend & Editor

* Add changelog

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

* Remove duplicate changelog file

* Enhanced Input Control for Price Fields

Key changes include:

1. **Switch to Input Control**: Replaced the NumberControl component with the more versatile InputControl. This offers better handling of currency formatting and user input.

2. **Currency Formatting Logic**: Added robust logic for formatting numbers according to the currency settings. This includes handling thousand separators, decimal places, and currency symbols.

3. **String-to-Number Conversion**: Implemented a function to convert user-entered strings back to numbers, accounting for currency symbols and separators. This ensures accurate parsing of user input for processing.

4. **Input Handling Improvements**: Modified the onChange handlers for minimum and maximum price inputs. Now, they correctly handle edge cases like undefined or zero values, maintaining consistency in the user interface and data processing.

* Refactor price range query handling

1. Introduction of a new method `get_price_range_query_args()` to encapsulate the logic for handling price range queries, especially for the two edge cases:
   - Prices excluding tax displayed including tax.
   - Prices including tax displayed excluding tax.

2. Removal of direct conditionals in the `get_query_results()` method, replacing them with a call to the new `get_price_range_query_args()` method. This makes the code more modular and easier to understand.

This refactor enhances readability and maintainability of the code, ensuring that special cases in price range filtering are handled more effectively.

* Remove unnecessary suffix prop

* Refactor PriceTextField formatting logic for currency

1. Conditional application of thousand separators: The code now checks for the existence of `currency.thousandSeparator` before applying it. This prevents potential errors when the separator is undefined.

2. Simplified decimal separator handling: Introduced a fallback for the decimal separator, defaulting to a period ('.') if not specified by the currency settings.

3. Enhanced readability and documentation: Added comments to clarify the purpose of code blocks, especially where currency symbols are added or removed, and where value normalization occurs.

4. Function renaming for clarity: Renamed `formatValueWithCurrencySymbol` to `formatCurrency`, which better reflects its purpose.

* Fix onBlur issue with PriceTextField component

Refactored the PriceTextField component to utilize useState for better state management. This change introduces a local state variable, 'newValue', to store the current value. The state updates occur in the handleOnChange function, ensuring that the component's state is managed efficiently. Additionally, a new function, handleOnBlur, is implemented to handle the onBlur event, updating the component's state when focus is lost. The handleEnterKeyPress function captures the 'Enter' key press, providing a more user-friendly experience by allowing users to confirm their input with the Enter key.

* Fix linting error

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 12:45:20 +05:30
Niels Lange 49d6b2058a
Link cross-sells product image to product page (#42904)
* Link cross-sells product image to product page

* Add changelog entry

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-12-21 11:13:47 +07:00
Justin Palmer cb0c42180a
Revise excluded order statuses for order attribution customer history (#42999)
* Better align excluded order statuses with WC Reports

* Update Tracks data to match updated customer order history count

* Add changelog

* Clarify code comment

* Exclude `checkout-draft` for block checkout/API orders.

* Remove unecessary array_map

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Use existing method to get un-prefixed order statuses

---------

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
2023-12-21 00:06:30 +01:00
Simran Vijwani 8e351f2f15
Add UTM group to product URL on the Discover page (#41967)
* Add utm_category to discover page

* Fix product category URL params

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

* Update productCategory to productGroup in Discover and NoResults components

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

---------

Co-authored-by: Simran <simran.kaur@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2023-12-21 02:13:52 +04:00
Dekadinious d8e01b23cd
Update documentation in class-wc-order-item-product.php (#41160)
* Update class-wc-order-item-product.php

* Changelog.

* Fix alignment.

---------

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2023-12-20 13:52:00 -08:00
Leif Singer 06dc19ebd4
Ensure the gateway activation email does not depend on the gateway title being stored in the settings option (#42992)
* use `method_title` for the email to the admin as that is better suited for an admin context

* do not require the title to be set in the updated option

* add the changelog file

* adjust the test, too

* appease the linter
2023-12-20 13:44:30 -08:00
Ilyas Foo 4a5373409b
Fix shipping cost formatting to respect shipping formula (#42916) 2023-12-21 10:25:43 +13:00
Kathy 4d7bf10c96
Use product-sale-price ID for hooks. Closes #42907. (#42908)
* Use product-sale-price ID for hooks. Closes #42907.

* attempt to add a changelog
2023-12-20 17:44:32 -03:00
Damián Suárez e1e1d3c593
[Product Block Editor]: add `product-linked` feature flag (#43006)
* Add product-linked feature flag

* cchangelog

* enable product-linked flag in dev for now

* set product-linked unavailable in prod
2023-12-20 16:41:00 -03:00
Daniel Dudzic 7122669d44
Product Gallery: Simplify the Product Gallery Pop-up (#42797)
* Product Gallery Pop-up: Simplify the pop-up for v1

* Product Gallery Pop-up: Update the Product Gallery template part contents

* Product Gallery Pop-up: Add changelog entry

* Product Gallery: Fix CSS linting errors

* Product Gallery Pop-up: Add an additional changelog entry

* Product Gallery Pop-up: Update changelog message

* Product Gallery Pop-up: Fix logic error
2023-12-20 19:03:01 +01:00
Tom Cafferkey 0ba8f7848d
Block Hooks API: Add Amulet theme to the list of allowed themes for Mini Cart auto-insertion (#42899)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 15:26:21 +00:00
Luigi Teschio e45089eab3
CYS - select the right font with AI offline (#42973)
* CYS - select the right font with AI offline

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 15:41:19 +01:00
Luigi Teschio 24d0fed8e5
CYS - reset products and pattern when the site doesn't have AI generated content (#42970)
* CYS - reset products and pattern when the site doesn't have AI generated content

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

* fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 15:41:04 +01:00
Niels Lange 2f2e573f48
Fix notice styles (#42692)
* Fix notice styles

* Adjust failing e2e test
2023-12-20 08:29:43 -06:00
Brian Borman df1f5d9e45
Check store api draft order on short code for reserved stock (#42796) 2023-12-20 06:18:47 -08:00
Tom Cafferkey 95c34a430d
Block Hooks API: Add Thriving Artist theme to the list of allowed themes for Mini Cart auto-insertion (#42910)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 13:42:38 +00:00
Karol Manijak 4fec136da1
Trigger event `experimental__woocommerce_blocks-cart-add-item` in the SSR Product Button vis Interactivity API (#42946)
* Trigger event experimental__woocommerce_blocks-cart-add-item in the SSR Product Button vis Interactivity API

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

* Update code comment and add reference to the followup issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 13:50:43 +01:00
berislav grgičak 8d6621ece1
Remove install support for Woo.com hosted products (#42952)
* Installer url API

* Redirect if installer not available

* Remove paid product autoinstall support

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 12:52:51 +01:00
Néstor Soriano df17713dea
Add logging and an admin notice for Legacy REST API usages (#41804)
* Add logging and admin noticing for rest api usages

Two new settings are added (UI in the Legacy API settings page):

- woocommerce_legacy_api_log_enabled
- woocommerce_legacy_api_usage_notice_enabled

When any of the two are enabled, legacy API usages are stored
in two options, 'wc_legacy_rest_usages' and 'wc_legacy_rest_last_usage'.

'wc_legacy_rest_usages' is a dictionary keyed by user agent,
each entry is in turn a dictionary keyed by request route,
items are arrays containing first and last usage dates as well
as total usages count (API version is logged too but for simplicity
it's not used to key the data).

'wc_legacy_rest_last_usage' contains the entry for the last usage,
regardless of user agent and route. It's used to display the notice.

When 'woocommerce_legacy_api_usage_notice_enabled' is enabled,
and the 'wc_legacy_rest_last_usage' option exists, an admin notice
displaying its contents is shown.

* Add changelog file

* Linting fixes

* Fix unit test

* Simplify the approach to logging/noticing:

- Remove settings
- Use a transient instead of an option for temporary data
- Store temporary data by user agent but not by route
- Make the admin notice dismissable
- Don't log now show the notice if the legacy REST API extension
  is installed and active
- Add a filter to explicitly disable the logging

* Small fixes, including a missing "exit" after request processing

* Apply suggestions from code review

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>

* Fix linting issues

* Update the warning text under the "Enable legacy REST API" setting

* Change the rules to display the notice.

Now it won't appear if the transient isn't available
or if the Legacy REST API is disabled (or if the Legacy REST API
extension is active, as before); but if the user hasn't
explicitly dismissed the notice it will appear again if the transient
is recreated or the Legacy REST API is enabled again.

---------

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-12-20 11:34:31 +00:00
Justin Palmer 8853c93aca
Tweak Order Attribution meta data and Tracks data (#42937)
* Add the source type / origin of "Web admin" for orders created in admin

* Include "Web admin" in values for Order information metabox

* Include "Web admin" value for the Order information metabox

* Use the Order Origin meta value in the Origin column of the Orders table

* Add web admin and direct as origin values, and a flag for un/translated

* Use the untranslated origin_label value in Tracks

* Don't store the origin label in the database to allow better l10n

* Lowercase origin label in Tracks

* Empty label and Direct or Web admin as source for orders table column

* Better Tracks customer order count and include customer status

* Add changelog

* Update test to expect Unknown

* Remove short ternary

* Change OA meta box title to Order Attribution

* Use native order method `get_total_refunded`

* Simplify origin labels - use the same value for Orders Edit and table

* Correct imprecise doc comment.

* Improve customer order count and total spend calculation

* Make default label "Unknown" (for pre-OA orders, for example)

* Update tests to match new labels
2023-12-20 12:28:19 +01:00
Kyle Nel 58138e0036
Hide In-app marketplace feature flag UI (#42951)
* Hide Marketplace feature toggle UI
* Ensure marketplace feature is active in DB on all sites

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 12:44:22 +02:00
Alba Rincón 8484520231
CYS > Update copy to remove the duplicate "try to include" (#42960)
* Remove duplicated text

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 10:39:09 +01:00
Thomas Roberts 7768ef5b5c
Prevent "Use same address for billing" being checked by default if addresses differ (#42967)
* Don't access the keys of what is now just an array

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-20 14:47:59 +07:00
Matt Sherman 0b315380ed
Skip BlockRegistry tests for now until we can figure out why they are flaky (#42977) 2023-12-19 22:51:50 -05:00
Kathy 7cbf7a3442
Cart: Force calculate totals when ordering again (#42921)
Ensure cart totals are correctly calculated when using "Order again".

Fixes #42889
2023-12-19 16:58:41 -08:00
Barry Hughes d033a40b26
Tweak create-product-attribute spec (#42854)
* Adds missing aria-label and tabindex HTML attributes to the Help tip element for "Product data" on "Add new product" page.

* Escape HTML tags

* Added changelog

* Update comment

* Amend method for selecting "New attribute" placeholder.

* Restore use of `getByRole()` and select first instance (two are being matched, in some cases).

* Use last match (in some test runs, `getByRole()` is unexpectedly matching more than 1 heading.

---------

Co-authored-by: Sagar Tamang <mi5t4n@gmail.com>
2023-12-19 16:35:20 -08:00
Luigi Teschio 310de4cc9f
Docs: Compatibility Layer - update documentation about `woocommerce_single_product_summary` (#42862)
* docs: Compatibility Layer - update documentation about woocommerce_single_product_summary

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-19 23:18:24 +01:00
Paul Sealock b04c45ee5e
Shipping Settings: Highlight text on focus of cost input values (#42689) 2023-12-20 08:22:17 +13:00
louwie17 a72f3ee7a2
Add grouped and external products to new experiment (#42934) 2023-12-19 14:21:05 -04:00
Albert Juhé Lluveras 06e5b43d52
Reviews by Product block: fix encoded in input aria-label (#42944)
* Reviews by Product block: fix encoded in input aria-label

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-19 13:05:18 +01:00
Mike Jolley fe37bf8ddb
Remove duplicate cookie headers from the response (#42828)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-19 03:10:52 -08:00
Tom Cafferkey 73e696f467
Block Hooks API: Add Zaino theme to the list of allowed themes for Mini Cart auto-insertion (#42912)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-19 11:06:35 +00:00
Seghir Nadir d63dd1ed49
Allow passing partial data to Store API extensions field. (#42790)
* Make extended fields optional in Store API

* add tests

* add changelog

* update logic in validate function

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-12-19 12:04:11 +01:00
Paul Sealock 23f44c0484
Shipping Settings: revert refresh styles (#42738) 2023-12-19 23:42:21 +13:00
Tung Du c651b10b3d
Add: Active Filters block powered by Interactivity API (#42008)
* add: active filters block

* update text domain

* chore: linting

* use template string instead of concat

* add experimental flag to register block type calls

* chore: update comments

* feat: register active rating filter data

* fix: unique navigation id when collection filters are added outside product collection

* fix: active filter rating id

* fix: return the href

* chore: phpcs
2023-12-19 17:29:33 +07:00
Jorge A. Torres 1965dfb63e
Add CLI tool to remove order data from legacy tables (#42848)
* Introduce `LegacyDataHandler` for handling legacy orders in the HPOS datastore

* Add methods to count and obtain orders subject to cleanup

* First pass at metadata cleanup for orders

* Add unit tests

* Implement `wc hpos cleanup` CLI tool

* Make PHPCS happy

* Add changelog

* Change error to warning

* Improve tests

* Fix unit tests

* Allow cleaning up of placeholders with meta

* Add support for `--force` flag

* Update plugins/woocommerce/changelog/enhancement-41914

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Exclude auto-draft

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2023-12-19 09:32:55 +00:00
Tom Cafferkey bd6a8d365a
Block Hooks API: Add Tsubaki theme to the list of allowed themes for Mini Cart auto-insertion (#42911)
Co-authored-by: github-actions <github-actions@github.com>
2023-12-19 08:59:13 +00:00
Bartosz Budzanowski 1c4d373c84
Fix Order Attribution device type in tracks. (#42814)
* Fix Order Attribution device type in tracks.

* Add changelog.

* Fix indentation.

* Remove wrong comment.

* Update plugins/woocommerce/changelog/fix-order-attribution-device-type-in-tracks

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Admin/Orders/MetaBoxes/OrderAttribution.php

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>

* Remove trailing whitespace.

---------

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2023-12-19 09:18:19 +01:00
Tarun Vijwani 82a6611144
Move the switch to classic shortcode block button to separate component (#42724)
* Move the switch to classic shortcode block button to separate component

- Move modal component file from incompatible-extension-notice component folder to switch-to-classic-shortcode-button folder.
- Rename modal component file to model-content component file.
- Move the switch to classic shortcode block button to separate component folder

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

* Update class names in switch-to-classic-shortcode-button component

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

* Update plugins/woocommerce-blocks/assets/js/editor-components/switch-to-classic-shortcode-button/editor.scss

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

* Refactor SwitchToClassicShortcodeButton component

* Fix css lint erros

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-12-19 11:44:09 +04:00
Paul Sealock 055b1429fe
Admin.scss: Provide image-mask for Chrome (#42853)
* add mask-image

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-19 16:44:57 +13:00
Corey McKrill 7ff0e47690
Navigation: Change error_log call to doing_it_wrong (#42890)
Avoids printing an error log message in the middle of phpunit output.

Co-authored-by: Leif Singer <leif@automattic.com>
2023-12-18 14:26:38 -08:00
Daniel Dudzic 11b8276a29
Product Gallery: Add Group block labels (#42868)
* Product Gallery: Add Group block labels

* Product Gallery Group Labels: Add changelog entry

* Product Gallery Group Labels: Add an additional changelog entry

* Product Gallery Group block labels: Update changelog message
2023-12-18 22:24:30 +01:00
Maikel David Pérez Gómez 1c3843e4ec
Remove list/sale price from the General tab in grouped products (#42909)
* List and sale price should not be visible in the general tab for grouped products.

* Add changelog files

* Fix lint error
2023-12-18 16:26:38 -04:00
Corey McKrill 89fe33d64f
Logging: Render line breaks in log messages in the db log list table (#42683)
Allow for line breaks within log messages so they can be easier to read when they contain a lot of content.

Based on a suggestion in #27758

Co-authored-by: Moritz Meißelbach <4208996+Biont@users.noreply.github.com>
2023-12-18 11:24:53 -08:00
Corey McKrill 61885b8013
Logging: Improve functionality in new LogHandlerFileV2 handler class (#41802)
This fleshes out the LogHandlerFileV2 class that was introduced back in #40662. It no longer extends the original file log handler, but works as a standalone. To realize the improvements in the handler class, lots of improvements are also made to the File and FileController classes.

Notable enhancements in this handler class vs the original one:

* Better algorithm for determining the "source" of a log entry when none is provided.
* Normalizes the source property of a log entry so that variations in capitalization will still result in the same value.
* Improves file rotation behavior so that it will consistently increment each rotation up by one.
* Formats log messages to remove line breaks, so that each line of a log file is an entire entry.
* To complement this, data from the $context parameter is added to the log entries, and displayed in the log file viewer as prettified JSON, hidden behind a `<details>` element. Thus, each log entry can be expanded to show the context data, but it won't dominate the screen in the log viewer by default.

Fixes #41561
2023-12-18 10:42:17 -08:00
Nathan Silveira 09bcb3fcac
Add support for appending a unique string to the filename for the wp/v2/media endpoint (#42702)
* Extract 'downloadable product' class and include it for API endpoint calls as well

* Re-add mediauploader component

* Restore UploadFilesMenuItem

* Provide additionalData type

* Restore MediaUploader component

* Lint PHP

* Add changelogs

* Update pnpm-lock

* Revert "Update pnpm-lock"

This reverts commit b61ee5813aa0b7b8b1ea8e71423bedbb6f876139.

* Revert pnpm-lock.yaml

* Fix unit tests

* Use WC_ABSPATH
2023-12-18 14:12:44 -03:00
nigeljamesstevenson bbe2a6f2d7
Cherry pick #290 into trunk - Address potential rXSS vulnerability (product-reviews-have-moved notice) (#42728)
* Revert "k6 perf tests: Fix parsing of COT/HPOS environment variable (#40930)"

This reverts commit 50c56d8427, reversing
changes made to cbc3bac88c.

* Address potential rXSS vulnerability in the product-reviews-have-moved notice.

* Changelog.

* Restore button-based approach for notice dismissal.

In the context of this edit comments screen, it looks better as a button (than as a link, which would require extra CSS to support).

* Tidy.

* Update tests: reviews-have-moved notice HTML has been updated.

* Modify form-based approach following code-review feedback.

---------

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2023-12-18 16:28:17 +00:00
Ron Rennick de774715bc
Add product image by SKU (#40076)
* add matching image by sku exp feature

* attach featured image in rest api

* add CSV import support

* include changelog

* update from feedback- move to products advanced settings

* address phpcs

* bump @since to 8.5.0

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-18 10:13:11 -04:00
Albert Juhé Lluveras 140d1db2cc
Add tracking when opening or searching in the Command Palette (#41838)
* Add tracking when opening or searching in the Command Palette

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

* Add 'origin' property to all Command Palette events

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-18 14:36:53 +01:00
Kyle Nel 56d038ff5f
Add redirect to new In-App marketplace installer (#42010)
* Add redirect to new In-App marketplace installer

* Update to shared redirect method

* Add changelog

* Add feature flag check

* reuse get_helper_redirect_url

* Remove debug code

* Fix linter issues

* Add linter exception

---------

Co-authored-by: Bero <berislav.grgicak@gmail.com>
2023-12-18 13:25:13 +00:00
Cem Ünalan 23ec020ed9
Marketplace: refresh subscriptions if "install" parameter exists (#42704)
* Marketplace: refresh subscriptions in if "install" parameter exists

* Marketplace: handle loadSubscriptions or refreshSubscriptions failing

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-18 12:53:36 +00:00
Jorge A. Torres 26b7903a68
Add hooks around HPOS orders being synced from/to posts on read/write (#42866)
* Remove unnecessary code

* Add hooks for when an HPOS order is updated from post or backfilled to a post

* Add changelog

* Add docblocks
2023-12-18 12:49:48 +00:00
Seghir Nadir 8ecfcfb9a0
Add Checkbox support for Additional Fields in Checkout Block (#42780)
* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073

* revert test to what it was

* Default to text, if the type supplied is not supported throw an error

* Add type for options

* Return null if somehow the select made it through without options

* Make select fields type enum and add options to schema

* Lint fixes

* Update plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/address-form/address-form.tsx

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

* Update plugins/woocommerce/src/Blocks/Domain/Services/CheckoutFields.php

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

* Update checks to log errors and fail gracefully

* Add field id to class names

* Fix lint error

* Fix short array use

* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073

* Default to text, if the type supplied is not supported throw an error

* Lint fixes

* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073

* add support for registering checkboxes

* remove extra error log

* add styling

* fix rebase conflit

* fix rebase conflit 2

* fix linter errors

* address review comments

* add warning for checkbox

* fix changes

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
2023-12-18 13:21:36 +01:00
Alba Rincón d5a46a1cfb
Remove padding for the products query when background is added (#42817)
* Remove padding for the products query with background

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2023-12-18 11:14:43 +01:00
Sam Seay 6d4c69850c
Experimental Collection Rating Filter (#41999)
Introduce Experimental Collection Rating Filter, CheckboxList interactivity component.
2023-12-18 22:47:24 +13:00
Christopher Allford bf29119032
Updated PNPM to ^8.12.1 (#42860) 2023-12-18 20:31:49 +13:00
Roy Ho d15bfd2398
Product Gallery: reset main image when variations are cleared (#42830)
* Product Gallery: reset main image when variations are cleared

* Add changelog for woo core

* Update event name to be more descriptive
2023-12-15 13:22:10 -08:00
Jonathan Lane 1bf35ac737
Playwright test workflow migration from Blocks repo (#42804)
* First pass at Playwright test migration

* Set working directory

* Remove exec

* Configure the environment before testing

* Remove filter

* Update paths for tests

* Try explicitly stating working-directory

* Change tests directory

* Try running all tests

* Uncommented project

* Update commands to run tests

* Comment out env config

* Uncomment

* Changelog

* Set up multiple test configurations

* Update failing test

* Update paths for artifacts

* Update path to artifacts

* Path to results

* remove unnecessary file

* Skip translation E2E tests

Skipping translation tests until we fix the missing translations issues after we changed the domain to "woocommerce"

* Update the artifacts path

* Fix lint errors

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2023-12-15 09:34:29 -08:00
Keith Light 6e8678aca0
Add HTML5 theme support to NO JS handling (#42753)
* Add HTML5 theme support to NO JS handling

* Add changelog entry

* Tweak changelog.

* Add phpcs ignore comment for safe unescaped output

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2023-12-15 09:15:14 -08:00
Patricia Hillebrandt 69172606f5
CYS - AI Improvements (#42800)
* Add the response_format to the params for requests to AI to ensure it will return the responses in JSON format.

* Update the prompt to define the search term for images from Pexels.

* Streamline product content update and the product image uploads within the ProductUpdater class.

* IMprove prompts for images and product content generation.

* Update the prompt for defining the search term on Pexels and drop double quotes from the response.

* Update the prompts and the position for the titles on content generation for the woocommerce-blocks/testimonials-3-columns pattern.

* Set the 'woocommerce_ai_managed_images' transient for the products endpoint callback in case execution is interrupted so images don't have to be fetched from Pexels again.

* Update the prompt for defining the search term for images.

* Remove unused methods from the PatternsHelper class.

* Update the prompt for AI content generation in patterns.

* Update the prompts for the testimonials and the Hero Product 3 Split patterns.

* Update the position for the main title in the Hero Product 3 Split pattern.

* Reduce the size of the images uploaded to the media library for products.

* Add docblock and update prompts.

* Update the default size of the images received from Pexels to be downloaded and uploaded to the media library.

* Update prompts for the Hero Product 3 Split pattern.

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

* Address lint errors.

* Update array formatting

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-15 11:49:16 -03:00
Thomas Roberts 0c6a943c42
Add select field type for custom checkout fields (#42758)
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2023-12-15 06:39:22 -08:00
louwie17 90dc5bad2e
Address some deprecation warnings (#41845)
* Remove use of deprecated conditional block

* Remove use of deprecated context usage

* Remove use of deprecated positoin on Dropdown in favour of popoverProps

* Add changelogs

* Remove unused import

* Fix lint errors

* Remove popoverProps.position with popoverProps.placement

* Update missed items replacing position to placement

* Fix lint error

* Fix placement position

* Update changelogs
2023-12-15 09:45:06 -04:00
Seghir Nadir 12572ce08c
Introduce Additional Fields extensibility API (#42695)
* Introduce Additional Fields API for Checkout Block https://github.com/woocommerce/woocommerce-blocks/pull/12073

* add changelog

* Auto load the Blocks/Domain/Services/functions.php file

* add changelog

* revert test to what it was

* Update text domain for translations

* Ensure address data is added on the cart block too

* fix lint problem

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2023-12-15 13:45:38 +01:00
Ilyas Foo 3d7e6bc796
Enable WCCOM shipping partners API consumption (#42810)
* Enable shipping partners API use from frontend

* Changelog

* Add id to each shipping partner to match wccom structure
2023-12-15 20:33:36 +08:00
Damián Suárez d996008219
[Product Block Editor]: propagate content from description inner blocks to Modal editor (#42768)
* set description like the property to update

* switch between summary block and block preview

* add todo: comment

* femove duplicated doc comment block

* Use a quick check to improve performance

* expose getContentFromFreeform() helper fn

* parse freeform content to valid blocks

* changelog

* fix TS issue

* changelog
2023-12-15 09:20:02 -03:00
Thomas Roberts 865ea6ada9
Disable `DisallowShortArraySyntax` and `InternalInjectionMethod` sniffs for blocks files. (#42863)
* Disable some rules for blocks files

* Add changelog
2023-12-15 12:39:31 +01:00
Tom Cafferkey 5cdbc8c98a
Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt2 2023-12-15 08:08:45 +00:00
Tom Cafferkey 9f997106ec
Block Hooks API: Add TT3 theme to the list of allowed themes for Mini Cart auto-insertion (#42760) 2023-12-15 08:07:31 +00:00
github-actions bbc0390e35 Add changefile(s) from automation for the following project(s): woocommerce 2023-12-14 20:26:58 +00:00
paul sealock 7b1f538573 Handle multiple tables in an html string 2023-12-15 09:15:01 +13:00
nigeljamesstevenson 3042b9fba6
Update Action Scheduler to 3.7.1 (#42820) 2023-12-14 17:01:54 +00:00
Tom Cafferkey b72d9e341f
Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt2 2023-12-14 15:48:59 +00:00
Tom Cafferkey 59fb6aa2c6
Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt3 2023-12-14 15:48:56 +00:00
tjcafferkey e1853dcfe6 Change [] to array() for linting 2023-12-14 15:46:22 +00:00
tjcafferkey 23ff1a54cd Change [] to array() for linting 2023-12-14 15:40:38 +00:00
Seghir Nadir 25d0417644
Add InternalInjection sniff exceptions for blocks (#42821) 2023-12-14 16:36:40 +01:00
Tom Cafferkey c989f6e337
Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt3 2023-12-14 14:25:58 +00:00
Leif Singer 6f902e3dbb
Delete trashed orders after `EMPTY_TRASH_DAYS` as defined by WordPress (HPOS) (#41949)
* Add a test that fails if trashed orders are never deleted under HPOS

* Delete trashed orders after `EMPTY_TRASH_DAYS` as defined by WordPress

* add the changelog file

* appease the linter

* return early if HPOS is not authorative

* attempt to precede WordPress itself (which uses priority 10) to increase the probability of orders and their posts being handled solely by us

* appease the linter
2023-12-14 14:24:09 +00:00
Ron Rennick 5ca5d9bdab Merge branch 'trunk' into add/blocks-injection-rule 2023-12-14 10:11:16 -04:00
Tom Cafferkey 853c57a604
Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt2 2023-12-14 14:04:11 +00:00
Roy Ho 255f1ff919
Product gallery/legacy/transform (#42719)
* Product Image Gallery: Add transform to Product Gallery block

* Single Product Template: Transform to blocks with new Product Gallery block

* Ensure we first check for block existance

* Add changelog

* Add/delete changelog file
2023-12-14 05:47:48 -08:00
Luigi Teschio 9ff69b01cc
fix: CYS - fix path images patterns (#42705)
* fix: CYS - fix path images pattern

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-14 14:12:52 +01:00
github-actions a4d6537597 Add changefile(s) from automation for the following project(s): woocommerce 2023-12-14 13:03:44 +00:00
Ron Rennick 8292ff1cca Add InternalInjection sniff exceptions for blocks 2023-12-14 08:59:57 -04:00
nigeljamesstevenson 3ada74b56d Update Action Scheduler to 3.7.1 2023-12-14 12:56:05 +00:00
berislav grgičak 2964800f27
Add subscription install modal (#42009)
* Install modal

* Add connect button

* Small product card

* Add install functionality

* Add no subscription error

* Fix error notice loading

* Connect style

* Add success state

* Fix admin urls

* Add error message to failed install events

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-14 12:45:40 +01:00
Luigi Teschio 0903a53664
fix: CYS - update copy (#42703)
* fix: CYS - update copy

* not format style file

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

* add changelog

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-14 12:32:37 +01:00
github-actions d8132154ba Add changefile(s) from automation for the following project(s): woocommerce 2023-12-14 10:59:34 +00:00
tjcafferkey 30dab31b4c Enable Mini Cart auto-insertion for TT2 but exclude some header patterns 2023-12-14 10:48:55 +00:00
Seghir Nadir 2b54c8a61d
Performance: Bootstrap metrics tracking (#42005) 2023-12-14 10:45:15 +01:00
Alba Rincón 5187b2d1ef
Change the imageSizing to single in patterns (#42767)
* Change the imageSizing to single

Images need a higher resolution in patterns used for the CYS project in the assembler

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-14 10:26:17 +01:00
Riad Benguella 36c259a2a1 Performance: Bootstrap metrics tracking 2023-12-14 09:52:01 +01:00
Sam Seay 609f39b073
Fix the cp command for blocks so that the contents of build is copied into assets/client/blocks (#42807) 2023-12-13 21:32:24 -08:00
RJ 762c2ef924
add: easyship to shipping task for AU, NZ, SG, HK (#41852) 2023-12-14 11:13:08 +08:00
Christopher Allford e46d6bd207
Fixed `watch:build` Race Conditions (#42802)
There's currently a bug with `wireit` that makes the watch crash.
Swiching over to `nodemon` until that is resolved will
keep that from happening.
2023-12-13 18:25:16 -08:00
Paul Sealock 346664f348
Shipping Settings: Allow extensions to render description links (#41954) 2023-12-14 14:31:00 +13:00
Paul Sealock 4e98801e8f
Shipping Settings: Replace tables only for use in modals (#42795) 2023-12-14 14:02:58 +13:00
Jonathan Lane 8e2e7de7ce
Migrate Puppeteer test action from Blocks repo (#42733)
* Migrate Puppeteer test action from Blocks repo

* Update file path

* Use pnpm

* Use npm

* Updates based on feedback

* Comment out paths for testing

* Fix paths with working directory

* Use pnpm

* Fix missing pnpms

* npm instead

* Do use pnpm

* Update command

* Blocks wp-env config

* Update paths, config files

* Run test commands from blocks

* Config update

* Uncomment paths so that e2e checks only run on Blocks

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2023-12-13 16:01:34 -08:00
paul sealock 2b769f5088 use kses_post 2023-12-14 12:57:31 +13:00
github-actions f66a6fe44e Add changefile(s) from automation for the following project(s): woocommerce 2023-12-14 12:57:31 +13:00
paul sealock bcb5a393e6 inline wp_kses 2023-12-14 12:57:31 +13:00
paul sealock 28df5447d0 make height dynamic 2023-12-14 12:57:31 +13:00
paul sealock e8ca0c250c allow target attribute 2023-12-14 12:57:31 +13:00
paul sealock 812271fd85 use wp_kses to sanitize but allow links 2023-12-14 12:57:31 +13:00
Christopher Allford d0d49b49f5
Fix Component Project Changelog Checking (#42794) 2023-12-13 15:41:11 -08:00
Paul Sealock a232c32c8e
Shipping Settings: Add busy animation to Continue button (#42688) 2023-12-14 12:26:21 +13:00
github-actions f908d9bec5 Add changefile(s) from automation for the following project(s): woocommerce 2023-12-13 22:28:37 +00:00
github-actions 2b6f10311f Add changefile(s) from automation for the following project(s): @woocommerce/create-product-editor-block, woocommerce-blocks, woocommerce 2023-12-13 22:26:53 +00:00
github-actions 4bb43d87b9 Add changefile(s) from automation for the following project(s): woocommerce 2023-12-14 11:26:18 +13:00
paul sealock ba64a21f46 Add busy animation to Continue button 2023-12-14 11:23:33 +13:00
paul sealock 1b0fa5d04e remove whitespace for linter 2023-12-14 10:43:55 +13:00
Christopher Allford 2fa8f357f8
Fixed Blocks' `wp-env` Configuration (#42798)
* Fixed Blocks' `wp-env` Configuration

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-13 13:07:15 -08:00
github-actions 12dab59815 Add changefile(s) from automation for the following project(s): woocommerce 2023-12-13 20:46:10 +00:00
paul sealock 481c4eaaf5 Replace tables only for the modal 2023-12-14 09:39:05 +13:00
Christopher Allford e231be78f9
Fixed PHPUnit Tests Broken by Merge (#42731) 2023-12-13 12:38:59 -08:00
Mike Jolley db9be95f5d
Allow built in payment method descriptions to contain HTML when rendered on the block checkout (#42706) 2023-12-13 15:49:29 +00:00
Christopher Allford 8cf2f54ab8
Migrated Blocks' PR Assignment Workflow (#42782) 2023-12-13 07:30:15 -08:00
Mike Jolley 6dfcbbd525 Blocks changelog 2023-12-13 15:24:18 +00:00
Mike Jolley b6e3e32d7c changelog 2023-12-13 14:37:21 +00:00
Mike Jolley 2abd0422a8 Allow HTML in built in payment method descriptions 2023-12-13 14:37:21 +00:00
Tom Cafferkey 136bb741b0
Merge branch 'trunk' into update/auto-insert-mini-cart-into-tt3 2023-12-13 14:31:05 +00:00
github-actions 641fe4d590 Add changefile(s) from automation for the following project(s): woocommerce 2023-12-13 13:53:07 +00:00
tjcafferkey ce869a7430 Add TT3 theme to the list of allowed themes for Mini Cart auto-insertion 2023-12-13 13:31:05 +00:00
Niels Lange 31c9eed519
Fix ESLint issue 2023-12-13 17:06:38 +07:00
Niels Lange 040038a339
Add changelog entry 2023-12-13 16:46:23 +07:00
Niels Lange ca73ac42b6
Display update quantity notice on classic cart 2023-12-13 16:44:16 +07:00
Christopher Allford be290984b9
`setup-woocommerce-monorepo` Action in Highlight Changes Workflow (#42740) 2023-12-12 21:33:52 -08:00
Christopher Allford ec9b7852f9
Fixed Blocks Linting Errors (#42727) 2023-12-12 15:05:20 -08:00
Jonathan Lane dd255a2820
Update daily test workflows post Blocks-merge (#42716)
* Update action for API tests

* Changelog

* Update e2e tests

* Rename WooCommerce Payments to WooPayments

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2023-12-12 14:50:18 -08:00
nigeljamesstevenson c50c0f1488 woorelease: Update stable tag to 8.4.0 2023-12-12 22:16:13 +00:00
Ron Rennick d1498d45f2
update woo-gutenberg-products-block text domain to woocommerce in src folder (#42718)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 14:13:15 -08:00
Ron Rennick 60b445510d
update woo-gutenberg-products-block text domain to woocommerce in patterns and templates folders (#42720)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 14:13:03 -08:00
Ron Rennick 4fddface47
update text domain in plugins/woocommerce-blocks (#42717)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 14:12:36 -08:00
Ron Rennick a2812bdb59
remove PHP related scripts from blocks package.json (#42722)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 13:46:53 -08:00
Paul Sealock 5b393e78c6
Shipping Settings: Add a back button to method configuration screen (#41958) 2023-12-13 10:02:50 +13:00
Christopher Allford 4c4e89bc98
Enhance Build Watching (#42712)
Similarly to `build:project`, a new `watch:build:project`
script will watch individual projects for changes. The
`watch:build` script has been updated so that it does
a deep watch in the same vein as `build`. We have also
hooked up tool-level watching for faster performance.
2023-12-12 12:43:48 -08:00
Ron Rennick 76b4f39116
remove woocommerce-blocks from text domain substitution (#42017)
* remove woocommerce-blocks from text domain substitution

* restore prior art commented out

* add internal-js-tests composer.json

* covert internal-js-tests/changelog to a folder

* update blocks composer.json

* fix path, add composer install to changelog script

* add woo-ai changelog

* add composer install to beta tester changelog script

* add composer.json to woocommerce-admin

* add changelog folder & file to woocommerce-admin

* add composer install to woocommerce changelog script

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 15:38:20 -04:00
Christopher Allford 4e89debd0c
Fix Jest Preset (#42707)
When using a preset we need to keep in mind that the transformation
paths are relative to the preset, not the consuming package. We get
around this by using `<rootDir>` in the transform paths. However,
doing this means fixing the root directory for all of the jest tests.
This keeps the tests working in the same way but lets us fix the
preset too.
2023-12-12 09:58:13 -08:00
Jonathan Lane 7692fa5430
Fix flaky tests, failures from Blocks merge (#41815)
* Clean up created pages and posts

* Move tax tests so that they run last

* Improve locators

* Changelog

* Improve locators

* Improve locator on heading

* Change assertions to look for alert text

* Change assertion to look for text

* Update locators

* Update locator

* Update alternate elements

* Specify first order amount

* Update locator

* Changelog

* Increase reliability of checkout test

* Update a few locators

* Remove .slice()

* Add some console output to checkout test

* Make command palette tests Mac-compatible

* Added update for why download test flaky

* Improvements to checkout tax tests

* Add changelog

* Assert on range of prices

* Improve the regex for matching the price

* Changelog

* Clean up locator

* Unskip analytics tests

* Remove logging statements

* Update variations selector

* Remove comment

* Fix disable block tests

* Remove skipped legacy coupon page test

* Account for multiple products in test

* Cleaned up some console.logs

* Added specificity to locator

* Better price parsing

* Fix cart block shipping test

* Fix syntax error

* Update Playwright, fix logic error

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2023-12-12 07:56:56 -08:00
Leif Singer 0a0351aa6a
Logging: Prevent fatal type error when submitting empty search (#41847) 2023-12-12 12:36:21 +01:00
Christopher Allford 1c635cda6f
Optimized `wireit` Fingerprinting File Inputs (#42684)
Having an explicit `"files"` definition will allow us to fingerprint
dependencies in `wireit` more granularly. This avoids problems
that can be caused by different source files and directories that
trigger a rebuild in a dependee before a dependent finishes.
2023-12-11 16:21:35 -08:00
Corey McKrill 44ab680fe1
Logging: Fix pagination and filtering on DB log list table (#41870)
Fixes some issues where pagination and filters were not persisting in the DB log list table view after running a bulk action. Also adds a way to customize the number of log entries shown per page.

Fixes #39359
2023-12-11 12:27:26 -08:00
Christopher Allford e718975963
Fixed WooCommerce Docs Build Errors (#42000) 2023-12-10 22:39:00 -08:00
Christopher Allford 05d398c8d3 Fixed Blocks CSS Linting 2023-12-10 14:11:32 -08:00
Christopher Allford 6360c38eb8 Fixed Failing PHPUnit Test 2023-12-10 13:26:17 -08:00
Christopher Allford ea6a39dbc1 Fixed Blocks PNPM `run` & Env Var Usage 2023-12-10 12:44:44 -08:00
Christopher Allford 245fbadc51 Added Missing Blocks Build Output 2023-12-10 12:32:29 -08:00
Christopher Allford e580d27afd Added Missing Block Dependencies 2023-12-10 12:24:20 -08:00
Christopher Allford a8fd8fafa5 Applied Linting Fixes 2023-12-09 23:32:45 -08:00
Christopher Allford 87b5ee54eb Removed Blocks PHP Linting 2023-12-09 22:41:21 -08:00
Christopher Allford dc5aa18f35 Wireit Added: `@woocommerce/block-library` 2023-12-09 22:35:11 -08:00
Christopher Allford 96af36bf1f Locked `wireit` Version 2023-12-09 21:56:12 -08:00
Christopher Allford 403e2919ee Merge branch 'trunk' into refactor/task-infrastructure 2023-12-09 21:51:43 -08:00
Christopher Allford 5ff9c477aa Updated Documentation 2023-12-09 21:42:59 -08:00
Christopher Allford 4c0cc805dc Removed Old Docs Links 2023-12-09 21:40:52 -08:00
Christopher Allford 6d57e59ad4 Corrected Blocks Readme 2023-12-09 21:39:19 -08:00
Christopher Allford b4fd0c3b7b Fixed Blocks INI File Path 2023-12-09 21:33:34 -08:00
Christopher Allford e34361695d Fixed Image Asset Paths 2023-12-09 21:26:49 -08:00
Christopher Allford cf357e809b Fixed Blocks Asset Constant Path 2023-12-09 21:20:21 -08:00
Christopher Allford 25d42b0c05 Fixed Blocks Asset Paths 2023-12-09 21:15:57 -08:00
Christopher Allford 386d0db969 Fixed Blocks Dependency Check
Since we've merged it into WooCommerce Core there's nothing for us
to bother checking it against.
2023-12-09 21:03:34 -08:00
Christopher Allford fa5f7046dd Fixed Blocks Plugin Paths 2023-12-09 21:02:46 -08:00
Christopher Allford 389828ad7e Fixed Blocks Autoloads 2023-12-09 20:42:32 -08:00
Christopher Allford 8b6036a30e Changed Blocks Build Output 2023-12-09 18:18:25 -08:00
Christopher Allford 0514069d7b Added Missing Blocks Dependencies 2023-12-09 18:14:26 -08:00
Christopher Allford d06cd2f729 Added Missing PHPUnit Dependencies 2023-12-09 16:18:17 -08:00
Christopher Allford d443e92f23 Renamed Shortcode Assets "Classic" 2023-12-09 15:37:13 -08:00
Christopher Allford 4d0cde4b4b Lock File Update 2023-12-09 15:35:55 -08:00
Christopher Allford d244662669 Synchronized Dependencies 2023-12-09 14:40:16 -08:00
Christopher Allford fa011a431b Removed Unnecessary `run` From `pnpm` 2023-12-09 14:36:22 -08:00
Christopher Allford e9484c33f4 Removed Unnecessary `run` Usage
Since `pnpm` defaults to `run` unless a built-in
command exists we don't really need to use `run`.
2023-12-09 14:31:56 -08:00
Christopher Allford 1e4d55b36a Updated Documentation 2023-12-09 14:30:29 -08:00
Christopher Allford 5200c2e97f Change Asset Build Outputs
Wireit doesn't allow us to have build outputs in a directory outside
of the package. We can get around this by having a build step in
WooCommerce that copies the files from the output directories.
2023-12-09 14:27:30 -08:00
Christopher Allford d015950e86 Wireit Dependencies Set 2023-12-09 14:24:51 -08:00
Christopher Allford 3d79d5f204 Removed Turbo References 2023-12-09 14:22:04 -08:00
Christopher Allford 92e3d5fefb Added Wireit Commands to WooCommerce
There's quite a bit of work needed in this file but
I'll come back to that later when I can review it all
in more detail.
2023-12-09 14:17:11 -08:00
Christopher Allford f9e6f3a3a4 Add Wireit: `@woocommerce/shortcode-assets` 2023-12-09 14:16:13 -08:00
Christopher Allford e729417335 Revised Test Command
We will never run all tests concurrently so this is better.
2023-12-09 14:14:47 -08:00
Christopher Allford 5a99b8e6a9 Add Wireit: `@woocommerce/admin-library` 2023-12-09 14:12:31 -08:00
Christopher Allford 5f606e4d8e Added Missing Core Plugin Dependencies 2023-12-09 13:23:32 -08:00
Christopher Allford 4c0f4f1e5b Privatized Plugin Packages 2023-12-09 13:11:18 -08:00
Christopher Allford df32d8e967 Added `wireit` Dependency
We're adding this to _every_ package since they have their own
configuration and scripts to run. This also keeps them
isolated so that they can operate independently.
2023-12-09 13:11:15 -08:00
Christopher Allford 66fceae065 Renamed WooCommerce Docs Plugin Package
As part of the prevention of supply chain attacks the package has been
renamed to `@woocommerce/plugin-woocommerce-docs`.
2023-12-09 12:59:24 -08:00
Christopher Allford 4d9a3715fe Renamed WooCommerce AI Plugin Package
As part of preventing supply chain attacks, the package was
renamed `@woocommerce/plugin-woo-ai`.
2023-12-09 12:59:24 -08:00
Christopher Allford ebeaa84230 Renamed WooCommerce Beta Tester Package
As part of the prevention of supply chain attacks we are
renaming the package `@woocommerce/plugin-woocommerce-beta-tester`.
2023-12-09 12:59:24 -08:00
Christopher Allford 5bbb9edc6d Renamed WooCommerce Plugin Package
In order to prevent supply-chain attacks we have renamed
the package. The new name is `@woocommerce/plugin-woocommerce`.
2023-12-09 12:59:24 -08:00
Christopher Allford c0237250fb Renamed `woocommerce/client/legacy` Package
NPM requires names to be single-word or have a scope. The
current name is not valid. The package has been renamed
`@woocommerce/shortcode-assets` to better match its purpose.
2023-12-09 12:59:24 -08:00
Christopher Allford 6d685e5185 Renamed `woocommerce/client/admin` Package
NPM package names _must_ either be single-word or have
a scope. The current structure is unsupported and has been
changed. The new package name is `@woocommerce/admin-library`.
2023-12-09 12:59:24 -08:00
Christopher Allford 2081839bcd Fixed Notice Error 2023-12-09 12:40:22 -08:00
Christopher Allford 02828cc5d4 Fixed CI Inconsistencies 2023-12-09 12:30:25 -08:00
Christopher Allford 6c8207541a Resolved Type Errors 2023-12-09 12:08:16 -08:00