Commit Graph

19637 Commits

Author SHA1 Message Date
Veljko V 7f2fd37fad
Refactor code and merge checkout and coupon tests and add new restricted cart coupons tests (#43819)
* Add changelog and update var naming in block tests

* Format code in two tests

* Add missing payment method set to the test

* Refactor tests and merge cart checkout coupons

* Clear cookies before every test
2024-01-19 10:32:19 -08:00
Mike Jolley 60509aa539
[Experimental] Surface additional checkout fields values in Admin order page. (#43748)
* Get default attributes on front end

* Remove console log

* Show notice about 0 registered fields in editor

* Do not show block in editor if no fields are registered

* Wrapper block

* Update webpack config

* Wrapper block type definition

* Separate fields from the hook block

* Hide when no custom fields exist

* Address and contact fields

* Shared form fields in settings

* Revert render_content to original

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

* Show address placeholders

* View fields in admin

* Pass order object and context to field hooks in WP admin

* CheckoutFieldsAdmin class

* Move logic to CheckoutFieldsAdmin

* Implement context

* Style checkboxes correctly in meta box

* Update handling

* Undo change to changelog

* Correct docblock comment for woocommerce_admin_shipping_fields

* Document context

* No need to init fields

* Fix checkbox handling for bw compat reasons

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

* Force CI

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

* Fix CSS rule

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-19 11:35:17 +00:00
Luigi Teschio f866d0d30f
[CYS - Core] Improve loading screen (#43791)
* CYS - Core: Create dummy products

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

* CYS - Core: Improve loading screen

* fix import

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

* update image

* add missing image

* fix CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-19 12:03:19 +01:00
Jonathan Lane a0988461ec
[E2E] Tests for coupon usage restrictions (#43590)
* Changelog

* Tests for restricted coupons

* Update to test checkout not cart… which is what I should have been using

* Removal -- from PR feedback

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-19 10:49:24 +01:00
Alfredo Sumaran f2e90aa01d
Apply Rector suggestions for PHP 8.1 (#43237)
* PHP8 Fixes for templates dir

* Add changelog entry

* Bump template version

* Bump template version number

* Update changelog entry

* Typo
2024-01-19 10:07:53 +01:00
Alfredo Sumaran 5b6897e690
Apply Rector suggestions for PHP 8.1 (#43229)
* Apply Rector suggestions

* Add changelog entry

* Update changelog entry

* Fix PHP Lint errors
2024-01-19 10:07:06 +01:00
Niels Lange 32282a00ce
Add tracking for incompatible extensions (#42816)
* Add tracking for incompatible extensions

* Separate tracking data
2024-01-19 13:03:33 +07:00
Chi-Hsuan Huang 5bdc56e287
Fix activity panel showing incorrect currency (#43733)
* Fix activity panel showing incorrect currency

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

* Use store currency setting when order currency is different from the store currency

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-19 12:20:36 +08:00
Atanas Penchev 32ca8c16f2
Replace FlexSlider $.fadeIn() with vanilla .animate() (#41979)
* Vanilla .animate() instead of jQuery .fadeIn()

* Slider .animate() keyframes are now a list with 2 objects

[{ marginLeft: old }, { marginLeft: new }] keyframe syntax instead of
{ marginLeft: [old, new] } keyframe syntax for consistency

* Changelog

* Tweak changelog.

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-01-18 15:30:51 -08:00
Ivan Stojadinov 50b4275174
[e2e] Expand simple product creation with more details (#43710)
* Expand 'can create simple non-virtual product' test

* Expand 'can create simple non-virtual product' test

* revert line break

* changelog add

* Revert "changelog add"

This reverts commit 0aa8f62cf7.

* Changelog - add update details

* Use getBy* where appropriate

* Add more geyBy*s

* Add more geyBy*s #2

* Add API calls to delete category and tag

* Update productCategory
2024-01-18 09:59:15 -08:00
Gan Eng Chin 6246cf6ff2
Marketing: Add "Sales" column in Campaigns card (#43284)
* Add sales property to MarketingCampaign class.

* Return campaign sales data in API.

* Display Sales in Campaigns card.

* Fix test for useCampaigns.

* Display a "-" when there are no cost or sales value in Campaigns card.

* Add changelog.

* Fix test for useCampaigns hook.

* Fix PHP lint issue.
2024-01-19 01:42:35 +08:00
Luigi Teschio c6e5d0d504
CYS - Core: Create dummy products (#43784)
* CYS - Core: Create dummy products

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 15:52:49 +01:00
Alba Rincón 589259f39f
[CYS on Core] Intro screen - Update the copy depending on whether the user already started to customize their store (#43690)
* Add new banner for no-Ai existing theme

- Add new banner
- Update copy
- Refactor the theme preview structure

* Make preview optional

* Remove log

* Remove unused param

* Fix linting error

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 14:59:10 +01:00
Niels Lange 7cd04dfa5a
Add e2e test to hover Mini Cart totals (#43693)
* Add e2e test to hover Mini Cart totals

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

* Optimise hover test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 20:06:28 +07:00
Thomas Roberts bf61e57ce4
Ensure "email" field id does not include the section ID (#43734)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 04:33:50 -08:00
Albert Juhé Lluveras 91d0e16151
Convert block templates tests to parametized tests (#43778)
* Convert block templates tests to parametized tests

* Use frontendUtils.addToCart() when possible

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 13:29:07 +01:00
Albert Juhé Lluveras 6c3f8cb6fb
Add e2e tests to verify block templates can be customized if the theme has its own custom templates (#43650)
* Update commands to run e2e tests

* Capitalize Product Catalog template name

* Create tests with block theme with templates

* Create Block Theme with Templates test environment

* Update classic theme commands

* Code cleanup

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

* Code cleanup (II)

* Add config to blocks-playwright.yml and remove unnecesssary .github/workflows/playwright.yml file

* Remove unnecessary imports from product-catalog-template.block_theme_with_templates.spec.ts

* Update blocks e2e commands to pnpm

* Replace hardcoded strings with a variable

* Unify all 'block theme with templates' tests in a parameterized test

* Create a testData object for the Mini-Cart template part test

* Fix some code styling issues

* Create a testData object for the Mini-Cart template part test (II)

* Remove duplicate userText variable

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 11:39:24 +01:00
Manish Menaria 8c284a5074
[Product Collection] Add unique ID attribute (#43314)
* Add unique ID attribute to Product Collection block

In this update, we introduced a unique identifier for each instance of the Product Collection block. This change involves several key modifications:

1. **Block JSON Update**: Added a new `id` attribute in `block.json` to store the unique identifier for each block instance.

2. **Product Collection Content Update**: In `product-collection-content.tsx`, we utilized the `uuid` library to generate a unique ID. This is done in a `useEffect` hook, ensuring that each block instance receives a distinct ID upon initialization.

3. **Type Definitions**: The `ProductCollectionAttributes` interface in `types.ts` was updated to include the new `id` attribute, aligning with our enhanced data structure.

4. **Package Dependencies**: To support this feature, `@types/uuid` and `uuid` were added to `package.json`, ensuring we have the necessary tools for ID generation.

This enhancement is pivotal for uniquely identifying each Product Collection block, paving the way for more robust and individualized block handling in the future.

* Rename uniqueId to id

* Add lock file

* Add 'id' context to product collection and template

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

* Merge trunk with 42861-introduce-a-unique-identifier-for-each-product-collection-block

* Regenerate the lockfile

* Remove autogenerated change in plugins/woocommerce/package.json

* Regenerate lock file

* Rerun CI actions

* Delete pnpm-lock.yaml file & regenerate it using pnpm install command

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 15:30:57 +05:30
Luigi Teschio 0a98e5acd6
[CYS - Core] Switch to TT4 when the flow starts (#43740)
* CYS - Core: add unit test

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

* fix description

* Enable TT4 when the customize your store process starts

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-17 15:09:12 +01:00
Matt Sherman 824dc6be51
Remove BlockTemplateRegistry (#43589) 2024-01-17 07:12:12 -05:00
Vlad Bozdog 4966697b7f
41827-improve-coupon-usage-by-user-query-performance (#43731)
The sql query can be slow on big data sets, because the post meta value is type of string, and we are quering with a number.
2024-01-17 11:29:28 +01:00
Vedanshu Jain 90b3e11dba
HPOS: Remove buggy check in the data cleanup tool. (#43727)
* Add refund order to unit test.

* Remove buggy defensive check since existance of order is already verified.

* Changelog.

* PHPCS fixes.

* Added more assertions after cleanup to verify cleanup worked.
2024-01-17 14:58:11 +05:30
Chi-Hsuan Huang 8b567dcbc7
Update payment partners 2024 q1 (#43514)
* Remove eway and zipco

* Add Airwallex

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

* Fix lint

* Update airwallex images

* Fix category_other value

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-17 09:40:08 +08:00
Alexandre Lara 8258919e22
Product Gallery block: Remove the experimental flag from the Product Gallery block (#43586)
* Remove the experimental flag from the Product Gallery block

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 21:05:47 -03:00
Karol Manijak 1dd23f8eeb
Product Collection: add E2E tests to Editor filters - by featured products, by created date, by price range (#43473)
* Add test to Product Collection - featured products filters

* Open Featured option before trying to set it up

* Add test for Created filter

* Add missing awaits

* Add tests for a price range filter

* Add explanation to test step

* Update the conditions for created filter

* Add changelog

* Change leftover values

* Empty commit - trigger CI
2024-01-16 20:59:27 +01:00
Vedanshu Jain 4b401e59de
Add support for specifying filters when searching orders. (#43356)
* Add the UX element dropdown for search box.

* Add unit test for search_filter param.

* Add support for search filter in search query for better performance.

* Link search_filter dropdown with query param.

* Fix conflicts.

* Reformat to allow adding more filters in future.

* Fixing margin in the search filter box.

* Fix merge conflict.

* Apply linting.

* Add changelog.

* Apply PR suggestions.

* Grammer fixes.
2024-01-16 20:37:16 +05:30
Mike Jolley 1dee94362f
[Experimental] Surface additional checkout fields on Order Confirmation page (#43449)
* Get default attributes on front end

* Remove console log

* Show notice about 0 registered fields in editor

* Do not show block in editor if no fields are registered

* Wrapper block

* Styling/spacing

* Update webpack config

* Register heading pattern

* Wrapper block type definition

* get_fields_for_location return fields in array format

* Use wrapper in default content

* Separate fields from the hook block

* Hide when no custom fields exist

* Address and contact fields

* Shared form fields in settings

* remove info block from wrapper

* Revert render_content to original

* rename block

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

* Update styling

* Create shared get_order_additional_fields_with_values to format values

* Update block names and descriptions

* Show address placeholders

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

* Unused import

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 13:17:28 +00:00
Luigi Teschio dc0fd26917
CYS - Core: add unit test for the `NoAI` flow state machine (#43692)
* CYS - Core: add unit test

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

* fix description

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 14:01:31 +01:00
Thomas Roberts c776fb63bc
[Experimental] Add custom validation hooks for additional checkout fields (#43435)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 03:01:51 -08:00
Alba Rincón b9f447b101
Update copy for CYS intro screen sidebar (#43551)
* Update copy for CYS intro screen sidebar

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

* Avoid using variables in __()

* Add missing period

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-01-16 09:07:47 +01:00
Karol Manijak c531067daf
Improve the selector determining the products are loaded in Product Collection tests (#43464)
* Improve the selector determining the products are loaded in Product Collection tests

* Add changelog

* Update plugins/woocommerce/changelog/test-42038-make-product-collection-e2e-tests-more-robust

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-01-16 08:31:22 +01:00
Niels Lange 9779f0a022
Migrate mini cart tests (#43549)
* Migrate mini cart tests

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

* Adjust broken e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-16 13:58:54 +07:00
Adrian Moldovan 04154eee09
[e2e tests] New test that checks a customer can comment on a post (#43419)
* Add new spec for checking comments on a post

* Add changelog

* Update locators to use geBy methods

* Update locators to use geBy methods

* Fixed strict mode violation
2024-01-15 15:24:22 -08:00
Thomas Roberts 23db3eff69
[Experimental] Handle adding attributes during fields registration (#43379)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-15 14:59:36 -08:00
Jonathan Lane f7e8b676d6
Change HPOS and non HPOS e2e tests to use 5 shards each (#43672)
* Change HPOS and non HPOS e2e tests to use 5 shards each

* Add changelog

* Update numbering

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-15 14:18:57 -08:00
Christopher Allford 95bc1189e5
Update `wireit` & Optimize Builds (#43595)
This bumps the version to 0.14.3 so that we can take advantage of some
upstream improvements. It also makes some changes to the way our
builds and watches work to minimize the number of unnecessary
Node processes involved in the execution.
2024-01-15 14:06:55 -08:00
Danny Dudzic 43be71a52f
[Experimental] Product Gallery: Update div elements to ul/li for better accessibility (#43612)
* Product Gallery: Update div elements to ul and li for better accessibility

* Product Gallery: Add changelog files

---------

Co-authored-by: roykho <roykho77@gmail.com>
2024-01-15 13:04:03 -08:00
Christopher Allford 31c170f80c
Added Missing Lint Build (#43665)
Unfortunately, it looks like we need to build in order
to be able to lint. This makes sense since some
projects will lint imports from others that haven't
been built yet.
2024-01-15 12:30:54 -08:00
Alejandro López Ariza cb269e47ab
Update stable tag to 8.5.1 (#43671)
woorelease: Update stable tag to 8.5.1
2024-01-15 20:38:09 +01:00
Adrian Moldovan 357e37819f
[e2e tests] Add new spec for remove product tests (#43518) 2024-01-15 20:23:30 +02:00
Tarun Vijwani d329ced1e8
E2E tests migration: performance -> cart (#42943)
* Add Performance Util class to evaluate performance

* Add performance logging in cart block test

* Remove additional comments

* Migrate Cart  E2E performance tests to Playwright

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

* Refactor performance calculations in PerformanceUtils page

* Fix linting errors

* Replace beforeAll with beforeEach

* Fix directory creation in performance-utils.page.ts

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-01-15 21:03:24 +04:00
github-actions[bot] 33ae0d607d
Delete changelog files based on PR 43641 (#43646)
Delete changelog files for 43641

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-15 16:06:42 +00:00
Maikel Perez d853af297b
Improve the validation process when changing the product type (#43564)
* Remove the required validation constraint from the LINK TO THE EXTERNAL PRODUCT field

* Add changelog file
2024-01-15 12:49:24 -03:00
Alba Rincón 50c7e51d86
Add "No AI" banner image and center banner content (#43547)
* Add "No AI" banner image and center banner content

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-15 14:17:33 +01:00
Karol Manijak 2c628a2938
Product Collection: add E2E tests to Editor filters - by tag and by stock status (#43548)
* Add test to check Product Collection filtering by tags

* Set single product out of stock and unskip the test for stock status

* Add changelog

* Use more specific selector

* Update variables holding products in products.sh to keep the same convention
2024-01-15 11:25:49 +01:00
Leif Singer 89cb0f7cef
clarify comment in maybe_sync_order (#43573)
* clarify comment in maybe_sync_order

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

* appease the linter

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-15 10:24:29 +01:00
Vedanshu Jain e1f57da0ad
Use GMT date when fetching cancellation orders. (#43641) 2024-01-15 09:09:19 +01:00
Christopher Allford 758df4854d
Use `ci-jobs` Utility For `ci.yml` Matrix (#43532)
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
2024-01-12 20:32:14 -08:00
Maikel Perez 4f8922aa0b
Remove Variable product template from the product template list (#43422)
* Remove variable-product-template from the product template list

* Add changelog files

* Redirect the variable product to the new experience now that is does not have a product template anymore

* Fix php linter error
2024-01-12 18:47:15 -03:00
Alexandre Lara 4b5c6982e4
[Experimental] Product Gallery block: Prevent page from scrolling when pop-up is open (#43378)
* Prevent body from scrolling when pop-up is open

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

* Add namespace to the modal-open css class

* Fix class name for the Product Gallery block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 15:10:33 -03:00
Vlad Olaru 469b74433c
Fix Subscriptions autorenewals column for WooPayments pre-install promo in Settings > Payments (#43436)
* Do not sanitize WooCommerce Subscriptiion column HTML in Settings > Payments methods table

* Add features supports entry to pseudo-gateway WCPay Promotion

* Add changelog

* Add changelog entry for woocommerce-admin

* Lint fixes
2024-01-12 19:05:29 +02:00
Matt Sherman ee6642e0c7
Product Editor: Load layout templates from the REST API (#43384)
* Move ProductTemplate type

* useProductTemplate

* Use useProductTemplate

* Use useLayoutTemplate

* Handle if window.productBlockEditorSettings doesn't exist

* Unit tests for useProductTemplate

* Fix fallback in useProductTemplate

* Remove layoutTemplates from ProductEditorSettings on client

* Fallback to simple-product layout template

* Unit test to verify the standard product template is used if product type is variable

* Use standard product template if product type is variable

* Unit test to verify product type is used to match if product template id matches a template with a different product type

* Make sure product type matches on product template, unless variable, in which case we match simple

* Remove layoutTemplates and layoutTemplateEvents from global

* Changelog

* Changelog

* Import types only
2024-01-12 11:54:35 -05:00
github-actions[bot] ad735b2bf2
Delete changelog files based on PR 43550 (#43568)
Delete changelog files for 43550

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 17:00:10 +01:00
github-actions[bot] 69360cd93e
Delete changelog files based on PR 43497 (#43563)
Delete changelog files for 43497

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:52:50 +01:00
github-actions[bot] f6f7c076f4
Delete changelog files based on PR 43504 (#43523)
Delete changelog files for 43504

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:52:02 +01:00
github-actions[bot] 6dba702341
Delete changelog files based on PR 43506 (#43539)
Delete changelog files for 43506

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:51:44 +01:00
Jonathan Lane ac5ffdae46
Move e2e HPOS disabled tests to matrix (#43537)
* Move e2e HPOS disabled tests to matrix

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-12 10:30:10 -04:00
Alba Rincón be1c794387
Remove the `patterns_ai_data` post from DB when resetting the CYS (#43499)
* Call the `/wc/private/ai/patterns` to remove the `patterns_ai_data` post from the db

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:58:32 +01:00
Luigi Teschio 5edea79b41
CYS: fix php warning raise by the Product Collection block (#43546)
* CYS: fix php warning raise by the Product Collection block

* fix typo

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:44:06 +01:00
Albert Juhé Lluveras aa661f2234
Fix Mini-Cart price disappearing on hover (#43550)
* Fix Mini-Cart price disappearing on hover

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:39:34 +01:00
Roy Ho 5d87130b43
[Experimental] Product gallery/remove default (#43487)
* Remove Product Gallery block as default

* Add beta label to Product Gallery block title

* Add changelog files
2024-01-11 18:03:58 -08:00
Niels Lange 780196a5b0
Fix notice template overwrites (#43506)
* Fix notice template overwrites

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

* Bump template versions

* Changing template version numbers to 8.5.0 as they haven’t been touched

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 22:12:55 +01:00
Jorge A. Torres 9ce508f47d
Add HPOS CLI tool to compare an order between datastores (#43173)
* Add `wp wc hpos status` command

* Add helper method to build order from different datastores

* Add helper method `get_diff_for_order()` to compare orders between datastores

* Add CLI tool `wp wc hpos diff` to compare an order between datastores

* Add changelog

* PHPCS fixes

* Better format for dates
2024-01-11 16:51:01 +00:00
Luigi Teschio ac43fb2426
fix ESLint configuration regarding import path aliases (#43421)
* fix ESLint configuration regarding import path aliases

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

* fix eslint configuration

* update eslint-import-resolver-typescript version

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 16:40:38 +01:00
Vedanshu Jain c675ce53a5
Fix product prices not being updated on scheduled sale automatically. (#43497)
* Add test for scheduled date start

* Add more test around product sales.

* Simplify sales check + also check product sale price is changed.

* Apply conding standards.

* Add changelog.

* Revert changes added in 39948 with explanation.

* Revert changes added in 39948 with explanation.
2024-01-11 15:18:18 +00:00
Luigi Teschio c409fcd050
[CYS - Core] introduce route guards for the AI flow (#43481)
* CYS - Core: Setup the site with a default homepage when the assembler is loaded

* CYS - Core: Implement route guards

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 16:12:41 +01:00
Seghir Nadir 77d0a6a847
Limit cookie dedupe logic to only WooCommerce Cart cookies (#43504)
* limit check to only Woo cookies

* limit logic to woo cookies only

* add changelog

* no need for set-cookie prefix
2024-01-11 15:53:50 +01:00
Luigi Teschio c686f605e6
[CYS - Core] Update the homepage with default patterns when the assembler is loaded (#43457)
CYS - Core: Setup the site with a default homepage when the assembler is loaded
2024-01-11 15:32:16 +01:00
Paulo Arromba 99e825df1f
Migrate merchant local-pickup e2e tests to Playwright (#43057)
* Playwright migrated test file bootstrap and first test for local pickup

* Added page reload to force a new render

* Updated test description

* WIP: figuring out the fake input checkbox

* WIP: figuring out flaky state of local pickup enabled

* Fix flakey enable/disable local pickup

* Migrated remaining local pickup tests to Playwright

* Removed deprecated E2E

* Added changelog

* Corrected linting errors

* Fixed playwright/no-element-handle lint error

* Replace CSS IDs and classes with recommended built in locators

* Remove obsolete function calls

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2024-01-11 21:25:12 +07:00
Albert Juhé Lluveras 67fb8d7511
Add e2e tests to verify Products by Category/Tag/Attribute templates default to Product Catalog template (#43471)
* Add e2e tests to verify Products by Category/Tag/Attribute templates default to Product Catalog template

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 12:47:56 +01:00
Sam Seay 5fdbe63530
[Experimental] Rename Collection Filters to Product Filters (#43363)
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-01-12 00:27:33 +13:00
Veljko V b6bdfe0572
Add new E2E tests for Shopper Cart Quantity Limit and Cross Sell Items (#43333)
* Add e2e test for shopper cart quantity limit and cross sell items

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-10 11:36:32 -08:00
Veljko V eb49308781
Add new E2E tests to cover Shopper Checkout Block flow (#41218)
* Add few E2E tests to cover half of the milestone

* Improve welcome modal closing

* Add new test scenarios

* Add more tests to cover creating account and shipping

* Update shipping zone labels to fulfil latest design changes

* Add tests for checkout block coupons and cart block coupons

* Remove only flag leftover

* Add checkout block tax tests and merge with cart test

* Update selectors to match checkout page

* Update checkout block test and comment scenario until issue resolved

* Remove only leftover

* Update checkout block test

* Improve filling shipping and billing checkout

* Create order via API with coupon

* Include checkout filling util helper

* Update test to use get by role for alerts

* Remove only leftover

* Adjust scenario for placing an order as a customer

* Improve existing customer placing order scenario

* Add util helper for adding products to cart

* Remove leftover from testing

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-10 11:36:11 -08:00
Jonathan Lane 9c2048f029
Shard e2e test execution on CI (#43056)
* Try sharding e2e tests

* Update reporter for merge

* Add changelog

* Change to trigger CI

* Update job name to match existing run

* Install with dependencies

* Set working directory

* Only run 2 workers at a time on CI

* Try single run, but 6 shards

* Simplify welcome modal closing util helper

* Switch to more simpler way of closing welcome modal

* Fix flakiness in create shipping zone test

* Try 10 shards

* Drop CI retries to 2 from 4

* Update path to reports

* Fix syntax error in GH file

* Remove working directory

* Update directories

* Path again

* Use Allure dir

* Fix merge step

* Install dependencies

* Setup repo in report merge

* Commands to merge reports

* Set working directory

* Update actions

* Name upload artifacts

* Just numbers for shards

* Update matrix

* Need to redeclare env variables

* Update file paths for merge step

* Remove working directory for merge step

* Try absolute paths

* Missed a path

* Put all artifacts in single download folder

* Tweak download action

* Might not have to merge reports

* Fix typo

* Update path for summary report

* Update results paths

* Tweak condition

* Add step to check success of matrix run

* Remove ternary per feedback

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Veljko <veljano@yahoo.com>
2024-01-10 10:42:05 -08:00
Jonathan Lane bcea0fecb9
Add conditional skip to FTUX (#43437)
* Add conditional skip to FTUX

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-10 08:33:02 -08:00
Albert Juhé Lluveras 6bc865dd9b
Add e2e tests for user customization of block templates (#43426)
* Add e2e tests for user customization of block templates

* Update instructions to run Playwright e2e tests

* Code cleanup

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

* Create revertTemplateCustomizations util

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 16:51:53 +01:00
github-actions[bot] b9f371c23b
Delete changelog files based on PR 43269 (#43467)
Delete changelog files for 43269

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-10 16:31:08 +01:00
Thomas Roberts d8331dc3f1
Add additional information block for custom checkout fields (#43274)
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 06:20:06 -08:00
github-actions[bot] 5451d1ef23
Delete changelog files based on PR 43428 (#43461)
Delete changelog files for 43428

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-10 14:48:57 +01:00
Jorge A. Torres 39ec01bceb
Fix PHP warning related to logging severity threshold (#43448)
* Fix PHP warning related to logging default severity threshold

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 13:32:35 +00:00
Bartosz Budzanowski a6705cda15
Force marketing menu items order. (#41836)
* Force marketing menu items order.

* Add changelog.

* Make sure that Overwiev is present.

* Coupons should be always second.

* Update plugins/woocommerce/src/Internal/Admin/Marketing.php

Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Admin/Marketing.php

Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>

* Use fallback for different languages.

* Use location as a fallback for names.

* Fix linting.

* Refactor.

* Remove unneded new line.

* Remove duplicated code.

---------

Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
2024-01-10 14:23:41 +01:00
Gan Eng Chin 0636a09f63
Delete old marketing recommendations transient upon update to WC 8.6.0 (#43162)
* Add MarketingRecommendations feature.

The code here is based on other feature with default fallbacks and with data source poller, e.g. see payment gateway suggestions.

* Use MarketingRecommendations feature in API.

* Add spec_key for MarketingRecommendationsDataSourcePoller.

If we don't specify it, the default is `id`, which is not used in our recommendation data, and this will cause things not to work as expected.

* Recursively convert object to array.

This is because all the subsequent functions work with arrays, not objects.

* Make recommended marketing tools and coupons use MarketingRecommendationsInit.

This is so that recommended channels, tools, and coupons make use of the same transient data with data source poller.

* Add changelog.

* Fix PHP lint issues.

* Add doc comment to fix lint error.

* Fix tests in MarketingRecommendationsTest.

* Replace recommendations.json file with generated data in DefaultMarketingRecommendations.

This is to have i18n support.

* Add icons for fallback marketing recommendations.

* Fix PHP linting issue.

* Fix linting issue.

* Fix failing tests with PHP 8.0.

* Remove unused replaced code in MarketingSpecs.

* Delete old marketing recommendations transient upon update to WC 8.6.0.

* Add changelog.
2024-01-10 21:05:36 +08:00
Chris Lilitsas e24aabff04
Introduce a new block style for the Product Details block and set it as default (#42965)
* Introduce the minimal block style for productDetails block

* Change the default style in the template

* Change the default template when using the transform-to-blocks button

* Cleanup

* Organize CSS selectors

* Add opacity on hover

* Fix specificity and add explanation

* Cleanup

* Changelog
2024-01-10 14:08:48 +02:00
Karol Manijak 30888d7f1b
Product Collection: Rename "Inherit query from template" option and make description contextual (#43270)
* Update the copy of Inherit Query from template and make it contextual

* Add changelog
2024-01-10 12:40:05 +01:00
Tung Du 8fb3d394a5
[Experimental] Add basic e2e test for new filter blocks (#43392) 2024-01-10 18:17:00 +07:00
Gan Eng Chin 6802b2720a
Add Default Fallback Marketing Channel Recommendations (#43001)
* Add MarketingRecommendations feature.

The code here is based on other feature with default fallbacks and with data source poller, e.g. see payment gateway suggestions.

* Use MarketingRecommendations feature in API.

* Add spec_key for MarketingRecommendationsDataSourcePoller.

If we don't specify it, the default is `id`, which is not used in our recommendation data, and this will cause things not to work as expected.

* Recursively convert object to array.

This is because all the subsequent functions work with arrays, not objects.

* Make recommended marketing tools and coupons use MarketingRecommendationsInit.

This is so that recommended channels, tools, and coupons make use of the same transient data with data source poller.

* Add changelog.

* Fix PHP lint issues.

* Add doc comment to fix lint error.

* Fix tests in MarketingRecommendationsTest.

* Replace recommendations.json file with generated data in DefaultMarketingRecommendations.

This is to have i18n support.

* Add icons for fallback marketing recommendations.

* Fix PHP linting issue.

* Fix linting issue.

* Fix failing tests with PHP 8.0.

* Remove unused replaced code in MarketingSpecs.

* Remove unneeded false check.

This is because `is_array` would return `false` when `false` is being passed as the argument.

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

---------

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
2024-01-10 18:39:59 +08:00
And Finally b62c3bc2f4
Do not access change_feature_enable() statically. Closes #43175. (#43428)
* Do not access change_feature_enable() statically. Closes #43175. Copy of @helgatheviking's cd71d08577.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 09:43:03 +00:00
Corey McKrill 4ecbaf573c
Logging: Add settings UI to configure the logger (#42979)
* Centralize log level labels

* Fire an action specific to loading the Logs tab

* Functional settings screen (no way to navigate to it yet)

* Deprecate wc_register_default_log_handler

* Hook up the settings

* Add section nav

* Add an action hook to the settings form

* Rename render_page method to render_form

* Scaffold the unit tests

* Remove logging enabled check from WC_Logger construct

Caching the enabled setting value turns out to not be a great idea,
it breaks some tests, and could cause issues if the setting value
changes, and then a logging event happens later in the same request.

WP has its own caching layer for options anyway, but one that will
update if the value of the option changes. So this just makes the
enabled check directly from the should_handle method.

* Add most unit tests. Still needs a couple more

* Add remaining unit tests

* Update since values on new hooks to 8.6.0

* phpcs cleanup

* Change deprecated tag from 8.5.0 to 8.6.0

* Add missing return types to unit tests

* Add changelog file

* Add missing clear method to new log file handler

* Change level_threshold default value to 'none'

* Ensure logger has a valid level threshold set, regardless of level given

* Update legacy unit test

* Ensure settings only saved on settings view

* Add settings sections for filesystem and database

Also add a filesystem setting for collapsing log entry lines.

* Add public LoggingUtil class for external usage, and use in WC_Logger

* Remove unused import

* Deprecate wc_get_log_file_path and wc_get_log_file_name

* Preserve white space in log file lines

It turns out that several extensions add log entries that are just
a print_r of an array. Preserving the white space is important for
making this data legible (ideally they'd switch to adding this data
within the context parameter)

* More legacy unit test fixes

* Remove entry collapse option and functionality

It's unclear right now that entry collapsing provides much real
benefit, while it clearly does have some potential drawbacks if
extensions are in use that add print_r output to the log files.

* phpcs cleanup

* Yet more unit test tweaks

* Remove unused code

* Don't wrap extra handler options in <code>, it gets excaped

* Attempt fix for WC_Tests_Logger::test_clear

This is only failing on GH CI, not when running locally. Maybe
ensuring all the created log files are deleted will help.

* Improve logging of fatal errors

This improves the formatting of error messages caught and logged
during shutdown to be more legible and to take advantage of the
logging method's context parameter. With this change, the log entry
will be a simple message on one line, and any stack trace will be
available but hidden in an "Additional context" details element.

* Tweaks to some settings' wording

* Update webooks link to logs, undeprecate

* Remove `realpath` usage since it deos not work if log directory does not already exists.

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-01-10 14:44:05 +05:30
Alba Rincón a38c7bcccf
CYS: fix PHP warnings and pattern button (#43354)
* Remove custom styles from button

* Avoid php warning about images and slug not defined

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

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

* Fix linting errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 09:03:56 +01:00
berislav grgičak c018d7751b
Redirect Woo.com connect request to selected page (#43315)
* Working redirect

* Dynamic connect urls

* Clean up

* Changelog
2024-01-10 07:20:15 +01:00
Chi-Hsuan Huang 2c122ba446
Track core profiler individual plugin installation success/failure (#43309)
* Track core profiler individual plugin installation success/failure

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

* Log coreprofiler_store_extension_installed_and_activated async failures

* Log coreprofiler_store_extension_installed_and_activated sync success

* Rename track prop key

* Track error_message for recordFailedPluginInstallations

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 11:48:34 +08:00
Maikel Perez 1ad48760c9
Redirect supported product types to the new experience based on the product template associated to it (#43341)
* Redirect supported product types to the new experience based on the product template associated to it

* Add changelog file

* Fix linter error

* Redirect using the product type first and then the associated product template

* Set the product template id also for unsupported product templates

* Add changelog file

* Remove supported_product_types from the RedirectionController since the product_templates is used instead

* Fix php linter error
2024-01-09 18:31:25 -03:00
Alejandro López Ariza ed015e5485
Update stable tag to 8.4.0 (#43425)
woorelease: Update stable tag to 8.4.0
2024-01-09 16:51:08 +01:00
Luigi Teschio 1453597400
CYS - Core: implement 'noAI' flowType (#43368)
* CYS - Core: implement 'noAI' flowType

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

* remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 15:49:59 +01:00
Ismael Martín Alabarce 45377e63be
Update WooPayments task copy (#43365)
* Update WooPayments task copy

* Add changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 12:43:47 +01:00
Alejandro López Ariza 937b6d66c8
Update stable tag to 8.5.0 (#43402)
woorelease: Update stable tag to 8.5.0
2024-01-09 11:21:42 +01:00
Daniel Dudzic 3be8264c5d
[Experimental] Product Gallery Pager: Improve accessibility (#43348)
* Product Gallery Pager: Improve accessibility

* Product Gallery Pager: Fix number pager styling
2024-01-09 10:48:49 +01:00
Denis Dvali aa4fda8b27
Remove v1 of plugin installer (#37893)
* Remove v1 of plugin installer.

* Rename WC_REST_WCCOM_Site_Installer_Controller_V2 into WC_REST_WCCOM_Site_Installer_Controller.

* - Create base controller for WCCOM Site requests, extended by Installer and SSR controllers.
- Switch get SSR endpoint to v2 namespace.

* Remove namespace property from Installer controller.

* Linting.

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

* Switch request method of reset install endpoint to POST (#43150)

- Switch reset installation state request to POST.
- Change wccom-site API namespace to v3.

* Exclude deleted files from linter check (#43355)

Exclude deleted files from linter check.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 09:23:13 +00:00
Tom Cafferkey b58a1932fe
Block Hooks API: Abstract Block Hooks code into a separate trait class (#43250)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 08:41:42 +00:00
github-actions[bot] 4f6f7aa8c6
Delete changelog files based on PR 43344 (#43388)
Delete changelog files for 43344

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-09 00:05:51 +00:00
Alexandre Lara 65d9c6764c
[Experimental] Product Gallery block: Rename media setting to "Open pop-up when clicked" (#43302)
* Rename media setting to "Open pop-up when clicked"

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-08 16:58:27 -03:00
Gan Eng Chin 8b1df6c946
Fix "rm: .git/hooks: No such file or directory" error in `pnpm install` when the directory is missing (#43142)
* Fix "rm: .git/hooks: No such file or directory" error in `pnpm install`.

* Add changelog.

* Use "rm -rf" instead of "test" command on .git/hooks directory.

We use the "-f" flag so that it does not throw error when the directory does not exist.
2024-01-08 14:13:42 -04:00
jonathansadowski ce3a38ac55
Try reducing blocks build size (#43344)
* Try reducing blocks build size

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

* Only set NODE_ENV if its not already defined

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-08 11:33:49 -06:00
Tomek Wytrębowicz fa62e63037
Make OSA fields extendable, simplify naming (#41690)
- Use `referrer` & `source_type` field names consistently
   Remove the need to translate it back and forth.
- Make fields actually extendable using `wc_order_attribution_tracking_fields`.
   Propagate the field configuration to the client side as well.
   Disambiguate fields in variables and functions.

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2024-01-08 16:17:04 +01:00
Jorge A. Torres ebb6b0fe54
Fix possible duplication in certain HPOS related Tracks events (#43318)
* Fix possible duplication of HPOS related Tracks events

* Add changelog
2024-01-08 20:12:37 +05:30
Thomas Roberts c159e8a858
Update Checkout Fields error reporting to use `_doing_it_wrong` instead of wc logger (#43283)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-01-08 03:16:08 -08:00
Karol Manijak 8d4f1cecec
Product Collection: Make sure all variations are taken into account when choosing collection (#43273)
* Make sure all variations are taken into account when choosing collection

* Add changelog
2024-01-08 10:55:42 +01:00
Tung Du aab950e27a
[Experimental] Add: Filter blocks migration (#43218)
* add: upgrade panel

* add: toolbar upgrade button

* add: downgrade panel

* chore: changelog

* refactor: move the upgrade component to `Collection Filters` block
2024-01-08 16:31:06 +07:00
Tung Du 823a35a9f2
[Experimental] Add: notice informing users about the usage of filter blocks (#43262) 2024-01-08 13:43:12 +07:00
Sam Seay 1eba9c62a8
Add lint config to blocks to lint imports (#43310) 2024-01-08 18:32:15 +13:00
Maikel Perez a7627fbf0e
Linked product list empty state (#43163)
* Add product search field to the linked product list block

* Add empty state to the linked product list block

* Fix AdviceCard styles

* Create skeleton for the linked product list block

* Fix linter errors

* Move the product list skeleton to the product list component folder

* Revert AdviceCard changes

* Remove upsells and cross-sells block to use linked-product-list block instead

* Add changelog files
2024-01-05 15:26:06 -05:00
Corey McKrill f8b906000f
Remove usage of PHP 8+ function from bootstrapper (#43308)
(PHP 7.4 compat) string lib polyfills are unavailable during bootstrapping.
2024-01-05 12:03:12 -08:00
Roy Ho 6ef04bafa5
Hide sale badge if product image is disabled (#43334)
* Hide sale badge if product image is disabled

* Fix css target to cover all product grid

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

* Hide on sale badge via PHP side

* Remove css changes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 11:16:37 -08:00
Seghir Nadir e50e7799c0
Support additional fields in the Contact step for Checkout (#43088)
* add custom fields to contact info step

* fix linting

* add changelog

* adjust fields validation

* address review changes

* address sanization and validation

* fix billing address shape

* address schema issues

* cast address to array

* dont sanitize stuff that will validated

* fix linting issues

* fix cart unit test

* revert test

* fix the email issue
2024-01-05 18:35:28 +01:00
Alba Rincón 5752bd7a9f
Fix CYS updateStorePatters to use the new images endpoint structure (#43285)
* Return the correct empty images response

* Use the correct structure in the images endpoint response

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

* Throw error when no images and the store is already ai generated

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 17:56:51 +01:00
Matt Sherman 9ba256235a
Fix @woocommerce/block-templates changes not being picked up on build (#43328) 2024-01-05 11:44:25 -05:00
Luigi Teschio 3978be9fdd
fix - Product Button: don't trigger jQuery add to cart function when the button is clicked on classic themes (#43325)
* fix - Product Button: don't trigger old add to cart function when the button is clicked on classic themes

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

* improve E2E tests

* update changelog

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

* update changelog

* use beforeEach

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 17:34:16 +01:00
Roy Ho 8bbb35d63e
[Experimental] Product Gallery: Use @container rule to adjust overlay link count font size (#43294)
* Product Gallery: Use @container rule to adjust overlay link count font size

* Add changelogs

* Remove em from line height

* Make view all link smaller
2024-01-05 07:23:19 -08:00
Albert Juhé Lluveras 67ddade2fd
Delete woocommerce-gutenberg-products-block.php file (#43319)
* Delete woocommerce-gutenberg-products-block.php file

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 15:32:15 +01:00
louwie17 62e2b53a55
Fix highlight tooltip deprecation notices (#43303)
* Remove deprecated achorRect and IsolatedEventContainer usage

* Add changelog

* Remove unused code

* Add option for shouldCloseOnClickOutside
2024-01-05 08:35:06 -04:00
Tung Du 37c94c7604
[Experimental] Fix: get the correct min/max price for filtering (#43313) 2024-01-05 17:19:33 +07:00
Saad Tarhi 009ff8707b
Move shopper-side Cart E2E tests to Playwright (#42897)
* Convert empty cart E2E test

* Convert product removal E2E test

* Convert quantity update E2E test to Playwright

* Convert E2E tests of the remaining methods that update cart quantity

* Convert E2E test: Proceed to Checkout

* Convert E2E test: Cross-Sells

* Remove test files

* Update plugins/woocommerce-blocks/tests/e2e/tests/cart/cart-block.shopper.block_theme.side_effects.spec.ts

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>

* Set up cross sells products before e2e test

* Solve merge conflict

* Add changelog entry

* Remove obsolete import

---------

Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
2024-01-05 17:15:23 +07:00
Albert Juhé Lluveras b07005afd1
Fix commands with tags breaking the command palette (#43269)
* Fix commands with tags breaking the command palette

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 10:41:37 +01:00
Tung Du af2dedb137
[Experimental] Filter blocks: add the navigate function back (#43287)
* fix: add the navigate function back

* fix: move the navigate function to a dedicate file only for frontend use
2024-01-05 14:33:43 +07:00
Niels Lange 413fb72630
Fix broken link to internal *.md file. (#43261) 2024-01-05 10:48:36 +07:00
Tarun Vijwani 2b0da27fd0
Update generic incompatibility notice (#42751)
* 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

* Update generic incompatibility notice

- Update the notice description.
- Add switch to classic shortcode block button to the notice.

* Fix margin in editor.scss

* 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

* 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

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

* Add type property to notice events

* Refactor switch to classic shortcode button logic

* Use isCart for switchButtonLabel and snackbarLabel

* Remove empty div in sidebar compatibility notice component

* Refactor switch to classic shortcode button event handling

* Adjust wording

* Adjust marging and readability

* Introduce union for SwitchToClassicShortcodeButtonProps type prop

* Simplify logic

* Use proposed text

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-01-05 10:47:34 +07:00
Corey McKrill 68c147a491
Settings: Make minor corrections to the HTML markup of settings fields (#43166)
* Corrections to HTML markup of settings controls

* Remove deprecated `valign` attributes from table row elements
* Remove orphaned quotation marks from the end of table row elements

Co-authored-by: Sagehen Studio <2924107+sagehenstudio@users.noreply.github.com>

* Enable title prop for `info` setting type

This gives the `<th>` for the info setting type a closing tag
since its not self-closing. It also allows for adding a `title` prop
to the info setting type, to match all the other setting types.

* Add changelog file

* phpcs cleanup

---------

Co-authored-by: Sagehen Studio <2924107+sagehenstudio@users.noreply.github.com>
2024-01-04 16:08:31 -08:00
github-actions[bot] 88d71aa9c8
Delete changelog files based on PR 43257 (#43291)
Delete changelog files for 43257

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-04 17:08:52 +00:00
Damián Suárez 17c8354ad9
[Product Block Editor]: Be able to dismiss AdviceCard instances (#43124)
* introduce packages/js/data/src/user/types.ts pref

* be able to dismiss the Upsells advice

* rename user pref key

* typify product_advice_card_dismissed prop

* store is dismissed state in the user pref

* delegate the dismiss state to the component

* changelog

* remove console.log :'(

* fix TS issue

* fix TS issue

* changelog
2024-01-04 12:17:03 -03:00
Alexandre Lara bffe12b945
Product Gallery block: Fix e2e tests for Thumbnails block (#43060)
* Fix e2e tests for thumbnails change

* Add changelog
2024-01-04 10:38:32 -03:00
Maikel Perez f34bb52f9e
Linked product list (#43145)
* Create and register product-linked-list-field block

* Add upsells and cross-sells blocks to the simple product template

* Create formatted price component

* Add linked product table to the linked product list block

* Add remove product button to each product row

* Add see product page button

* Add link to the product name so it can be edited in a new tab

* Fix some styles

* Add product search field to the linked product list block

* Fix styles

* Add changelog files

* Fix linter error

* Fix rebase conflicts

* Use useProductEntityProp instead of useEntityProp within product-linked-list-field block

* Move the product list to its own component

* Move the product select to its own component

* Move the product image to its own component

* Fix linter error
2024-01-04 08:34:53 -05:00
Niels Lange 0cffd32875
Remove old noticed on classic checkout when applying coupon code (#43244)
* Remove old noticed on classic checkout when applying coupon code

* Remove old noticed on classic checkout when applying coupon code

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 12:31:00 +01:00
Alba Rincón f528361ec2
Show default patterns and products if the images request fails (#43157)
* Show default patterns and products if the images request fails

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

* Remove space

* Simplify condition

* Removed unused call

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 12:11:00 +01:00
Karol Manijak 4128bff64c
Fix incorrect layout of Product Collection placeholder on Firefox (#43264)
* Fix incorrect layout of Product Collection placeholder on Firefox

* Add changelog
2024-01-04 11:20:57 +01:00
Alba Rincón 9d86e1f038
Remove the double quotes from the AI generated content before saving it (#43249)
* Remove the double quotes from the AI generated content before saving it

This will avoid having two consecutive double quotes and breaking the JSON.

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 09:47:28 +01:00
Kyle Nel 4428d81b12
Display ratings on marketplace product cards (#43240)
* Add rating and change product card layout

* Fix some minor CSS bugs in existing code

* Implement skeleton loader

* Update theme card styling to match design

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


---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 10:07:00 +02:00
Sam Seay faf1c6f09e
[Experimental] Use variations to provide all the product filters wrapped by CollectionFilters block (#43216)
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-01-04 18:33:59 +13:00
Siddharth Thevaril a6ea063cba
Fix payment gateway doc (#43238)
* Fix namespace

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 12:07:07 +07:00
Tung Du de1d60ebe4
[Experimental] Add Widget support to new collection filter blocks (#43153) 2024-01-04 11:56:24 +07:00
Sam Seay 73160b3c41
[Experimental] Filter out filter options that would result in 0 products. (#43220) 2024-01-04 17:23:40 +13:00
kevinbates 7f7515aa1c
Update readme.txt (#43257)
* Update readme.txt : updated the intro text and added 3 links.

* Changelog.

---------

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2024-01-03 19:18:57 -08:00
Leif Singer a81cfff412
Add tests for searching for multiple term IDs (#43089)
* correct copy/paste error

* test searching by multiple tag IDs

* test searching by multiple category IDs

* add the changelog file
2024-01-03 19:18:22 -08:00
Matt Sherman a8dab20997
Layout templates REST API (#43067)
* Endpoint shell

* Single layout template route

* Add area query arg

* Fix BlockTemplateRegistry::get_registered() return type

* Check if templates are registered before registering

* Use json format for layout templates response

* Remove unused use

* Use json format for layout templates response for get_items

* Consolidate processing for get_items and get_item

* LayoutTemplateRegistry

* Fix matching by id

* Get templates from LayoutTemplateRegistry

* Remove unused method

* Fix typo in code doc

* Move template instantiation to registry

* Return template instance, not json when instantiating

* Use LayoutTemplateRegistry instead of BlockTemplateRegistry

* Add code docs for rest controller

* Fix code doc in BlockTemplateRegistry

* Code docs for LayoutTemplateRegistry

* Changelog

* Add code doc for LayoutTemplatesServiceProvider

* Unit test for registering a layout template

* Unit tests for invalid params when registering layout template

* Unit test for layout template instantiation

* Unit test for instantiating layout templates with query params

* Unit test for layout template instance caching

* Cache layout template instances

* Refactor layout template info querying

* Add unit test for layout template instantiation actions

* Add before and after layout template instantiation actions

* Use layout template ID for array key

* REST API unit test to get all items

* Unit test for unregister_all

* Method to unregister all layout templates

* REST API unit test to get all items for a specific area

* Fix to_json() in TestLayoutTemplate

* REST API unit test to get single item

* Fix get_item

* REST API unit test for single item with invalid id

* REST API unit test for get all items for invalid area

* Fix test_cached_instances - array access

* Test that old register hook is called

* Call old register hook

* Remove before hook (will put in separate PR)
2024-01-03 20:02:38 -05:00
Denis Dvali 280fe7cd51
Fix occurrences where Installer_Error exception is returned instead of being thrown (#43108)
* Fix occurrences where Installer_Error exception is returned instead of being thrown.

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

* Add @throws tag in function comment.
2024-01-03 14:59:08 -08:00
Tomek Wytrębowicz 70b22764a9
Fix Consent API integration with OSA (trunk-based) (#43012)
- Stop tracking order attribution when the consent is revoked on the same page.
   Switch `wp_consent_type_defined` to VanillaJS event, as this is what the latest Complianz dispatches.
   Remove jQuery dependency.
   5427807509
- Update checkout block data when consent is given/revoked on the same page
   263d0b8a14
- Register WPConsentAPI integration for OrderAttribution
   cde9f642a1
- Don't store empty meta values for order attribution 
   If no values at all are sent, don't create meta records
   00b83eed00
- Don't translate or add parenthesis to unknown placeholder
   bbc4b1f699
- Un-hardcode marketing category in wp-consent-api-integration.js
   45014a715a

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2024-01-03 22:36:35 +01:00
Damián Suárez b6f8ab94f5
[Woo beta tester]: add User Preference panel (#43125)
* introduce UserPreference panel

* render user preference panel

* expose UserPreferences type

* introduce force mode to update user pref

* rename global object with `__wcbt`

* changelog

* changelog
2024-01-03 17:42:18 -03:00
rodelgc 12e65af8ca
Fix WooAF changelog typo and release date (#43254)
* Fix typo

* Fix `acceleratedReleaseDate` output

* Comment unnecessary steps, jobs

* Do only a dry-run

* Revert "Do only a dry-run"

This reverts commit a41ea99401.

* Revert "Comment unnecessary steps, jobs"

This reverts commit 97985a0ad0.

* Add changelog
2024-01-03 12:56:39 -06:00
Albert Juhé Lluveras 263011bdd2
Prevent Command Palette scripts to enqueue unnecessary scripts in the editor (#43221)
* Prevent Command Palette scripts to enqueue unnecessary scripts in the editor

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

* Properly set script asset dependencies

* Create util function to simplify the code

* Fix JS warning when registering WooCommerce Commands

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-03 18:07:43 +01:00
Daniel Dudzic 7163d610e5
Product Gallery: Fix Large Image snapping position on window resize (#43251)
* Product Gallery: Fix Large Image snapping position on window resize

* Product Gallery Snap Fix: Add changelog
2024-01-03 17:46:43 +01:00
Niels Lange ce625318cf
Update contributors list (#43182)
* Update contributors list

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

* Add changelog entry

* Add contributors of WooCommerce Beta Tester

* Delete duplicate changelog entry

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-03 18:02:30 +07:00