Commit Graph

21362 Commits

Author SHA1 Message Date
Nathan Silveira c16b5e578b
Add new unique ID to the classic product form (#49312)
* Update wc_update_product_lookup_tables_column function

* Rename error message

* Create 'form-flex-box' class and increase icon size

* Persist global_unique_id for main product and variations

* Add global unique id field to main product

* Add global unique id field to variations

* Add changelog

* Update error message
2024-07-10 20:06:29 +00:00
Daniel W. Robert e0d6c981ea
CYS: Add `rel="noreferrer"` to External Fiverr Link (#49314)
* Add `rel="noreferrer"` to external link

This is a precautionary security measure to to prevent the new page
from accessing the original page’s `window` object.

See pb22l9-304-p2 (internal link) for additional context.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 15:41:48 -04:00
Jonathan Lane a50a2a95b0
Fix failing e2e tests on daily run (#49313)
* Fix inability to activate twentytwenty theme

* Fix linting error

* Fix command palette test

* Change locator for Gutenberg tests

* Revert locator — Gutenberg adds an iframe

* Use regex for command palette

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-10 13:26:08 -03:00
piinthecloud cae3937ee6
Revert move docs (#49354)
* revert moving docs to main folder ahead of issues with subcategories

* add changelog

* add changelog
2024-07-10 17:33:15 +02:00
piinthecloud ec82b3f08f
move checkout docs with front matter to main folder (#49186)
* move checkout docs with front matter to main folder

* add manifest

* add core changelog

* Remove emojis, unsupported links and table of contents

* pr comments

* update folder name and remove toc

* title fix

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-07-10 16:53:52 +02:00
Miguel Pérez Pellicer 39b8b23fc8
Fix order_count inconsistency between stats and reports (#49283)
* Fix order_count consistency between stats and reports

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 17:19:33 +04:00
Vladimir Reznichenko 4311640de2
Monorepo: caching deps per target package in GH actions (#49020)
In this PR, we are implementing per-package build and caching, which optimizes build and fetching cached dependencies times across our workflows.
2024-07-10 14:39:49 +02:00
Néstor Soriano f1399c9d77
Fix the namespace of the RestApiControllerBase class (#49333)
* Fix the namespace of the RestApiControllerBase class

* Add changelog file
2024-07-10 13:10:03 +01:00
Sam Seay eaf57e9f15
Create a separate bundle for cart and checkout (#48010) 2024-07-10 21:23:17 +12:00
Adrian Moldovan a862dab4f7
Disable Metrics job in CI (#49328) 2024-07-10 11:12:23 +03:00
Alba Rincón fb421397be
CYS - Bring back footer and header borders on hover and selected patterns (#49299)
* Bring back footer and header borders on hover and selected patterns

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

* Fix the selected pattern color

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 09:14:23 +02:00
Alba Rincón 620fd4efed
CYS - Update delete button copy to `Delete` (#49295)
* Update delete button copy to match Dotcom

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 09:13:55 +02:00
Alba Rincón c000a074be
CYS - Fix the intro cards size to match the designs (#49297)
* Fix the intro cards to match the designs

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 09:13:41 +02:00
Matt Sherman 2957458bac
Product Editor Dev Tools: Improved expression evaluation tooling (#48588)
* Refactor to extract ExpressionField

* Move styling of expression and result prefixes to CSS

* Layout expression field with grid

* Add buttons to expression field

* Enter edit mode and cancel

* Hook up editing in textarea

* Allow existing expression to be edited

* Make expression param optional

* Use ExpressionField to add new expression

* Hide cancel button if no callback and add updateLabel prop

* Only show error when dirty

* Placeholder for expression field

* Format result in expression field

* Expression field textarea styling

* Justify expressions at bottom

* Prevent jumping when editing expression

* Revert changes on cancel

* Remove unused CSS

* Extract ExpressionTextArea

* Extract ExpressionResult

* Auto height textarea

* Hover styling for expression

* Result type tag

* Tweak styling

* Update padding in expression field

* Changelog

* Enable scrolling of result when editing expression

* Use smaller close icon

* Fix enabling of add/edit button

* Focus text area when clicking edit button

* Put cursor at the end of text area when focusing it

* Enter edit mode when clicking on text area

* Remove expression in list

* Don't style expressions list as a flex box

* Show full result while editing expression
2024-07-09 14:05:39 -04:00
Mik 5948b0d822
Fix incorrectly escaped HTML (#49195)
* Fix incorrectly escaped HTML

* Add a changelog entry
2024-07-09 17:04:20 +01:00
Alex Florisca 56cc77fcef
Fix the mini cart items not being visible when zoomed in (#48384)
* Render an aria-label for the initial mini cart html

* FIx mini-cart items not visible when zoomed in

* Add changelog

* Fix linting issues

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

* Kick the GH actions

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

* delete duplicate changelog file

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

* Delete plugins/woocommerce/changelog/48384-fix-43639-zoom-mini-cart

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-09 16:47:21 +01:00
Néstor Soriano 99ae453ea3
Improve the handling of the deprecated WC()->api property (#48884)
* Improve the handling of the deprecated WC()->api property:

- When the legacy REST API plugin is not available, set the property
  to an instance of RestApiUtil. This object has the get_endpoint_data
  method that is still used by external plugins.

- Add a new legacy_rest_api_is_available method to WooCommerce class.

- Replace all instances of "is_null(WC()->api)" with (negated) calls to
  the new legacy_rest_api_is_available method.

- Make WC()->api point to an instance of LegacyRestApiStub, instead of RestApiUtil.

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-07-09 17:26:20 +02:00
Chris Lilitsas a4ff1d01b3
[Product Collection] Track block instances and feature usage (#46466)
* add block parser and filters wip

* replace strings with template slugs and do some polish

* Refactor some parts to reused in wc_tracker

* Clean up and introduce snapshot data in the WC_Tracker

* Minor improvements

* Track only fse themes

* Consolidate collection names per context in the WC_Tracker snapshot

* Add changelog

* Separate taxonomy filter usage into specific category and tag usage

* Polish event params values

* Lint

* Remove wc-tracker to simplify the pr

* More cleanup

* Unify location names

* Handle stock status default value

* Renamed order confirm context

* Track price filter fix

* consider 3pd stock statuses in tracking

* Lint

* Consider the woocommerce_hide_out_of_stock_items option when tracking stock filter

* Cleanup empty lines

* Rename single product area flag

* Add docblock

* Avoid drafts and autosaves

* introduce a new class under tracking events

* Cleanup main controller

* Cleanup

* Add docblocks

* Stop recursive process up to 2 levels and cleanup

* Cleanup

* Ensure blocks exist

* Lint

* Normalize keys and values

* Track inherit and order-by usage

* Fix lint

* Add strict types

* add strict again

* Strict types

* Move strict types

* Remove codeblock

* Clean up

* Move directive on separate line

* Cleanup spaces
2024-07-09 16:46:04 +03:00
Christopher Allford 7d71e2235a
Product Collection: Redesigned Collection Insertion Selection (#48911)
* Updated Collection Selection Buttons

Rather than using normal buttons we're going to replace these with cards
that we want to use instead.

* Reworked Product Catalog Creation

* Added Dropdown Collection Option

* Changelog

* Added Collection Dashicon Support

* Fixed Collection Change Modal

This is going to get replaced soon but it may as well look nicer than it
does right now.

* Type Fix

* Fixed `:focus` Hover Border

* Simplified Click Handler

* Style Fixes

* Gutenberg Style Fixes

* E2E Fixes

* Fixed E2E Test

* Added Dropdown Inserter E2E Support

* Logging

* Fixed Default Insertion Options

* Prevent Premature Rendering

* E2E Fix Attempt

* Lint Fix

* E2E Fix

* Fix test chaking if custom registred collections are available in the collection chooser

* Improve logic of choosing collection to cover both dropdown and placeholder

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-07-09 13:53:48 +02:00
Tom Cafferkey dacee984fa
Track the newly installed version in wp_options (#49139)
* Add initial install version to database

* Change update_option to add_option

* Add changelog

* Add since annotation

* Change initial_install_version option to initial_installed_version and also set autoload to false

* Add unit test for initial_installed_version

* Add unit test for initial_installed_version
2024-07-09 10:51:24 +01:00
martynmjones ab67891874
Exclude simple products from variations reports by default (#49244)
* Make use of simple products exclusion filter regardless of included products

* Add unit test

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

* Update reports-variations.php: Remove since comment

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-09 10:48:05 +01:00
Albert Juhé Lluveras a5aef5f599
BlockTemplatesController: move all hooks into methods instead of being inline (#49182)
* BlockTemplatesController: move all hooks into methods instead of being inline

* Add changelog file
2024-07-09 11:36:43 +02:00
Vedanshu Jain 6d92aa9ccb
Load controllers only when needed for performance. (#47704)
* Load controllers only when needed for performance.

* Classify controllers based on their namespace and load selectively.

* Enable private namespace along with store api.

* Only prevent route loading when request is known for back compat.

* Lint fixes.

* Remove duplicate inclusion.

* Correctly load feature controller.

* Add since tag.

* Add unit tests.
2024-07-09 09:07:14 +00:00
Luigi Teschio fcb7f6798f
CYS: Fix pattern preview border color (#49206)
* CYS: Fix pattern preview border color when the user hovers the preview; fix pattern preview border color when the pattern is present in the site preview

* Remove the is-added class to avoid marking patterns that are already removed

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

* Fix lint errors

* Fix lint error

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-07-09 09:12:33 +02:00
Vlad Olaru 0346ca618a
Fix Payments and APMs tasks logic and links (#46017)
* Link Payments task item to Overview if WooPayments is connected

* Link APMs task item to payments task page

* Add changelog for WooCommerce

* If WCPay is connected go to Payments Overview page

It shouldn't matter if the WCPay account is fully or partially onboarded.

* Fix determining if other gateways are enabled besides WCPay ones

Since UPE, WCPay registers multiple payment gateways, all prefixed with woocommerce_payments.

* Fix WooCommercePayments task kick-in logic

The WooCommercePayments task should supersede the general Payments task
when the general Payments task is not completed already and the store is in a
WooPayments supported country. We should not factor in if WooPayments is
just installed but not connected.

* Add changelog

* test: Fix Playwright tests for payment tasks

* test: Fix Playwright tests linting

* test: Further fixes to the Playwright payment setup task
2024-07-09 09:42:50 +03:00
Barry Hughes 97656a907d
Reduce potential for plugin conflict-driven fatal errors during (REST API-based) refund creation (#47918)
Introduce a method to help ensure values that have been filtered are still of the expected type.

Fixes #47601

* Reduce potential for plugin conflict-driven fatal errors during (REST API) refund creation.

* Parcel up return-type-assurance logic into its own reusable helper.

* Generalize the type checking helper.

* Do not replace existing WP_Errors.

* Do not translate logging messages, per current best practices.

Ref: d2bde1368a/docs/extension-development/logging.md (best-practices)

* Add test describing the behaviour of `Types::ensure_instance_of()`.

Note that the exception error code originally specified in the Types class was also removed: if we want this, it needs to be an integer rather than a string. However, we don't have a methodology or centralized registry for handling numeric error codes at present.

* Use ternary shorthand, not null coalescing.

* Add `@since` tag for hook `woocommerce_rest_pre_insert_<POST_TYPE>_object`.

Selected 4.5.0, as this is the point at which the (until then separate) REST API package was merged into WooCommerce Core.

* Avoid short ternaries.

* Strict types.
2024-07-08 16:30:25 -07:00
github-actions[bot] d4017c0700
Delete changelog files based on PR 49243 (#49255)
Delete changelog files for 49243

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-08 23:37:24 +01:00
Jorge A. Torres 5c81b0e5cc
Do not run `BatchProcessingController`'s cleanup after a premature shutdown (#49243)
* Prevent `BatchProcessingController` from running its cleanup function during an abnormal shutdown

* Add changelog

* Use a safer check (we cannot always depend on `as_has_scheduled_action` being available).
For context, please see:

- A problem we faced recently when using modern Action Scheduler functionality, in https://github.com/woocommerce/woocommerce/pull/49243.
- Description of load order concerns https://developer.woocommerce.com/2021/10/12/best-practices-for-deconflicting-different-versions-of-action-scheduler/.

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-07-08 14:31:39 -07:00
Gabriel Manussakis 1b9e3601a4
[Accessibility] Fix typo in woo-ai plugin doc (#49208)
* Fix "prequisites" typo

* Add changelog file
2024-07-08 15:44:37 -03:00
Jonathan Lane 07c9d2b7b1
Update Playwright to 1.45.1 (#49202)
* Update Playwright to 1.45.1

* Update lockfile

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-08 15:22:13 -03:00
Alba Rincón a93343dd90
CYS - Fix size of the "no logo" title to match the "logo" title size (#49231)
* Fix size of the no logo title to match the logo title size

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-08 17:36:37 +02:00
Albert Juhé Lluveras 416db85d01
Add srcset to Single Product gallery thumbnail images (#49112)
* Add srcset to Single Product gallery thumbnail images

* Add changelog file
2024-07-08 17:23:07 +02:00
Alba Rincón cecfecdf1f
CYS - Fix assembler styling issues (#49232)
* Fix sidebar bg color

* Fix spacing and title size on patterns section

* Increase space between the section description and the list of patterns

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-08 16:47:30 +02:00
Maikel Perez d849155c59
Change the custom field name component to be an autocomplete (#48949)
* Moving to a Combobox

* Create CustomFieldNameControl component

* Fix combobox styles

* Change Combobox to behave as an Autocomplete

* Integrate CustomFieldNameControl within the CustomFieldCreateModal

* Fix the ref type from CustomFieldNameControl

* Integrate CustomFieldNameControl within CustomFieldEditModal

* Fix CustomFieldNameControl default/focus border style

* Fix custom field value control height to be 36px like other controls

* Add changelog file

* Fix linter errors

* Add ->esc_like to the search criteria when searching for a product custom field name

* Add changelog file

* Add comments explaining why the implamentation was made that way

* Remove non existing classname

* Fix wrong border color when the field is invalid and focused

* Fix linter errors

* Hide props from the internal input element

* Rename comboboxRef with inputElementRef

* Fix invalid empty value when the combobox has a selected value
2024-07-08 09:14:36 -04:00
Adrian Moldovan 7b0f9457cf
[e2e tests] Add Allure reporter to Blocks e2e tests (#49228) 2024-07-08 15:02:31 +03:00
Naman Malhotra 8f98a2a057
Drop Select2 in Backwards compatable manner (#48731)
* init

* added changelog

* Review - point select2 in admin assets
2024-07-08 18:47:59 +07:00
Veljko V 1a94d68d2b
Fix flaky e2e test merchant filling regular price in inventory tab (#49226) 2024-07-08 13:10:40 +03:00
Alba Rincón b83eed8869
CYS - Fix patterns spacing (#49196)
* Fix spacing in patterns

* Fix spacing

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

* Remove metadata

* Remove metadata

* Fix test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-08 10:52:35 +02:00
Veljko V 05c47d8566
Fix flaky filling SKU and verifying CYS footer e2e tests (#49191) 2024-07-08 11:24:02 +03:00
Alba Rincón c763bdf695
CYS - Filter out patterns with external dependencies (#48618)
* Filter out patterns with external dependencies

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

* Fix test

* Remove excluding patterns by id

* Bring back url

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-08 08:53:06 +02:00
Vladimir Reznichenko 68532ce433
CI: update linting jobs to skip build step (#49193)
In this PR, we introduce changes to linting and PHPUnit jobs in order to speed them up: skip or minimize the build step.
2024-07-08 08:39:39 +02:00
Eason 6d17019827
Fix the inconsistent formatting of the numeric columns in the Leaderboards on the Analytics > Dashboard page (#49097)
* Add the `format` property to the items of the `rows` array in Analytics' Leaderboards API response to indicate how it's formatted.

* Make the `Leaderboard` component within Analytics aware of the currency context and format the numeric columns accordingly.

* Avoid a warning from the test of `Leaderboard` component when running JS tests.

File: client/analytics/components/leaderboard/test/index.js
Ref: https://github.com/woocommerce/woocommerce/blob/9.0.2/packages/js/components/src/pagination/pagination.tsx#L44

* Apply better practice to the test of `Leaderboard` component.

File: client/analytics/components/leaderboard/test/index.js

* Add changelog.

* Make the `Leaderboard` component not create a new function for every `row` rendering.

Address: https://github.com/woocommerce/woocommerce/pull/49097#discussion_r1667009910
2024-07-08 11:15:12 +08:00
Nathan Silveira e62f28b3ca
Allow selecting categories through keyboard (#49049)
* Remove portal and use inline popup

* Allow selecting existing values through , or ENTER

* Add help to taxonomy block

* Provide help attribute to taxonomy block

* Add changelogs

* Remove help text

* Add help text and a11y instructions

* Try to fix unit test

* Add changelog

* Fix E2E test

* Allow navigating up from first list item into the input

* Add scenario for single selection as well
2024-07-05 14:20:28 -03:00
Adrian Moldovan 178466aa06
[e2e tests] Tweak Playwright config - retries and test artifacts (#49148) 2024-07-05 15:38:49 +02:00
Luigi Teschio 615513144d
CYS: Fix color button (#49181)
* CYS: Fix color button

* Add colors to the just arrived full hero button

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

* fix just arrived full hero on sidebar

* improving name

* reorganize code

* Fix lint errors

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 12:41:27 +00:00
Manish Menaria 2d6448d9b4
Product Collection: Fix alignment of the first item in Grid layout for WP 6.6 (#49096)
* Remove `__experimentalLayout` from Product Template block

This commit removes `__experimentalLayout` from Product Template block. This is because we don't want to use `layout` from Gutenberg for now. This change fixes the alignment of the first item in Grid layout.

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

* Fix linting errors in SCSS file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 17:24:27 +05:30
Manish Menaria fa11141726
Expose `__experimentalRegisterProductCollection` in @woocommerce/blocks-registry Package (#48141)
* Expose registerProductCollection in @woocommerce/blocks-registry Package

This commit exposes the `registerProductCollection` function as part of the `@woocommerce/blocks-registry` package. This enhancement facilitates the registration of new product collections by 3PDs, promoting better modularity and extensibility within the WooCommerce Blocks ecosystem.

Changes include:
- Migration of `register-product-collection.tsx` to `packages/checkout/blocks-registry`.
- Export `registerProductCollection` from `@woocommerce/blocks-registry/index.ts`.
- Updated related imports and references to the new path.

This update enables 3PDs to register product collections more seamlessly, enhancing the extensibility of Product Collection block.

* Replace @woocommerce/blocks-checkout with @woocommerce/blocks-registry

* Add __experimental prefix

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

* Improve registerproductcollection for 3pds

* Set isDefault value to false

* Don't export all the types

* Update changelog

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

* Add plugin to test __experimentalRegisterProductCollection

* Add E2E tests

* Fix Lint errors

* Improve E2E tests for __experimentalRegisterProductCollection

- Reduced preview timeout from 2000ms to 1000ms.
- Expanded E2E tests to cover new attributes and preview functionalities.

* Refactor code to improve readability and maintainability

- Added a warning comment to indicate that `__experimentalRegisterProductCollection` is an experimental API.
- Refactored variable names and imports in `register-product-collection.tsx` and `index.tsx` for clarity.
- Simplified and reorganized type definitions and imports in `types.ts` and `utils.tsx`.
- Renamed function in `register-product-collection-tester.php` for consistency.

* E2E: Also test the Frontend

* Use alias for import statement

* Don't pass isActive to registerProductCollection

Now it's handle by registerProductCollection itself.

* Update registerproductcollection API structure

Refactored the product collection block to enhance attribute management and ensure consistency in query defaults. This change includes:
- Importing `DEFAULT_QUERY` from constants and using it to set default query attributes.
- Removing `DEFAULT_ATTRIBUTES` from specific collections and directly defining required attributes.
- Ensuring `postType` and `isProductCollectionBlock` are set to default values in the query object.
- Setting `inherit` attribute to `false` by default in all collections.

* Hide inherit control in collections

Ensure the "inherit" control is always hidden, as collections should not be able to change this attribute. This includes:
- Adding `CoreFilterNames.INHERIT` to the `hideControls` set in `register-product-collection.tsx`.
- Adjusting the `hideControls` attribute in individual collection files to remove redundant hiding of the `INHERIT` control.

* Fix: Filters not showing in inspector controls

* Set inherit to false for all collections

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

* Product Collection: Add validation for `__experimentalRegisterProductCollection` arguments (#48513)

* Add validation for `__experimentalRegisterProductCollection` arguments

Introduced comprehensive validation for the `ProductCollectionConfig` object in `__experimentalRegisterProductCollection` to ensure correct data types and values, enhancing error handling and robustness.

- Added a new function `isValidProductCollectionConfig` to perform various checks on the `ProductCollectionConfig` object.
- Validates properties such as `name`, `title`, `description`, `category`, `keywords`, `icon`, `isDefault`, `innerBlocks`, `example`, `scope`, `isActive`, `attributes`, and `preview`.
- Ensures correct data types and provides detailed console error messages for invalid configurations.
- Updated `__experimentalRegisterProductCollection` to use the validation function before proceeding with the registration process.

**Impact**
- Improves stability and prevents invalid configurations from causing runtime errors.
- Provides clearer error messages for developers, aiding in quicker debugging and development.

* Fix typo

* Refactor: Replace console.error with console.warn

Updated the error logging in the isValidProductCollectionConfig function to use console.warn instead of console.error for invalid configuration properties. This address the feedback from the PR review.

- Replaced console.error with console.warn for various validation checks in isValidProductCollectionConfig.
- Removed redundant return statements after console.warn calls.
- Improved logging messages to better inform about invalid configuration properties without treating them as critical errors.
- Simplified the logic in __experimentalRegisterProductCollection by combining query and attribute properties and ensuring defaults are set properly.

* Refactor: Rename isValidProductCollectionConfig to isValidCollectionConfig

Updated the function name from isValidProductCollectionConfig to isValidCollectionConfig for better clarity and consistency. Also, renamed related variables for improved readability.

* Add validation for name property

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

* Title is required for new collection

* Update comments

* Fix E2E tests

* Address PR feedback

---------

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

* Add README file for __experimentalRegisterProductCollection

* Add screenshots in README file

* Try to fix lint issue

* Docs: add example for collection with inner blocks

Enhanced the documentation for `__experimentalRegisterProductCollection` to include an example demonstrating how to define a collection with inner blocks. This example shows how to create a custom collection with nested blocks, including a heading and product elements, providing a clear guide for developers.

New content added:
- Example 4: Collection with inner blocks
- Sample code for defining a collection with inner blocks
- Tips and links to further resources on inner blocks and core collection definitions

* Fix Lint errors

* Address PR feedback

* Reduce number of JS files on /shop page

**Problem:** There was increase in number of JS files on /shop page after exposing `registerProductCollection` function in `@woocommerce/blocks-registry` package. This package is loaded on the frontend. For example, previously 45 JS files were loaded on /shop page but now 55 JS files are loaded on /shop page.

**Solution:**
1. After a bit of debugging I found out that constant file which we are importing i.e. `plugins/woocommerce-blocks/assets/js/blocks/product-collection/constants.ts` contain some heavy dependencies & it's not pure. Therefore, I decided to split this file into two files. I moved all the constants that are used in `registerProductCollection` function to a new file i.e. `plugins/woocommerce-blocks/assets/js/blocks/product-collection/constants-register-product-collection.ts`. This way, we don't need to load all the constants on the frontend i.e. /shop page.
  - This reduced 4 JS files i.e. 51 JS files are loaded on /shop page.

2. After some more investigation, I found out that importing `registerBlockVariation` function is increasing number of JS files on Frontend. Therefore, I decided to use global `wp` object to call `registerBlockVariation` function. This way, we don't need to import it. This reduced last 6 files i.e. 45 JS files are loaded on /shop page.

This way, I was able to reduce number of JS files on /shop page from 55 to 45, which is same as before this PR.

* Refactor: product collection constants

- Moved constants from `constants-register-product-collection.ts` to `constants.ts`
- Deleted `constants-register-product-collection.ts`
- Updated import paths in relevant files to reflect the changes
- Moved utility functions to `utils.ts`

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 16:55:35 +05:30
Chris Lilitsas d3df046f97
[Product Collection] Parse front-end context (#44145)
* Parse global context

* Refactor the util to only parse global context, provide the location context to collection children

* cleanup

* Cleanup

* Add changelog

* Make linters happy

* provide context to each inner block recursively

* Fix linters

* Remove debug

* Update plugins/woocommerce/src/Blocks/BlockTypes/ProductCollection.php

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

* Rename the provider method

* Fix typo on cart item products

* Use the query context instead

* Lint

* Lint again

* Minor change on docs

* Polish

* Cleanup

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-07-05 13:49:24 +03:00
Mike Jolley be849473e0
Checkout: Update legacy status handling (#48788)
* Allow same status as API expects

* changelog
2024-07-05 11:42:38 +01:00
Luigi Teschio 9fc207b1a6
CYS: fix: Assembler follows admin color schema (#49159)
* CYS: fix: Assembler follows admin color schema

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 12:20:49 +02:00
Vladimir Reznichenko 1675c63bba
Monorepo: tweak CodeSniffer rules conflicting with strict types declaration requirements (#49183) 2024-07-05 11:46:30 +02:00
Alba Rincón dae47a6a5f
CYS - Remove non-default patterns and register them from the PTK and update margins (#49101)
* Remove not default patterns

* Add margins

* Include woocommerce patterns from PTK

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

* Bring back some patterns

* Bring back footer and headers

* Update snapshots after updating margins

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 08:55:05 +02:00
Alba Rincón c4d160bf21
CYS - Add missing patterns to their categories for the assembler (#49154)
* Add the Featured Category Cover Image to Intro category

* Add missing patterns to their categories for the assembler

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-05 08:54:23 +02:00
Chi-Hsuan Huang e59f4e406d
Fix the Coming Soon Site Page heading color is white after completing the CYS task (#49129)
* Fix site coming soon page heading color

* Add changelog
2024-07-05 10:51:30 +08:00
Joshua T Flowers 1c8698c684
Prevent product editor styles loading on non wc-admin pages (#49170)
* Only load product editor styles on WC admin pages

* Manually load interface styles to exclude fullscreen styles

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 14:17:14 -07:00
Alba Rincón c0d102a93c
CYS - Replace customer account block icon in headers used in the assembler (#49133)
* Replace customer account block icon in headers used in the assembler

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

* Change icons style for injected blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 18:59:52 +02:00
Veljko V 59a1e5394b
Fix flaky connect to Woo e2e test (#48926) 2024-07-04 18:21:15 +03:00
Mik cf7fc7b2a9
Fix deprecated get_option notice when viewing Analytics > Orders (#49092)
* Add option for orders_report_date_tour_shown to allow list

* Disable the orders report date tour in E2E test
2024-07-04 16:09:58 +01:00
Jorge A. Torres 04fa888b2f
Fix toggling of permission details in downloadable product permissions metabox (order screen) (#49022)
* Work around WP's handlediv functionality in download permissions metabox

* Add changelog
2024-07-04 08:06:45 -07:00
Alba Rincón a712e54005
CYS - Include the dotcom reviews patterns (#49140)
* Include the dotcom reviews patterns

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 16:51:59 +02:00
Alba Rincón c2973c3fe1
CYS - Make some titles bold on CYS patterns (#49151)
* Make some titles bold on cys patterns

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 16:05:09 +02:00
Luigi Teschio d95b43a6f5
CYS: Fix Shuffle feature logic (#49153)
* CYS: fix shuffle feature

* improve types and add comment

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 15:46:18 +02:00
Roy Ho 780f27256f
Remove IE11 specific styles (#49027)
* Remove IE11 specific styles

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

* Remove unused mixin

* Remove additional IE/edge styles

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 05:28:26 -07:00
piinthecloud 025b5f1a8f
add front matter and cleanup docs in V1 migration for docs site (#49010)
* add front matter and cleanup docs in V1 migration for docs site

* add changelog entry and fix remaining HTML tables to markdown

* bypass linter rules

* update rule

* rever rule change for incorrect file

* rever rule change for incorrect file

* lint filtering-payment-methods.md rule

* address comments

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/migrated-hooks.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/migrated-hooks.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-payment-methods/payment-method-integration.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-payment-methods/filtering-payment-methods.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/totals-footer-item.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/checkout-and-place-order-button.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/additional-cart-checkout-inner-block-types.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/available-filters/cart-line-items.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/how-checkout-processes-an-order.md

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

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2024-07-04 13:54:43 +02:00
Veljko V c9f8480a3f
Fix flaky filling SKU field in e2e test (#49134) 2024-07-04 14:00:14 +03:00
Amit Raj e562ed4ede
Add product count visibility option to mini cart block (#48545) 2024-07-04 13:52:01 +03:00
github-actions[bot] 41314eccb7
Delete changelog files based on PR 49113 (#49138)
Delete changelog files for 49113

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-04 10:54:43 +01:00
Niels Lange 0089b2359c
Use `createRoot().render()` instead of `render()` (#48858)
* Use createRoot().render() instead of render()

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

* Remove “ReactDOM.render is no longer supported” checks

* Add “ReactDOM.render is no longer supported” checks again

* Adjust JS unit tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 11:36:38 +02:00
Luigi Teschio c8e4938548
CYS: fix not template set correctly (#49113)
* CYS: fix not template set correctly

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 09:35:16 +00:00
Adrian Moldovan 62c74d0ed4
[e2e tests] Add support for external sites in CI (#49017) 2024-07-04 12:15:43 +03:00
RJ e61313b33d
Use createRoot in classic product editor cases (#48834)
mothra

mothra

mothra
2024-07-04 05:38:19 -03:00
Vladimir Reznichenko 7959060850
Monorepo: disable autoloading optimization by default (take 2) (#48980)
This PR is the second attempt to speed up monorepo installation by removing autoloading optimization setting from the configuration and performing the optimization where it is appropriate (composer post-install hooks and when building releases).

In the installation context, the composer post-install hook will execute a background task to dump the optimized autoloading, while the installation process completes other tasks.
2024-07-04 10:12:52 +02:00
Karol Manijak ab646ace8e
Product Collection: "Sync with current query" should only apear in archive context and not other places (#48917)
* Show Sync with current query option only in archive templates

* Add changelog

* Add e2e test

* Remove unused variable
2024-07-04 09:13:36 +02:00
Vladimir Reznichenko f8c95a8db8
CI: caching tune (part one - relocate playwright caching) (#49081)
In this PR we ar relocating playwright downloads caching into the monorepo action (behind input parameter). That consolidates monorepo-related caching and also reduces the time fetching the cache action in external workflows.
2024-07-04 06:55:24 +02:00
Paul Sealock 7aa42a6d76
LYS: Fix missing CSS (#49075) 2024-07-04 11:10:12 +12:00
github-actions[bot] 0b00aec60a
Delete changelog files based on PR 49104 (#49115)
Delete changelog files for 49104

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-03 13:46:43 -04:00
Adrian Duffell 9af58923de
Place Printful behind a feature flag (#49104)
* Add printful feature flag

* Place printful placement behind feature flag

* Add changelog
2024-07-03 17:01:37 +00:00
Adrian Duffell b36083403d
Ensure WooPayments is the only enabled gateway when offering to delete test orders (#49032)
* Add a check for woopayments is the only gateway

* Try fix TS error

* Add changelog

* Fix lint issues
2024-07-03 23:22:27 +08:00
Thomas Roberts 20e7128775
Update WC blocks wp-env to use WP 6.6 RC1 (#49037)
Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 16:09:43 +01:00
Nathan Silveira 85cedf2d2b
Add unique_id field to product (#47364)
* Add unique_id field to product

* Fix documentation

* Fix wrong comment

* Update description

* Add unique_id for variations

* Update lint

* Update tests

* Add changelog

* Update variations unit test

* Add unique_id to wc_product_meta_lookup

* Add unique_id methods to cpt interface

* Add new methods for unique_id and add it to lookup table

* Add unique_id functions to product functions

* Throw error when unique_id is duplicated

* Handle error message for unique_id on the front-end

* Add changelog

* Rename unique_id description in REST API

* Fix lint issues

* Add unique_id tracking for product publish

* Rename to 'global_unique_id'

* Fix lint

* Fix lint

* Bump documentation version

* Update controller description of fields
2024-07-03 11:45:48 -03:00
Luigi Teschio 496df1b7a2
CYS: fix default intro pattern (#49082)
* CYS: fix default intro pattern

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 16:17:25 +02:00
Manish Menaria ab826271d3
Update revert button text and description (#48717)
* Update Revert button text and description

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

* Add (Classic) as suffix instead of prefix

* Button text should be in center

* Fix: Button text isn't in center

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 19:31:50 +05:30
Jorge M bf6f3bbf41
Fix fatal error in order reports when parent order doesn't exist for a refund. (#49006)
* Check if parent order exists

* Add tests for order reports with orphaned refunds

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

* Update phpdocs test

* Add method is_valid_order

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 13:34:16 +02:00
Mike Jolley 27c08f4a5e
Remove encoding type from verify email form (#48859)
* Remove enctype from verify email form

* Changelog
2024-07-03 12:32:30 +01:00
Albert Juhé Lluveras 1687d462fb
Initialize BlockTemplatesController for block themes only (#48905)
* Move `check_should_use_blockified_product_grid_templates` to `wc-template-functions.php`

* add changelog entry

* alias Blocks/Options as BlocksOptions

* Init `BlockTemplatesController` for block themes only

* Remove the `wc_current_theme_is_fse_theme()` check from BTC

* Streamline the option update logic a tad

* Revert "Streamline the option update logic a tad"

This reverts commit 54a965d9784df253f82533991e03c1112fd386ef.

* init BTC for themes that support block template parts

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

* init BTC for themes that support block template parts, p.2

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

* move the check to a new OptionsManager class

* make types consistent

* add classic theme with block template parts support

* tmp: add logs for debugging

* Initialize BlockTemplatesController on init

* Remove debugging code

* Prevent duplicate template parts appearing in the Site Editor in classic themes that support template parts

* Update e2e tests for classic themes that support template parts

* Fix Checkout header not being rendered

* Fix PHP tests

* Simplify WC_BLOCK_USE_BLOCKIFIED_PRODUCT_GRID_BLOCK_AS_TEMPLATE logic

* Rename OptionsManager class to TemplateOptions

* Change format of inline comment

* Use wc()->is_store_api_request()

* Update plugins/woocommerce/src/Blocks/TemplateOptions.php

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>

* Update testing theme slugs

* Add strict_types to TemplateOptions file

* Refactor check_should_use_blockified_product_grid_templates()

* Don't update 'wc_blocks_use_blockified_product_grid_block_as_template' when switching between block themes

* Add extra unit test to make sure the option is not updated when switching between block themes

* Update strict_types format

* Remove unnecessary theme switch after tests finish running

* Replace .toHaveCount( 0 ) with .toBeHidden() in several tests

* Create a TestUtils to abstract logic to open Mini-Cart block

* Remove unnecessary import

* Replace .toHaveCount( 0 ) with .toBeHidden() in several tests (II)

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2024-07-03 11:31:41 +02:00
Bart Kalisz f8011713a0
Fix e2e-guidelines.md syntax (#49018) 2024-07-03 11:01:14 +02:00
Adrian Moldovan 36c28b6ad2
Move buildkite-test-collector to devDependencies (#49051) 2024-07-03 11:31:40 +03:00
Luigi Teschio 9eaa73d20d
CYS: improve copy no blocks placeholder (#49030)
* CYS: improve copy no blocks placeholder

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 09:25:33 +02:00
Luigi Teschio a511ce77e9
CYS: fix toolbar position after the site preview resizes (#49028)
* CYS: fix toolbar position

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 09:25:23 +02:00
Luigi Teschio 7b3434c8b5
CYS: Fix pattern rendering issues (#49041)
* CYS: Fix pattern rendering issues

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

* fix import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-03 09:25:12 +02:00
Prahesa Kusuma Setia 60c4807e4b
Update WC Tasks regarding wccom connection (#48128)
* update task manage wc marketplace

* add browse marketplace task

* remove wccom connection note inbox

* add changelog

* fix lint

* update doc comment

* update the ordering of inbox

* delete the store connect task

* rename to extend store

* update title to "Enhance your store with extensions"

* update spec
2024-07-03 13:31:47 +07:00
Adrian Moldovan 37280df9ea
Add daily checks for core e2e with PHP 8.1, WP latest-1 and HPOS disabled (#48929) 2024-07-02 15:37:19 -03:00
Thomas Roberts a032d4ff1c
Allow blocks with parents in the `woocommerce` namespace to be rendered as inner blocks (#48543) 2024-07-02 18:24:02 +01:00
Daniel W. Robert 2241a4f199
Update Fiverr CTA to Reflect the Latest Copy in Figma (#48987)
* Update Fiverr CTA to reflect latest update in Figma.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 12:21:44 -04:00
Vlad Olaru b5cf9826d7
Update WCPay Tracks events props (#48901)
* Add path and source props to incentive CTA clicked Tracks event

* Minor inline docs fixes

* Fix wording mistake

* Add from param to Payments settings CTA URL

* Add from param to incentive CTA URL

* refact: Clearer logic for incentive page tracking

* Add changelog

* Fix incentives page tests
2024-07-02 18:45:27 +03:00
Luigi Teschio d4438a8833
CYS: Add default patterns (#48839)
* remove not necessary patterns

* use always template1 for AI flow

* show default patterns homepage

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

* remove not used images

* restore changes

* fix e2e test

* fix e2e test

* restore necessary patterns

* add necessary patterns

* add default patterns

* add default pattern

* update tests

* fix logic

* rename images

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

* restore deleted patterns

* exclude tt4 patterns

* update image

* update default intro pattern

* not use i18n function

* fix how patterns label are translated

* order patterns in the sidebar

* fix unit test

* simplify function

* Fetch patterns from the private dotcom patterns

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

* exclude some default patterns

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
2024-07-02 14:39:49 +00:00
Gabriel Manussakis e086ba7d32
[Accessibility] Add required indicator to form login (#48743)
* Add accessibility attributes to form login

* Add accessibility attributes to lost password form

* Add accessibility attributes to reset password form

* Bump form login templates

* Add accessibility attributes to register form

* Update login forms with aria-required attribute

* Hide asterisk for screen readers in the register form

* Add changelog file
2024-07-02 16:37:33 +02:00
Bhupesh Mishra 3d37c92c7c
Fix for tags overlapping divider line issue in "Filter by product category" (#48756)
* Fix for tags overlapping divider line issue in "Filter by product category"

Issue fixed where tags are overlapping divider line in "Filter by product category".

* Fix for tags overlapping divider line issue in "Filter by product category"

Issue fixed where tags are overlapping divider line in "Filter by product category".

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 06:33:52 -07:00
Alba Rincón 72c1084608
CYS - Fetch patterns from the private dotcom patterns category (#49007)
* Fetch patterns from the private dotcom patterns

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 15:18:26 +02:00
Alba Rincón e842d4bc26
[CYS] Avoid the intro cards to get smaller on large screens (#48983)
* Avoid the intro cards to get smaller on large screens

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

* Add flex wrap

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 15:06:58 +02:00
Vladimir Reznichenko 12ec2b757d
CI: bug-fix for linting missing strict types directive in new php files. (#49015)
CI: buffix for linting missing strict types directive.
2024-07-02 14:48:33 +02:00
Luigi Teschio 130edc9860
CYS: open Intro panel when user clicks on Design your homepage (#49005)
* CYS: open Intro panel when user clicks on Design your homepage

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 13:56:34 +02:00
Mike Jolley dabc29c04e
Enhancement: Update account creation settings wording (#48556)
* Reword and reorganise existing account settings

* Disable account creation options if toggled off

* Toggle disabled state of related options

* Update settings crud tests

* changelog

* Hide based on subscriptions checkbox also
2024-07-02 12:37:15 +01:00
Damián Suárez fae23f0906
Product Editor: disable Add button when no terms or options when creating variations (#48928)
* fix doc. improve doc

* disabe `Add` button when not terms nor options

* variant="primary" > isPrimary

* move helpers to utils file. improve jsdoc

* add tests for hasTermsOrOptions helper

* add isAttributeFilledOut unit tests

* changelog

* allow any type in unit tests

* show a toolip with not possible to add attributes

* fix wrong inline code comment

* expect the Add button is initially disabled

* check the `Add attributes` button is enabled

* changelog

* remove obvios jsdoc

* check all terms are accepted

* minor changes

* update tests

* remove console.log to dev purpose

* improve E2E testing remviing attr row
2024-07-02 08:30:24 -03:00
Luigi Teschio fe4141f663
CYS: Remove iframe animation (#48941)
* CYS: Remove animation

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

* lint CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 08:08:38 +00:00
Luigi Teschio fb1c2b9936
CYS: Revisit sidebar layout (#48803)
* WIP

* improve layout

* improve CSS

* fix import

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

* lint scss

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 10:03:56 +02:00
Alba Rincón 4dcaca793f
Add a new icon style to the Customer Account block (#48979)
* Add a new icon style to the Customer Account block

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

* Fix lint errors

* Improve svg margins

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-02 09:34:59 +02:00
github-actions[bot] fbbf452243
Delete changelog files based on PR 48664 (#49000)
Delete changelog files for 48664

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-02 15:07:06 +08:00
Alexandre Lara 504799bcce
[Experimental] Product Filters Redesign > Filters: Implement Dynamic Block Title and Icon (#48638)
* Modify Product Filters block to use block variations

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

* Add dynamic blocks icon and title

* Make Attribute Filter block title dynamic

* Add E2E tests for the Product Filters block

* Remove unnecessary block attribute

* Improve clarity of the comment text

* Add new icons for individual filters

* Dynamically set the title and heading of the block based on the selected attribute

* Add E2E test to check for block title and heading change on selecting an attribute

* Replace custom block variation type by BlockVariation type from @wordpress/blocks

* Replace variation `isActive` function by an array of strings

* Fix heading for each individual filter

* Add a default attribute name when there is no attributes registered in the store

* Fix i18n strings

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-01 17:46:00 -03:00
Naman Malhotra ddc4bddc17
Fix failing test due to concurrent product creation (#48989)
* Fix test due to concurrent product creation

* Add changefile(s) from automation for the following project(s): woocommerce
2024-07-02 02:49:18 +07:00
Veljko V 97f8f863d1
Improve account email receiving e2e test to fix flakiness (#48957)
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-07-01 16:14:41 +00:00
Damián Suárez 603e774188
E2E: remove UI check when creating attribute global terms (#48934)
* do not wait for the `is-validating` state

* changelog

* not only this test
2024-07-01 18:49:51 +03:00
Albert Juhé Lluveras f85a7ba3d4
Avoid Product Search Results block template to fall back to the Product Catalog template from the theme (#48887)
* Avoid Product Search Results block template to fall back to the Product Catalog template from the theme

* Add changelog file
2024-07-01 16:20:43 +02:00
Vladimir Reznichenko f1b974a910
Revert "Monorepo: don't optimize composer autoloading by default. (#48971)" (#48982)
This reverts commit 76b1bd4ae7.
2024-07-01 15:13:25 +02:00
Vladimir Reznichenko e2ce65d02d
Tooling: lint new php files for strict types directive (take 2). (#48943)
This PRs is take two on expanding new php-files linting to validate strict types directive.
2024-07-01 13:58:13 +02:00
Luigi Teschio d709d53d9a
CYS: make the entire shuffle section clickable (#48889)
* CYS: make the entire shuffle section clickable

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

* fix import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-01 13:56:41 +02:00
Vladimir Reznichenko 76b1bd4ae7
Monorepo: don't optimize composer autoloading by default. (#48971)
This PR drops composer autoloader optimization for the WooCommerce plugin to speed up the build process. The autoloader still gets optimized in `plugins/woocommerce/bin/build-zip.sh` file.
2024-07-01 13:55:36 +02:00
Mike Jolley 4ff97e4915
Enhancement: Show account created notice on order confirmation page (#48673)
* Add notice on confirmation page for new accounts

* Reset should remove nag

* Changelog
2024-07-01 12:41:29 +01:00
github-actions[bot] 6e36d92a59
Delete changelog files based on PR 48778 (#48977)
Delete changelog files for 48778

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-01 17:35:25 +08:00
Luigi Teschio d4128118c1
CYS: no highlight the pattern when it is added (#48802)
* CYS: Improve Block Toolbar logic

* CYS: no highlight pattern when it is added

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-01 11:21:06 +02:00
github-actions[bot] 5b6797dc22
Delete changelog files based on PR 48863 (#48974)
Delete changelog files for 48863

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-01 17:14:29 +08:00
Corey McKrill 2dac6fb9e4
SSR: Update labels for "API enabled" item (#48878) 2024-06-28 16:20:54 +02:00
Vladimir Reznichenko 6b121e2f34
CI: caching tweaks in GitHub actions (#48865)
* Tooling: cache pnp deps

* Tooling: try fixing cache errors

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: try to parallelize js builds a bit

* Tooling: added pre-build steps to solve concurrency issues

* Tooling: limit workers

* Tooling: revert to original build command

* Tooling: playwright related tweaks

* Tooling: minor tweaks.

* Tooling: fix caching path.

* Tooling: trigger php builds to test deps caching.

* Tooling: trigger php builds to test deps caching.

* Tooling: lock caching to monorepo setup, so it doesn't slow down build steps.

* Tooling: lock Playwright cache to build, as build is pre-requisite for running tests.

* Tooling: added caching build-folders.

* Tooling: added caching build-folders.

* Tooling: added caching build-folders.

* Revert "Tooling: added caching build-folders."

This reverts commit c57b9dff13.

* Tooling: added caching build-folders.

* Tooling: cleanup sweep.

* Tooling: cleanup sweep.

* Tooling: added a changelog entry.

* Tooling: cleanup.

* Tooling: try speedup live branches build.

* Tooling: try speedup live branches build.

* Tooling: cleanup.

* Tooling: try speedup live branches build.

* Tooling: try speedup live branches build.
2024-06-28 14:50:32 +01:00
Paulo Arromba 67de31b823
Fixed "woocommerce_new_order" triggering on checkout blocks page visit (#47422)
* Prevent "woocommerce_new_order" from being triggered on orders with "checkout-draft" status

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

* Prevent "woocommerce_new_order" from being triggered on orders with "checkout-draft" status

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

* Added ´checkout-draft´ to the list of previous status triggering a new order action for order creation

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

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

* Added "draft" status on Order creation in HPOS to prevent triggering the new order hook

* Do not fire "woocommerce_new_order" on order creation in CPT that is still in one of the draft statuses.

* Fire "woocommerce_new_order" on order status change from one of the draft statuses, on par with CPT logic

* Removed unnecessary line (duplicate of L2607).

* Updated changelog.

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

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

* Updated comment

* Move data fetch to right before it is needed.

* Reverted moved line, as the $previous_state needs to be get first thing.

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

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

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

* Changelog change

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

* Changelog change

* Unit tests for creating draft orders without triggering new order hook

* Linting

* Unit tests update

* Removed unnecessary draft status from tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 18:30:40 +05:30
Jorge A. Torres d79b3b7f6a
Make product variations endpoints aware of parent product id provided (#48804)
* Prevent REST API access to variation product's that don't match the parent product_id

* Rework checks

* Update unit tests

* Add changelog

* Apply suggestions from code review

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

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-06-28 13:58:28 +01:00
Thomas Roberts 06c98dee1b
Load mini cart scripts by default on touch-enabled (mobile) devices (#48769) 2024-06-28 13:23:32 +01:00
Naman Malhotra b5de9d101f
Ensuring only single product creation with unique SKU for concurrent requests (#47476)
* Ensuring product creation with unique sku for concurrent requests

* improved comments

* added changelog

* self review

* lint fixes

* self review

* Added condition if the sku is empty

* Modified tests to ensure we insert unique skus

* self review

* self review - fixed tests

* self review - fixed tests

* lint fixes

* lint fixes

* lint fixes

* lint fixes

* Feedback review

* self

* feeback review changes

* self review

* self review - selecting values from DUAL

* using options table instead of DUAL

* using options table instead of DUAL

* FINAL bugs in tests

* Executing SKU check only during REST requests

* Typeo

* Added logging

* Added comment

* Review feedback

* self review

* self review lint fix

* self review lint fix
2024-06-28 17:38:45 +05:30
Manish Menaria c70750b85a
Fix: Show preview label only when Product Collection block is selected (#48795)
* Fix: Show preview label only when Product Collection block is selected

Updated the `ProductCollectionContent` component to display the preview label only when the Product Collection block itself is selected. Previously, the preview label was shown when either the block or any of its inner blocks were selected.

Key Changes:
- Removed the `isSelectedOrInnerBlockSelected` constant and its logic.
- Updated the condition to use `props.isSelected` directly to determine if the block is selected.

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

* Update E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 16:48:11 +05:30
Adrian Moldovan d3aa89baa7
Remove performance tests from PR checks (leave on push to trunk) (#48927) 2024-06-28 10:56:26 +00:00
Vladimir Reznichenko 032a7be469
Monorepo: minor tooling tweaks (zip compression level, composer invocations) (#48857)
* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: better zip compression and faster build times

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: composer related tweaks

* Tooling: pnpm related tweaks

* Tooling: pnpm related tweaks

* Tooling: composer related tweaks

* Tooling: revert unnecessary change.

* Tooling: revert unnecessary change.

* Tooling: cleanup.

* Tooling: cleanup.

* Tooling: cleanup.

* Tooling: added a changelog entries.

* Tooling: cleanup.
2024-06-28 10:54:05 +01:00
Vladimir Reznichenko 7aa459fd84
Revert "CI: lint strict types directive for new files (#48779)" (#48921)
This reverts commit 66ae029f70.

Strict types directive linting introduced in https://github.com/woocommerce/woocommerce/pull/48779 has some flows to address before we can re-introduce it again.
2024-06-28 11:51:00 +02:00
Veljko V 8c7950b0c6
Fix flaky mini-cart and create-checkout-block e2e tests (#48916)
Fix flaky Gutenberg and Services tests
2024-06-28 10:49:29 +01:00
Luigi Teschio 6b366c2390
CYS: fix flickering effect (#48767)
* CYS: fix flickering effect

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

* not use hook

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 11:38:27 +02:00
Veljko V 9a58378fec
Fix merchant settings general e2e test (#48907) 2024-06-28 10:10:33 +01:00
Wacław Jacek 9cc937d1f9
Don't recommend WCS&T on Edit Order page with WCShip/WCTax active (#48704) 2024-06-28 11:09:01 +02:00
Luigi Teschio 026e93916a
CYS: when the footer/header is clicked, the border color is blue (#48765)
* CYS: when the footer/header is clicked, the border color is blue

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

* improve CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 08:40:01 +00:00
Damián Suárez 93e148d921
E2E: update how to detect when global attributes are loaded. (#48915)
* rename helper file name

* detect attributes loaded at data-layer level

* changelog
2024-06-28 08:39:11 +00:00
Tung Du 185a3d579c
[Experimental] Product Filters Overlay Navigation block (#48677)
* add: block scaffold

* add: block settings and editor preview

* chore: discard change to pnpm lock file

* add navigation block to the template part

* test: add basic E2E tests

* chore: changelog

* fix: no full width button

* test: remove layout check

* tweak: dynamically fetch button styles

* try: fontsizepicker

* remove: FontSizePicker dute to lack of ability to change label

* fix: use correct icon from the design

* address review feedback

* update class to follow naming convention. use explicit value to better indicate the navigation style

* fix: remove unnecessary style that breaks the global style

* fix: remove unnecessary style
2024-06-28 08:16:21 +00:00
Niels Lange 545ec78185
Make proceed to order button non sticky when zoom level is bigger than 100% (#48391)
* Make proceed to order button non sticky when zoom level is bigger than 100%

* Define sticky container based on media query

* Revert previous inline comment

* Update display logic

* Adjust threshold to stabilise visibility toggling

* Improve readability
2024-06-28 10:05:49 +02:00
Damián Suárez 38390ab6e8
Product Editor: improve E2E tests. Test the `+3 More` item label in the Organization tab (#48891)
* introduce attributes fixture

* expose the tabs from the new data/ folder

* introduce confirmGlobalAttributesLoaded helper

* reuse confirmGlobalAttributesLoaded helper

* reuse attributes fixture

* check the `+3 More` item label

* changelog

* not only this test

* rename to waitForGlobalAttributesLoaded
2024-06-28 07:58:22 +01:00
Vladimir Reznichenko 66ae029f70
CI: lint strict types directive for new files (#48779)
Tooling: extend php-files linting (require strict types directive)
2024-06-28 08:09:40 +02:00
Manish Menaria b0ef3886c0
Product Collection: Fix Preview badge border-radius and alignment (#48856)
* Fix Preview badge border-radius and alignment

The Preview badge's bottom left and right corners now have border-radius set to 0px to ensure they smoothly morph into the block's stroke. The badge is visually aligned with the furthest edge of the block's right border.

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

* Fix Lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-28 11:14:59 +05:30
Paul Sealock 28ce50fefe
Store Alerts: Update widths to match main body (#48487) 2024-06-28 08:37:25 +12:00
Fernando Marichal 5811655e1a
Revert "Set stock quantity value to 0 by default (#48448)" (#48863)
* Revert "Set value to stock quantity"

This reverts commit 4350f497fd.

* Revert "Undo set_stock_quantity"

This reverts commit 19affd841b.

* Add changelog

* Fix lint

* Fix lint

* Fix lint warning

* Undo set_stock_quantity
2024-06-27 13:23:56 -03:00
Wacław Jacek c7fcc8eaac
Don't recommend WCS&T in default extension recommendations if WCShip or WCTax is active (#48705) 2024-06-27 17:17:50 +02:00
Ilyas Foo 6d1de12aa9
Fix shipping zones add zone button flinching (#48869)
* Fix add zone button flinching and vertical centering

* Changelog
2024-06-27 23:06:46 +08:00
Veljko V 4077d36ceb
Fix Core with Gutenberg e2e tests (#48896)
* Fix Core Gutenberg e2e tests

* Fix merchant create checkout block test
2024-06-27 16:33:26 +02:00
Wacław Jacek f257baa4e5
Don't recommend WCS&T on shipping settings page if WCShip or WCTax is active (#48701) 2024-06-27 15:36:00 +02:00
Wacław Jacek f0b9a9147f
Don't display WCS&T help in tasks if WCShip or WCTax is active (#48703) 2024-06-27 15:35:18 +02:00
Ilyas Foo 4eba3cb09a
Exclude coming soon patterns from block inserter (#48821)
* Exclude coming soon patterns from block inserter

* Changelog

* Remove coming soon block from inserter
2024-06-27 19:17:06 +08:00
Luigi Teschio bfe65d61d1
CYS: Update sidebar homepage copy (#48882)
* CYS: Update sidebar homepage copy

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

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-27 09:50:45 +00:00
Damián Suárez ce81de95a9
Product Editor: fix issue when trying to create same terms with different cases (#48627)
* prevent creating duplicated items with different cases

* changelog

* allow terms with same name for local attributes

* fix wrong const name to identy local attributes

* use more complext terms for E2E test

* encode URL to pass E2E test

* split E2E when creating new terms

* introduce `slug` property to TokenItem

* rename terms with globalAttributeTerms

* jsdoc

* minor test name change

* changelog
2024-06-27 09:50:27 +01:00
Luigi Teschio c119a1b64f
CYS: Improve Block Toolbar logic (#48799)
* CYS: Improve Block Toolbar logic

* disable animation

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-27 08:22:32 +00:00
Damián Suárez 84353a8987
Product Editor: restore Product (local) Attributes E2E test (#48871)
* minor test re-organization. test.only for dev

* update test when creating local attrs with terms

* udpate checking the attribute terms

* fix checking terms in the frontend

* attribute value is not used. clean

* improve jsdoc

* run not only this test

* changelog

* minor doc improvement
2024-06-27 08:05:29 +00:00
Albert Juhé Lluveras e13ce86036
Add back revert template e2e tests (#48805)
* Add back revert template e2e tests

* Add changelog file
2024-06-26 15:15:38 +02:00
Luigi Teschio e601afb351
CYS: Remove not necessary patterns (#48750)
* remove not necessary patterns

* use always template1 for AI flow

* show default patterns homepage

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

* remove not used images

* restore changes

* fix e2e test

* fix e2e test

* restore necessary patterns

* add necessary patterns

* restore necessary patterns

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-26 12:55:35 +00:00
Jonathan Lane 6fb9131728
Update coupon test for retries (#48734)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-06-26 14:06:20 +03:00
Jonathan Lane 745964d048
Fix variations saving with UI check (#48737)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-06-26 13:59:46 +03:00
Albert Juhé Lluveras 0205513556
Fix Classic Template block registration on WP 6.6 (#48730)
* Fix Classic Template block registration on WP 6.6

* Update Compatibility Layer docs

* Add changelog file

* Remove unused function

* Simplify logic
2024-06-26 12:20:22 +02:00
Néstor Soriano cacb10065e
Improvements in the handling of feature compatibility for plugins (#48169)
- In the plugins list only features that are currently enabled
  will be considered for the list of features that are incompatible
  with a given plugin.

- A per-feature flag named "plugins_are_incompatible_by_default"
  is used. Defaulting to false, when it's true for a given feature
  it means that plugins not declaring compatibility with a the
  feature are to be considered incompatible with the feature.
  The flag is set for the HPOS feature only.

- A new 'woocommerce_plugins_are_incompatible_with_feature_by_default'
  filter is added, which allows to alter the flag for a given feature.

- The "plugins incompatible with feature" page will display all the
  incompatible/uncertain plugins, even if the feature is disabled.
  The "plugins incompatible with ALL features" page still shows
  only plugins that are incompatible/uncertain with enabled features.

- Add a --ignore-plugin-compatibility switch to the "wc hpos enable"
  command, to allow enabling even if there are incompatible plugins.

- Add a new "wc hpos compatibility-info" command, which lists 
  the plugins that are compatible/incompatible/uncertain with HPOS.
2024-06-26 08:45:43 +02:00
Manish Menaria 9bdd6cc45b
Product Collection: Add comment for regression E2E tests (#48782)
* Add comment for regression E2E tests

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-26 11:03:11 +05:30
Moon dfc40ff775
Beta tester - fix lint errors (#48825)
* Fix lint errors

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-25 21:09:14 -07:00
Moon 97e5873b1b
Bump beta tester to 2.3.2 to prep a new release (#48806)
* Bump version to 2.3.2

* Update changelogs

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-25 20:53:49 -07:00
Bhupesh Mishra 3b9bd6d019
Update - Disable toggle by default and secondary enhancements (#48762)
* Update - Disable toggle by default and secondary enhancements

- Disabled toggle by default in Checkout blocks Return to cart button.

- Change Account options to Navigation options.

- Add a subtext to explain when to turn it on or off.

* set default value to false in attributes.tsx also

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

* Changelog

* Remove check for link from test suite—this is now hidden by default

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-06-25 16:47:31 +01:00
Mike Jolley c2783847c4
Fix: stack coupon fields on smaller screens (#48623)
* Wrap button and input using flexbox

* Use basis instead of size

* changelog
2024-06-25 16:19:49 +01:00
Adrian Duffell ccb3d589d6
Update Printful label (#48778)
* Change label to “Promoted”

* Add changelog
2024-06-25 15:02:11 +00:00
Estian 858231c238
#48459 coupon email restrictions fix (#48488)
* Create customer object from user object to fetch emails in try-catch.

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

* 48459 Replace $check_emails array values with user_email.

* Update plugins/woocommerce/changelog/48488-48459-coupon-email-restriction-fix

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-06-25 15:32:57 +01:00
Wacław Jacek 00f7420f81
Don't recommend WCS&T in tax task if WCShip or WCTax is active (#48699) 2024-06-25 14:23:07 +02:00
Veljko V 134f431187
Fix failing e2e test merchant/settings-tax (#48792)
* Remove unnecessary step in the settings tax test

* Add changelog

* Remove unnecessary waituntil
2024-06-25 13:46:52 +02:00
Mike Jolley 7a8d5e0b6d
Fix: Block theme template overrides for notices were impacting all templates (#48686)
* Narrow scope of notice template overrides from theme

* changelog
2024-06-25 11:04:54 +01:00
Jorge A. Torres e0322c57fe
Return HTTP 404 in REST API for non-existent webhooks (#48729) 2024-06-25 10:48:15 +02:00
Pascal Birchler e5b7f84704
Prevent translations from being loaded too early (#47113)
* Prevent translations from being loaded too early

* Undo accidental changes to `CheckoutFields`

* Keep plugins_loaded, but include required file

* Update order in the meantime

* Change to admin_init

* Add changelog file

* Undo `init_jetpack_connection_config` change

* Undo change to Packages class

* Fix LocalPickupUtils instead

* PHPCS fixes

* Update method name in test
2024-06-25 10:20:00 +02:00
Moon a09522df1c
WCA Test helper - add remote inbox notification staging importer (#48735)
* Add Remote inbox notifications management

* Remove admin notes section -- replaced by remote inbox notifications

* Add import from staging and production

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

* WIP - change test to run

* Display failed rules on error

* Change run to test

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

* Retire Remote Spec Ruel Validation -- use test action from Remote Inbox Notifications

* Run spec when all rules have passed

* Fix typo

* Change btn text to Run

* Update copy text

* Place delete all button on the left side

* Update plugins/woocommerce-beta-tester/api/remote-inbox-notifications/class-wca-test-helper-remote-inbox-notifications.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce/src/Admin/RemoteSpecs/RuleProcessors/RuleEvaluator.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce-beta-tester/api/remote-inbox-notifications/class-wca-test-helper-remote-inbox-notifications.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

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

* Separate remote inbox notification heler functions into a class and fix DELETE method errors

* Fix typo

* Display all errors

* Fix errors

* Fix error with test

* Add import from URL

* Change func name to importFromUrl

* Rename 48735-feature-remote-notiifcation-importer to 48735-feature-remote-notification-importer

Fix filename typo

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

* Fix changelog filename typo

Fix changelog filename typo

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

* Revert adding new changelog

It seems the new CI is automatically creating a changelog based on branch name 43d6abe3e7

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-06-24 23:32:36 -07:00
RJ 655c1436ec
fix: lys congrats refetch site cache status (#48710) 2024-06-25 13:50:30 +08:00
github-actions[bot] fe9e3f48f2
Prep trunk for 9.2 cycle (#48653)
Prep trunk for 9.2 cycle with version bump to 9.2.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-06-24 23:17:56 -04:00
github-actions[bot] bebcb713c8
Release: Remove 9.1 change files (#48654)
Delete changelog files from 9.1 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-06-24 23:17:28 -04:00
Paul Sealock 5a30d0b480
Settings Save button disable/enable (#47444) 2024-06-25 13:12:14 +12:00
Julia Amosova beb5625214
Update stable tag to 9.0.2 (#48776)
woorelease: Update stable tag to 9.0.2

Co-authored-by: Julia Amosova <juliaamosova@ultraw-mbp.mynetworksettings.com>
2024-06-24 17:14:39 -04:00
github-actions[bot] 7e1bf29c11
Delete changelog files based on PR 48753 (#48764)
Delete changelog files for 48753

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-06-24 16:41:35 +01:00
Vedanshu Jain cebeac1b47
Revert PR 46857 for backward compatibility (#48753)
* Revert PR 48753 to restore back compat.

* Typo fixes.
2024-06-24 20:42:02 +05:30
Luigi Teschio 91e3154a1c
CYS: Disable readonly mode only when full composability feature flag is enabled (#48752)
* CYS: Disable readonly mode only when full composability feature flag is enabled

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

* add import

* address feedback

* no select block when it is added

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-24 14:43:26 +02:00
Gan Eng Chin 841d00e150
Display "View store" button text by default. (#48690)
* Display "View store" button text by default.

* Add changelog.
2024-06-24 19:25:55 +08:00
Alexandre Lara 3b00882aed
[Experimental] Product Filters Redesign > Wrapper block: Fix icon (#48635)
* Fix Product Filters wrapper block icon

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 17:47:58 -03:00
Maikel Perez 5e997435bd
Create an API that manage the custom field names (#48504)
* Create WC_REST_Product_Custom_Fields_Controller

* Register WC_REST_Product_Custom_Fields_Controller

* Add pagination to the /product-custom-fields/names request

* Add WC_REST_Product_Custom_Fields_Controller_Tests

* Fix linter errors

* Add changelog file

* Fix linter error

* Change endpoint path to matches the product related endpoints set

* Fix controller file description

* Use more descriptive table alias in the sql query
2024-06-21 18:43:00 +00:00
Veljko V c77dfe5030
Add tags to e2e tests and update PW configs (#48715)
* Add tags to e2e tests and update pw configs

* Fix lint issues
2024-06-21 11:06:12 -07:00
Barry Hughes 200c7b3239
Initial work to constrain when the `tk_ai` (anon ID tracking cookie) is set (#47863)
Initial work to constrain when the `tk_ai` (anon ID tracking cookie) is set.
2024-06-21 10:59:02 -07:00
Hsing-yu Flowers daf7d5c6f9
Get tax line lable instead of name (#48445)
* Get tax line lable instead of name

* Remove error log

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

* Update plugins/woocommerce/changelog/48445-update-get-tax-line-label

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

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-06-21 17:46:57 +00:00
Damián Suárez 0273910e32
Product Editor: restore and fix E2E test that creates product variations (#48725)
* update test when creating product variations

* fix picking 50 value from page

* handle snackBar step properly

* enable the rest of tests

* changelog

* simplify. remove console.log lines
2024-06-21 09:49:30 -07:00
Alba Rincón 464c2d48ed
CYS > Remove the site title block fixed length (#48671)
* Remove the site title block fixed length

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

* Remove the site title block fixed length

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 16:52:33 +02:00
Albert Juhé Lluveras b6d1cf4841
Make sure the correct block template file is used in the Site Editor for templates with fallback (#48621)
* Make sure the correct block template file is used in the Site Editor for templates with fallback

* Add tests

* Add changelog file

* Clean up unnecessary function

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/product-search-results.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-06-21 15:36:25 +02:00
Luigi Teschio 2374240bb6
CYS: fix pattern wrapped twice by group blocks (#48712)
* CYS: fix pattern wrapped twice by group blocks

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 13:22:18 +00:00
Luigi Teschio 2d14a6fb38
CYS: hide button to resize the image (#48714)
* CYS: hide button to resize the image

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 13:18:54 +00:00
Luigi Teschio e5cb6917dc
CYS: fix logic to disable click on the no block placeholder (#48722)
* CYS: fix logic to disable click on the no block placeholder

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 13:14:42 +00:00
Alba Rincón ed2bb0e27d
[CYS] Pattern Sidebar: Update pattern categories and copy (#48665)
* WIP

* CYS: Refactor routing approach

* fix type

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

* remove focus logic

* remove routekey prop

* fix scroll after insert pattern

* pass onNavigateBackClick callback as prop

* fix scroll

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

* fix back arrow click

* fix css

* fix tooltip position

* create dedicated CSS class

* lint css

* restore change

* improve css class name

* remove not necessary class

* add github link to the todo

* lint css

* add want more pattern section

* remove not used import

* fix logic after merge trunk

* CYS: fix tooltip position

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

* trigger CI

* Add missing categories and descriptions

* Add services copy

* Uppercase

* Fix categories key

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

* Remove todo comment

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 14:56:17 +02:00
Alba Rincón 4976011b54
CYS - Fix register testimonials category as reviews failing test (#48719)
* Fix register testimonials category as reviews failing test

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 13:55:15 +02:00
Mike Jolley a80e3e8a56
Accessibility: Prevent shipping losing focus when making selections during checkout (#48370)
* Prevent duplicate update

* Style aria disabled radio input

* Disable keyboard navigation when options are being sent to server.

* Abort multiple requests to update shipping rates

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

* Update changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 10:23:19 +01:00
Alba Rincón 4424860d03
CYS > Register PTK testimonial patterns as reviews (#48674)
* Register PTK testimonial patterns as reviews

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 10:12:50 +02:00
Alba Rincón 52d4c7bb84
[CYS] Fetch patterns from the WooCommerce PTK source site (#48492)
* Include a request to the PTK for the woocommerce site

* Parse _woo_* categories

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

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

* Continue the flow when fetching dotcom patterns fails

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 10:12:15 +02:00
Tung Du 921e86e6ab
[Experimental] Product Filters: add layout and block spacing support (#48429)
* add: layout and block spacing support

* chore: changelog

* add: vertical aligment controls

* fix: update test to check for inspector styles controls

* test: ensure the block spacing setting is visible

* test: ensure the layout settings is rendered

* test: default layout settings

* test: justification setting

* test: orientation

* test: block spacing

* test: remove unnecessary util

* test: store selector in blockData

* test: use layout matching
2024-06-21 04:37:46 +00:00
Julia Amosova b49ce6903a
Update stable tag to 9.0.1 (#48696)
woorelease: Update stable tag to 9.0.1

Co-authored-by: Julia Amosova <juliaamosova@ultraw-mbp.mynetworksettings.com>
2024-06-20 14:53:05 -04:00
Thomas Roberts 23e7f6456c
Update shipping method modal copy if block-based local pickup is active (#48529)
* Update shipping method modal copy if block-based local pickup is active

* add changelog

* Import correct LocalPickupUtils class
2024-06-20 17:51:20 +02:00
Jorge A. Torres a7f0aa26ae
Return 404 when using the REST API to access a non existing tax class (#48579)
* Return 404 when using the REST API to access a non existing tax class for consistency with other endpoints

* Add changelog

* Update test

* Make JS linter happy
2024-06-20 08:47:25 -07:00
Luigi Teschio 388a5131b5
CYS: add badge that informs how many patterns have been inserted from each category (#48668)
* add badge

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

* no show 0

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-20 11:35:42 +00:00
Luigi Teschio 4d2ed9fd67
CYS: Update Block Toolbar Position (#48662)
* fix toolbar position

* improve layout toolbar

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

* fix import

* fix position during the scroll

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-20 11:26:06 +00:00
Roy Ho 8b956ea151
Fix e2e test for product filters overlay template part (#48659)
* Fix e2e test for product filters overlay template part

* Add changelog

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

* fix: match actual template part, not template part area

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-06-20 17:57:07 +07:00
Albert Juhé Lluveras 0462908ff2
Add a link to the Theming docs from the blockified templates README.md file (#48538)
* Add a link to the Theming docs from the blockified templates README.md file

* Add changelog file

* Make doc title italic
2024-06-20 10:32:09 +02:00
Luigi Teschio 9905b05297
CYS: fix crash of CYS on WordPress 6.6 (#48664)
* CYS: fix crash of CYS on WordPress 6.6

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

* CYS: fix crash of CYS on WordPress 6.6

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-20 10:00:47 +02:00
Chi-Hsuan Huang 61517c2609
Fix location settings not updated in tax task (#48606)
* Fix unable to complete tax task via wcs

* Fix missing dependencies

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

* Update 48606-fix-location-not-update-in-tax-task

* Fix missing dependencies

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-19 13:06:21 -07:00
Adrian Duffell 5733953d10
Update Printful copy (#48626)
* Update desination URL

* Update label copy

* Add changelog

* Revert wrong file change

* Update label copy
2024-06-19 12:54:24 -07:00
Roy Ho c29803dd03
EXPERIMENTAL: Product filters template part + overlay (#48472)
* Add overlay template part

* Add product filters overlay block

* Add changelog

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

* Add e2e tests to ensure the filters overlay template part exists

* Remove heredoc

* Add padding to the preview

* Add inpsector controls settings

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filters-overlay/editor.scss

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Add position label

* Remove unneeded panelbody

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-06-19 12:11:51 -07:00
Albert Juhé Lluveras ff8b7c00ca
Update WC blocks e2e tests to WordPress 6.6 (#48436)
* Update WC blocks e2e tests to WordPress 6.6

* Add changelog file

* Small change

* Update @wordpress/e2e-test-utils-playwright package

* Fix admin.visitSiteEditor and editor.saveSiteEditorEntities

* Update pnpm-lock.yaml

* Fix template-customization.block_theme.spec.ts

* Fix Cart, Checkout and Legacy Templates tests

* Fix tests in product-gallery.block_theme.spec.ts

* Fix tests in page-content-wrapper.block_theme.spec.ts

* Fix tests in template-customization.block_theme.spec.ts

* Fix Checkout and Local pickup tests

* Make closing the welcome popup conditional

* Use editor.canvas instead of custom locator

* Remove closing the welcome popup conditional

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/template-customization.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Update to WP 6.6 beta 3

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/template-customization.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-06-19 18:31:43 +02:00
github-actions[bot] ba81d5dab1
Delete changelog files based on PR 48593 (#48631)
Delete changelog files for 48593

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-06-19 12:29:18 -04:00
Luigi Teschio c3a2e275f1
Revert "Add To Cart Form: Add `Stepper` layout" (#48624)
* Revert "Add To Cart Form: Improve the default style and add the `Stepper` style (#47664)"

This reverts commit 0712c6037b.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-19 16:28:56 +00:00
Hristijan Manasijev d1dce11535
Feat: add filter to toggle showing tooltips over Order statuses in da… (#47861)
* Feat: add filter to toggle showing tooltips over Order statuses in dashboard

* Use status labels when hovering over Order status badge

* wip

* Add changelog

* Fix lint issues

* Reset indentation

* Reset indentation

---------

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-06-19 23:35:11 +08:00
Matt Sherman 7d5b3a81a2
Fix terms counts in wcadmin_product_add_publish Tracks event (#48194)
* Pass changes to woocommerce_update_product

* Use woocommerce_update_product instead of wp_after_insert_post, so that terms are already updated

* Changelog

* Suppress missing hook comment phpcs error (existing hook)

* Handle woocommerce_new_product

* Make changes param optional
2024-06-19 09:22:39 -04:00
Veljko V 3ea4df2055
Fix flaky connect to Woo e2e test (#48613) 2024-06-19 15:16:58 +03:00
Karol Manijak 0608eb7542
Product Collection: Handpicked Products filter is broken on stores with high volume of products (#48379)
* Make the handpicked product filter in Product Collection usable for high product number stores

* Add changelog

* Include selected products in the search

* Limit the search result to 40 as 100 is unreadible anyway

* Replace fill with pressSequentially to better mimic users behaviour

* Apply two strategies for fetching products: small catalog up to 100 products and large catalog with refetching when typing

* Add comment explaining the logic

* Bring back the Loading placeholder

* Pass explicitly perPage 0 for a small catalog to fetch all the products
2024-06-19 13:35:53 +02:00
Moon f95d8b240b
Detect cache when launching store (#48586)
* Remove duplicate

* Add is-coming-soon-page endpoint

* Render invalid cache warning

* Use meta tag instead

* Add url for debug purpose

* Use a different copy for the congrats page when the cache is still shown

* Clean up unused codes

* Guard the api with permission

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

* Reuse $is_fse_theme

* Lint fixes

* Update 48586-update-48516-detect-cache-when-launching-store

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

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

* Update plugins/woocommerce/changelog/48586-update-48516-detect-cache-when-launching-store

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

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

* changed to js method

* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce

* empty commit to trigger CI

* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce

* empty commit to trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2024-06-19 18:23:29 +08:00
Vedanshu Jain efc9dc4c62
Check WC_Legacy_API instead of WC_API as that seems to be cached by lightspeed servers (#48593)
* Check WC_Legacy_API instead of WC_API as that seems to be cached by lightspeed servers.

* Improve the detection of the legacy API:

1. Modify the autoloader so that it never loads the WC_API class.

This is needed bacause the legacy REST API plugin itself does a
"class_exists('WC_API')". The plugin itself will continue to load
its own copy of the class without issues.

2. Detect the WC_Legacy_REST_API_Plugin class in the legacy API stub.

This is a performant and bulletproof way to detect if the plugin
is isntalled.

* Rearrange code a bit

---------

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-06-19 14:29:03 +05:30
RJ c74015c5cb
add/shipstation global copy (#48549)
* add: updated shipstation copy to reflect global presence

* changelogs
2024-06-19 10:24:17 +08:00
olsonpm 972ed9eee7
fix null strpos param (#48476)
* fix null strpos param

check whether $plugin_page is set prior to passing it to strpos

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

* Update plugins/woocommerce/src/Internal/Admin/Orders/PageController.php

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

* Update PageController.php

fix eslint error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2024-06-19 10:23:34 +08:00
Chi-Hsuan Huang 1dd10f6269
Invalidate cache for SiteGround Speed Optimizer when coming soon options are changed (#48523)
* chore: Invalidate cache for SiteGround Speed Optimizer and WP Engine

The code changes in `ComingSoonCacheInvalidator.php` add cache invalidation for SiteGround Speed Optimizer and WP Engine. This ensures that the cache is cleared when necessary, improving the performance of the website.

* Add changelog

* Add a slash to ensure calls are made in global namespace

* Use sg_cachepress_purge_cache

* Update plugins/woocommerce/src/Internal/ComingSoon/ComingSoonCacheInvalidator.php

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>

* Fix lint

* Update plugins/woocommerce/changelog/update-purge-cache-siteground-wpengine

---------

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
Co-authored-by: moon <moon.kyong@automattic.com>
2024-06-19 01:19:33 +00:00
Chi-Hsuan Huang f001d76a60
[LYS] Fix product archive page not hidden behind coming soon page (#48522)
* Fix product archive page not hidden behind the coming soon page

* Add changelog

* Update comment

* Fix tests

* Fix lint

* Fix test
2024-06-19 08:46:30 +08:00
Damián Suárez 0cff4eba50
Product Block Editor: populate attribute options optimistically (#47618)
* show terms optimistically

* define values as TokenItem array

* introduce TokenItem type

* add token animation when adding

* terms could be undefined

* remove unused action

* changelog

* minor doc enhancements

* rename consts

* simplify items selector

* clean the temporary items, one by one

* do not pass selectedTerms when adding a new one

* pull and update form terms when creating new ones

* fix typo

* do not export TokenItem type

* rename and tweak jsdoc

* skip E2E test
2024-06-18 22:06:11 +01:00
Julia Amosova a6cd48b759
Update stable tag to 9.0.0 (#48584)
woorelease: Update stable tag to 9.0.0

Co-authored-by: Julia Amosova <juliaamosova@ultraw-mbp.mynetworksettings.com>
2024-06-18 14:20:56 -04:00
Veljko V d059f0c59e
Fix shopper search browser sort products & merchant customer list e2e tests (#48560)
* Fix shopper search browser sort products e2e test

* Add wait for navigation

* Fix flaky merchant customer list e2e test

* Add wait for response

* Fix flaky steps
2024-06-18 11:06:59 -07:00
Alba Rincón b5ba0ed54f
CYS - Optimize intro `professional-theme.svg` image (#48566)
* Optimize intro `professional-theme.svg` image

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-18 17:32:56 +02:00
Jorge A. Torres fb25aa86a4
Conditionally allow stock_quantity to be non-integer in REST API product schema (#48541) 2024-06-18 17:10:54 +02:00
Ivan Stojadinov da329a1620
Cherry-pick #311 into trunk (#48570)
* Redacted sensitive info from SSR for GutHub

* Redacted database section

* lint fix

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-06-18 16:20:13 +02:00
Veljko V 72672acc3a
Fix flaky checkout coupons e2e test (#48555) 2024-06-18 17:14:05 +03:00
Luigi Teschio 29d4b18a85
CYS: add pattern category in the block toolbar (#48501)
* WIP

* CYS: Refactor routing approach

* fix type

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

* remove focus logic

* remove routekey prop

* fix scroll after insert pattern

* pass onNavigateBackClick callback as prop

* fix scroll

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

* fix back arrow click

* fix css

* fix tooltip position

* create dedicated CSS class

* lint css

* restore change

* improve css class name

* remove not necessary class

* add github link to the todo

* lint css

* add want more pattern section

* remove not used import

* CYS: set new default patterns

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

* fix logic after merge trunk

* CYS: fix tooltip position

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

* trigger CI

* CYS: add pattern category in the block toolbar

* remove not necessary import

* improve style

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

* improve CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-18 13:07:56 +00:00
Luigi Teschio 408af71b27
CYS: Show Patterns from PTK (#48207)
* WIP

* CYS: Refactor routing approach

* fix type

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

* remove focus logic

* remove routekey prop

* fix scroll after insert pattern

* pass onNavigateBackClick callback as prop

* fix scroll

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

* fix back arrow click

* fix css

* fix tooltip position

* create dedicated CSS class

* lint css

* restore change

* improve css class name

* remove not necessary class

* add github link to the todo

* lint css

* add want more pattern section

* remove not used import

* fix logic after merge trunk

* CYS: fix tooltip position

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

* trigger CI

* improve logic

* use Optional Chaining

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-18 12:16:16 +00:00
Denis Dvali fafb5892c7
Add a note in readme about connection to WooCommerce.com (#48289)
* Add  a note about connection to WooCommerce.com to readme

* Add link to the Privacy Policy

* Remove extra new lines

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-18 14:05:45 +05:30
Paulo Arromba 5b2b83cd71
Add block/shortcode usage to Cart and Checkout pages in system report (#48300)
* Refactored get_pages() to reduce the amount of get_post() used, avoid unnecessary ifs, and fixed a bug where the classic shortcode block would trigger a false block usage value.

* Added block/shortcode usage to the system report for the Cart & Checkout pages. Also added a warning when a page contains both experiences.

* Added support info for templates out of sync not loading the page content.
2024-06-18 10:31:46 +02:00
RJ 29e5c96a5a
add: printful placement to add products task (#48520)
* add: printful placement to add products task
2024-06-18 10:49:52 +08:00
Moon 330ac574a4
Add a close button to dismiss store alerts (#48453)
* Add close button to store alerts

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

* Fix tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-17 17:22:20 -07:00
Matt Sherman a43e3b6a59
Update product status after calling save() on a new product (#48241)
* Assert that a new product that is saved returns the correct status ('publish' by default)

* Update product status after saving

* Changelog

* Add additional unit tests to verify status is handled correctly
2024-06-17 16:19:41 -04:00
Thilina Pituwala eabc599c51
Increase timeout for WCCOM connect flow (#47842)
Increase connection timeout to 30 seconds for the requests in WCCOM connection flow
2024-06-17 11:53:46 -07:00
Veljko V 8c680e85d7
Fix flaky customize store transitional e2e test (#48532) 2024-06-17 10:00:12 -07:00
Veljko V 08921203d8
Fix flaky checkout block e2e test (#48527)
Fix flaky checkout block test
2024-06-17 09:54:49 -07:00
danielvonmitschke 4df98f6379
Fire action if order line item has been restored (#40848)
* Fire action if order line item has been restored

This is the equivalent to the 'woocommerce_reduce_order_item_stock' hook in the wc_reduce_stock_levels() function.

* Add @since tag to docblock

* Change position of @since tag

* Add changelog

* Use tabs for indents

* Fix indents again

* Fix another indent
2024-06-17 17:21:20 +01:00
Barry Hughes bb9b332ae2
Add best practices advice to the API generation screen (#48483)
* Add "best practice" advice to the API key generation screen.
2024-06-17 15:13:37 +01:00
Vishnu Gopal 28b4d228c9
Prefer update URLs over PluginURI in My Subscriptions (#47950)
* Prefer update URLs over PluginURI in My Subscriptions

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

* Add comments to clarify how the function works

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-17 20:51:14 +07:00
Karol Manijak 65423a4d15
Add `queryId` to the Product Collection in blockified templates (#48530)
* Add hardcoded queryId to the blockified templates

* Add additional check in PC block to verify the content is being rendered

* Add changelog

* Lint fix
2024-06-17 15:39:30 +02:00
Daniel W. Robert a203823d62
Add CYS Fiverr Logo Maker CTA (#48486)
* Add markup for Fiverr logo maker.

Add text CTA with link to WooCommerce landing page for Fiverr logo
maker in sidebar navigation on the logo view.

* Adjust styles for Fiverr logo maker CTA.

* Update string output to use interpolateComponents

The text in this addition is mixed with string and markup.

This segmentation can lead to translation issues because
different languages have different syntactic structures.

Here, we utilize interpolateComponents to remedy these potential issues.

See
https://github.com/woocommerce/woocommerce/pull/48486#discussion_r1639637477
for context.

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

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-17 09:12:56 -04:00
Fernando Marichal 0652c2eb4f
Set stock quantity value as 0 by default (#48448)
* Set value to stock quantity

* Add changelog

* Undo set_stock_quantity

* Fix orders.test.js lint

* Fix product-list-test lint
2024-06-17 08:41:24 -03:00
Luigi Teschio 317fcaedc8
CYS: fix logic to disable mover buttons (#48502)
* CYS: fix logic to disable mover buttons

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-17 08:56:45 +00:00
Chi-Hsuan Huang 4162a6ef89
Wrap activity panels in error boundary (#48415)
* Fix review error type

* Add changelog

* Rename global error-boundary class to avoid conflict

* Rename global error-boundary class to avoid conflict

* Wrap panels in error boundary

* Remove console

* Reformat

* Fix test

* Fix test

* Add changelog
2024-06-17 13:05:11 +08:00
Néstor Soriano 1e92b0efaf
Optimize the regeneration of the product attributes lookup table (#47700)
Fixes  #46699 

* Add the ProductAttributesLookup\CLIRunner class

* Fix the restoring of the lookup table usage option

* Fix the restoring of the lookup table usage option

* Improve the progress bar of the regeneration command

* Add changelog file

* Fix existing unit tests

* Add linter exception for TODO comment

* Fix example in CLI runner

* Optimize data insertion/update in the product attributes lookup table

The optimized method uses direct database access to the database tables
required to gather all the required data (posts, terms, teaxonomies)
instead of the standard WordPress and WooCommerce functions.
This is done only if:

1. The curent data store for products is the posts table, AND
2. The woocommerce_attribute_lookup_optimized_updates option is 'yes'

Otherwise, the old existing code is used as a fallback instead.

* Adjust the product attributes lookup table CLI tools.

The "regenerate" and "regenerate_for_product" commands will now
use the optimized update method by default if the data store
for products is the posts table (irrespective of the value of the
woocommerce_attribute_lookup_optimized_updates option).
The --disable-db-optimization argument can be appended to
use the old method instead.

* Adjust unit tests for the product attributes lookup table data store.

Now both the optimized data insert/update method and the old
standard functions based method are tested.

* Change the default step size for product attributes lookup table regeneration

The previous value of 10 was too conservative and slowed down the
regeneration unnecessarily (each step involves a call to
wc_get_products, which is quite slow). The new value of 100 is not
too high as to produce bottlenecks, but provides a significant
performance gain.

* Add a missing exception variable

* Add changelog file

* Replace sneaky spaces with tabs

* Make the linter happy

* Add extra code comment for clarity

* Display error messages after CLI commands if table updates fail.

* Use lookup table name variable in SQL query

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

* Better description for the newly introduced setting

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

* Fix typo in method name and change |= operator to ||

* Fix linting issue and variable initialization

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-06-14 13:42:58 -07:00
Brezo Cordero 49c76bd080
Remove edit_comments_screen_text on gettext filter for performance (#48485)
* Remove filter edit_comments_screen_text on gettext for performance

The filter is removed to improve performance and avoid unnecessary calls. Acceptable tradeoff: When editing a product review in the Admin, the screen title changes from "Edit Review" to "Edit Comment".

* Add changelog
2024-06-14 12:01:49 -07:00