Commit Graph

22274 Commits

Author SHA1 Message Date
Ivan Stojadinov acc313a9b2
[e2e] External - Expand WPCOM suite, part 2 (#51414)
* Add /merchant tests to the WPCOM suite

* Skip "can manually add a variation" on WPCOM

* Skip "Coupon management" - API returns 500 on delete

* Resolve `wp-block-woocommerce-checkout-order-summary-block` on the first element

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-17 10:43:43 +02:00
Manish Menaria 861bc091d4
Product Collection - Add Editor UI for missing product reference (#51114)
* Initial implementation of the missing product state

- Changed `getProductCollectionUIStateInEditor` to a hook `useProductCollectionUIState`.
	- As we added logic to check if selected product reference is deleted which require making an API call. Therefore, I decided to use a hook.
- While making an API call to check if product reference is deleted, I decided to show spinner in the block.
- Introduced new UI state `DELETED_PRODUCT_REFERENCE` to handle the missing product state.
- Updated existing `ProductPicker` component to handle the new UI state.
	- It's better to use existing component for the missing product state, as it already has all the required UI.

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

* Use getEntityRecord to check if product exists and other improvements

* Remove console log

* Add E2E tests for deleted product reference in Product Collection block

This commit introduces new E2E tests to verify the behavior of the Product
Collection block when dealing with deleted product references. The changes
include:

1. New test suite in register-product-collection-tester.block_theme.spec.ts
2. Modification to product-collection.page.ts to support custom product selection
3. Minor update to utils.tsx to handle trashed products

These tests ensure that the Product Collection block correctly handles
scenarios where referenced products are deleted, trashed, or restored,
improving the overall reliability of the feature.

* Simplify product creation in Product Collection block test

* Refactor E2E test for delete product reference picker

1. Removing the unnecessary `test.describe` block for "Deleted product reference"
2. Eliminating the `beforeEach` hook that was creating a test product
3. Integrating the test product creation directly into the main test

This change simplifies the test structure and improves readability while
maintaining the same test coverage for the Product Collection block's
behavior when dealing with deleted or unavailable products.

* Simplify logic for product collection UI state

This commit simplifies the handling of the `usesReference` prop in the
Product Collection block:

1. In `edit/index.tsx`, directly pass `usesReference` to
   `useProductCollectionUIState` hook without conditional spreading.

2. In `utils.tsx`, update the type definition of `usesReference` in the
   `useProductCollectionUIState` hook to explicitly include `undefined`.

* Refactor Product Collection block to improve prop passing

- Introduce ProductCollectionContentProps type for better prop management
- Refactor Edit component to use a renderComponent function
- Update component prop types to use more specific props
- Remove unnecessary props from ProductCollectionEditComponentProps
- Simplify component rendering logic in Edit component
- Adjust ProductPicker to receive only required props
- Update imports and prop types in various files to use new types

This refactoring improves code organization and reduces prop drilling by
only passing necessary props to each component. It enhances maintainability
and readability of the Product Collection block and related components.

* Refactor Product Collection block editor UI state handling

This commit simplifies the rendering logic in the Product Collection block's
Edit component. It removes a redundant case for the VALID state, as both
VALID and VALID_WITH_PREVIEW states now render the same ProductCollectionContent
component. This change improves code maintainability and reduces duplication.

* Fix: isDeletedProductReference is not set correctly

* Use "page.reload" instead of "admin.page.reload"

* Separate PRODUCT_REFERENCE_PICKER and DELETED_PRODUCT_REFERENCE cases

This improves readability and maintainability of the switch statement.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-17 14:08:24 +05:30
Albert Juhé Lluveras 4ee2689f4f
Fix fatal when adding the Product Gallery (Beta) block into a pattern (#51189)
* Fix fatal when adding the Product Gallery (Beta) block into a pattern

* Add changelog file

* Linting
2024-09-17 09:49:53 +02:00
Moon 160b3e3ca7
Add use-wp-horizon feature flag (#51421)
* Add use-wp-horizon feature flag

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 21:02:21 -07:00
RJ 0036b4d293
add: tax task completion filter (#51362)
* add: tax task completion filter

* fix: add phpcs ignore for missing hook comment

* lint
2024-09-17 09:33:41 +08:00
Miguel Pérez Pellicer e4d995938f
Set customer email in reports data if available (#51367)
* Set customer email in reports data if available.

* Add changelog

* Lint
2024-09-16 22:45:47 +04:00
Boro Sitnikovski bf0646c307
Add error handling when the call to 'install-url' endpoint fails (#51298)
* Add error handling when the call to 'install-url' endpoint fails

* Changelog

* Ignore any explicitly

* Move the function below to address lint

* Change 'Try again' to a href, suggesting to download and install manually

* Lint
2024-09-16 16:57:05 +02:00
Tomek Wytrębowicz 450a299bae
Fix tax_code in the report export for removed rates (#51395) 2024-09-16 15:59:18 +02:00
Seghir Nadir 1ef1aaa1f0
Hadren styles for interactive elements in Checkout block (#51375)
* reset styles for panel button

* reset styles for address card edit and address line 2

* Update shipping selector buttons

* fix line height

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

* remove extra styles no longer needed

* update styles to balance chevron and change to span

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-09-16 13:03:20 +00:00
Ivan Stojadinov cebdcc61d0
[e2e] External - Expand WPCOM suite, part 1 (#51303)
* Expand WPCOM suite

* Skip core-profiler.spec.js on WPCOM - no "Coming soon"

* Skip `Analytics-related tests` on WPCOM - different sums

* Skip `Marketing Overview page have relevant content` - no content on WPCOM

* Payment setup task - make Save button more unique

* Include more tests in playwright.config.js

* Skip `Store owner can skip the core profiler`

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

* Make "Get paid" more unique

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 13:56:44 +02:00
Seghir Nadir 77a17e48b7
update Mongolia postcode to be 5 digits instead of 6 in Checkout block (#50279)
* update Mongolia postcode to be 5 digits instead of 6

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

* update validation package and expand mongolia checks

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

* update lock

* fix lock again

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 11:22:38 +02:00
Narendra Sishodiya 63d93d7355
Implemented PHPCS Fixes in OrdersTableQuery.php and ProductQuery.php (#51281)
* Implemented PHPCS Fixes in OrdersTableQuery.php and ProductQuery.php

* Reverted gmdate() to date()

* Add changelog

* Fixed linting issue in Update OrdersTableQuery.php

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-09-15 16:21:55 +01:00
Fernando Marichal ae20724210
Add inspector controls to Product Search block (#51247)
* Add inspector controls to product search

* Add changelog

* Move inspector panel to Styles

* Remove not used Fragment

* improve code

* Rename enum

* Rename type ProductSearchBlockProps

* Use PositionOptions constant

* Change hook namespace
2024-09-13 18:52:12 -03:00
Barry Hughes 9b41815229
Produce CSV Import enhancements (cherry-pick PR#51344) (#51348)
* Move AJAX callback to produt importer controller

* Add better validation for file paths in CSV product import

* Add utility function to create a no-index directory

* Add CSV upload helper

* Simplify product CSV import logic using helper

* Update tests

* Add changelog

* Changelog.

* Remove changelog file; entry added directly to root changelog.txt.

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-09-13 11:39:37 -07:00
Tung Du 93053f39ed
[Experimental] Product Filters: New and improved blocks structure (#51096) 2024-09-14 00:04:06 +07:00
Cem Ünalan 3854f710df
In-App: make in-app header sticky (#51187)
* In-App: make in-app header sticky

z-index: 1 is required to make sure the header appears above product
cards.

Also had to remove a parent `overflow: hidden` property. Apparently,
it's there to remove a second scrollbar. Upon removal, I didn't see
any double scrollbars, although it can be platform differences. Will
check it out in the PR review.

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

* Update Change Your Store width for Marketplace search listing

Setting it 450px hardcoded causes overflows and breaks the layout.

See:
https://github.com/woocommerce/woocommerce/pull/51187#issuecomment-2344003169

* Move CYS tweak to the component

It was placed in the marketplace SCSS code previously. GitHub:
https://github.com/woocommerce/woocommerce/pull/51187#discussion_r1758381473

* Remove marketplace-specific styles from customize store banner

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
2024-09-13 15:55:47 +00:00
Miguel Pérez Pellicer 737afc62e1
Validate and prepare GTIN in structured data (#50926)
* Validate and prepare GTIN in structured data

* Add changelog

* PHPCS

* PHPCS

* Verify gtin is string in prepare gtin

* Tweak tests

* PHPCS

* Tweak is_valid_gtin

* LINT

* Update plugins/woocommerce/includes/class-wc-structured-data.php

Co-authored-by: Mik <mikkamp@users.noreply.github.com>

* Update plugins/woocommerce/includes/class-wc-structured-data.php

Co-authored-by: Mik <mikkamp@users.noreply.github.com>

* Update plugins/woocommerce/includes/class-wc-structured-data.php

Co-authored-by: Mik <mikkamp@users.noreply.github.com>

---------

Co-authored-by: Mik <mikkamp@users.noreply.github.com>
2024-09-13 19:11:11 +04:00
Fernando Marichal ce618d6250
[Enhancement] Abstract rating block (#50810)
* Create rating component

* Refactor rating block

* Fix ProductRating component

* Refactor rating blocks

* Add changelog

* Review count maybe visible for rating stars

* Rename props

* Remove 0 after No reviews message

* Remove review count from rating-stars
2024-09-13 09:35:56 -03:00
Seghir Nadir 348455fb02
Add focus styles for select in Checkout block (#51332)
* Add focus styles for select

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-13 11:13:40 +01:00
Seghir Nadir 1b28b0f1ca
Use site language when making Store API requests in Cart/Checkout (#51244)
* Use correct langauge by reseting the locale param

* use typescript
2024-09-13 11:42:21 +02:00
Karol Manijak 29ed02836a
Disable client-side nav in PC block when filters are inside (#51358)
* Disable client-side nav in PC block when filters are inside

* Add changelog

* Fix lint
2024-09-13 09:58:17 +02:00
Corey McKrill 9d76114472
Update Action Scheduler to 3.8.2 (#51353)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-09-13 09:37:13 +02:00
Basti 4dad4a9265
Fix: Version in mini-cart.php (#51020)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-09-13 08:51:31 +02:00
Vishnu Gopal 411d9ae78c
Add subscribe notices for products without subscription (#51060)
- Add a new notice to the plugins list for products used without subscriptions reminding them to purchase.
- Remove notices for expired and expiring subscriptions from WooCommerce settings screens.
- Change link for subscribe and renew to add the product directly to cart.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-13 10:33:54 +05:30
RJ d7ccebc004
fix: add check for wp_get_current_user() before calling it (#51302)
* fix: add check for wp_get_current_user() before calling it

* changelog

* changed try catch to catch throwable
2024-09-13 12:44:28 +08:00
Sam Seay 268fc4cf4d
Fix a bug where the guest order confirmation email input was too wide (#51277)
* Add styles to style the input width appropriately.

* Remove redundant styles.

* Remove unused import

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-13 13:22:55 +12:00
Chi-Hsuan Huang 2cbb9d59bc
Deprecate unsupported Inbox note banner layout (#51275)
* Deprecate note banner layout

* Update doc

* Add changelog
2024-09-13 01:11:11 +00:00
Chi-Hsuan Huang f89366033d
Dynamically set plugin_name when redirecting to Jetpack Auth from core profiler (#51278)
* Dynamically set plugin_name when redirecting to Jetpack Auth from core profiler

* Add changelog

* Update param name
2024-09-13 08:34:17 +08:00
Chi-Hsuan Huang 45fc403f6f
Remove deprecated RemoteInboxNotification classes (#51250)
* Remove deprecated RemoteInboxNotification classes

* Derecate RIN interfaces

* Move RIN tests to remote specs folder

* Add changelog

* Update changelog

* Fix lint

* Fix lint

* Fix tests
2024-09-13 08:31:59 +08:00
RJ 109744db33
fix: remove help panel user meta (#51249) 2024-09-13 05:46:27 +08:00
Cem Ünalan 3300aef6c7
In-App Marketplace: Record the legacy Tracks event for Discover page (#51163)
* In-App Marketplace: Record the legacy Tracks event for Discover page

Fixes #21486

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 21:13:13 +00:00
Cem Ünalan 0e930533e9
Prevent search request in the Extensions > My Subscriptions page (#51164)
* Prevent search request in the Extensions > My Subscriptions page

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 20:36:58 +00:00
Maikel Perez f39e1d72c0
CYS: Fix Looker dashboard data (#51206)
* Track data for font and color pairings including 'Create your own' option in CYS

* Add changelog file

* Track data for logo flow

* Send the open param as part of the tracking event customize_your_store_assembler_hub_color_palette_create_toggle
2024-09-12 12:47:23 -03:00
Ivan Stojadinov a06c6ba496
[e2e] External sites - Include API tests for Pressable and WPCOM (#51284)
* Pressable - run only /api-tests

* Skip on Pressable

* Fix lint errors

* WPCOM - run API only

* Revert "WPCOM - run API only"

This reverts commit 5e59be1663.

* WPCOM - run API only

* Update settings-crud.test.js so they are passing against Pressable

* Skip "can retrieve all tax settings"

* Skip "can view all system status items" on WPCOM

* Several skips in settings-crud.test.js

* Skip "Product review tests: CRUD" on WPCOM

* Skip "List all products > categories" on WPCOM

* Skip "can view all payment gateways" on WPCOM

* Skip "Orders API tests" on WPCOM

* Skip "Customers API tests: CRUD" on WPCOM

* Revert `playwright.config.js` files and include '**/api-tests/**/*.test.js',

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

* Skip three more API tests for WPCOM

* Skip two coupons tests

* Update report name for Pressable and WPCOM to ``*-core-e2e-and-api`

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 16:01:40 +02:00
Ilyas Foo 3dc0d69091
Re-enable remote logging feature by default (#51320)
* Reenable remote logging feature by default

* Changelog
2024-09-12 21:36:08 +08:00
Raja sekar 97182ef9ca
Changes to IAM footer (#51315)
* add max-width and border raidus to footer container
- to make it look similar to design your own theme box

* remove marketplace copy from footer

* add another tab to footer

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

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

* add feedback on code

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 18:28:48 +05:30
Raja sekar 358bc1fee2
Make padding consistent and remove bottom margin for for all types of product cards (#51288)
* Make padding consistent for all type of card contents as 24px

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

* override margin bottom added by woo payments plugin for product cards

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-12 17:44:25 +05:30
github-actions[bot] c7c054d8f8
Delete changelog files based on PR 51312 (#51319)
Delete changelog files for 51312

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-12 19:03:04 +07:00
Mike Jolley b0401ef25d
[Experimental] Delayed Account Creation Block (#50934)
* Add block to templates

* Register block type with php

* Create block type class

* Update webpack

* Move password strength meter component

* Add button styles when disabled

* Move password strength component

* Block WIP

* CSRF token handling

* Put new block behind feature flag

* Add experimental flag docs

* Update icon + description

* Changelog

* Lint errors

* Style controls

* Adjust icon markup

* subsctring match

* More specific import

* Fix test fail caused by layout shift

* Wording changes from Figma

* Check if logged in, not just if the current email is registered

* Use opacity for disabled button text

* Sync order data with customer after account creation

* Add id/fragment to form
2024-09-12 11:18:13 +01:00
Ilyas Foo 7eb31840e7
Disable remote logging feature by default (#51312)
* Disable remote logging feature by default

* Changelog
2024-09-12 18:12:29 +08:00
Chi-Hsuan Huang 56c04f2bfb
Fix unsnooze notes not working (#51254)
* Fix saving note timestamp

* Fix missing wc_admin_unsnooze_admin_notes action

* Add changelog

* Update tests
2024-09-12 09:14:25 +00:00
Miguel Pérez Pellicer c96f9f38bd
Reduce slow reports tests (#51279)
* Fix slow tests

* Lint

* Changelog

* Lint

* Lint
2024-09-12 13:07:28 +04:00
Karol Manijak ed9742f18b
Skip failing tests from experimental Product filters feature (#51305)
* Skip failing tests from experimental feature

* Add changelog
2024-09-12 10:37:51 +02:00
Roy Ho 41cf2b285e
[Experimental] Product filters/overlay nav block redesign (#51211)
* Remove overlay icon settings from parent block

* Change overlay block icon to generic button icon

* Add logic to remove overlay nav when overlay mode is set to never

* Add logic to add overlay nav when overlay mode is not never

* Add default attributes for overlay nav button

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

* Use unique icons for each overlay navigation close and open

* Add icon picker for open overlay navigation

* Add trigger type for overlay close navigation

* Add missing settings label

* Fix e2e tests

* Skip a test for overlay-navigation block

* Add e2e tests for overlay button behavior

* Fix linting error

* Skip overlay nav tests

* Fix icon size value not saving

* Revise logic to target explicitly the innerblock of product-filters

* Ensure overlay navigation is of type open-overlay

* Prevent possible race conditions

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-11 12:11:51 -07:00
Adrian Moldovan 0c8a8bd6cf
[e2e tests] Fix flakiness and refactor create-order spec (#51292) 2024-09-11 21:10:00 +03:00
Adrian Moldovan 0e2258b57d
[e2e tests] Fix flaky test and refactor admin-tasks payment spec (#51269) 2024-09-11 10:32:18 -07:00
Mike Jolley d87c3d38d7
Performance: Move collectableMethodIds to cart/checkout block assets rather than loading it sitewide (#51174)
* Move collectableMethodIds to cart/checkout block assets

* changelog
2024-09-11 16:25:20 +01:00
github-actions[bot] d4cc6578c7
Delete changelog files based on PR 51289 (#51294)
Delete changelog files for 51289

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-11 21:48:29 +07:00
Alexandre Lara 0b16cfa06a
[Experimental] Product Filters Redesign > Overlay: Add Fullscreen view (#50505)
* Add variation to Product Filters Overlay Navigation

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

* Move Product Filters Overlay Navigation to correct position

* Hide block when it is outside the Product Filters template part

* Display Navigation block in the frontend

* Show the Product Filters Overlay Navigation on the frontend

* Add logic to hide Product Filters Overlay Navigation block on the frontend

* Hide block on the Overlay template part

* Fix eslint errors

* Update the block variation title

* Remove the `isActive` property from the block variations

* Use Product Filters block context

* Replace enum with const

* Remove unnecessary `StyleAttributesUtils`

* Rename context key

* Move BlockOverlayAttribute to the constants.ts file

* fix BlockOverlayAttribute import

* Fix import error

* Improve code for the shouldHideBlock method

* Remove unnecessary attributes property

* Fix error in ProductFiltersOverlay block

* Add dialog to the Product Filters block

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

* Fix interactivity api error

* Prevent block from being hidden on Product Filters template part

* Fix inspector controls when block is hidden

* Add clickable action to the Product Filters Overlay Navigation block

* Fix interactivity directives that were not working for the Overlay

* Fix issue with dialog styles not being correctly applied

* Add the `closeDialog` functionality

* Parse and render blocks for the Product Filters overlay

* Fix padding

* Fix style for Product Filters Overlay navigation block

* Add e2e test

* Add e2e test to Product Filters Overlay template part

* Fix e2e test

* Fix issue causing the trigger button to show even though the overlay mode is set to 'Never"

* Fix issue causing close button to not be displayed in the dialog

* Add e2e tests

* Fix issue that was preventing users from scrolling down the dialog content

* Remove text duplication in e2e tests

* Remove unnecessary imports

* Fix php cs errors

* Fix php cs error

* Revert changes on Product Gallery modal styles

* Fix lint errors

* fix php cs lint errors

* fix php cs error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-11 11:30:35 -03:00
Seghir Nadir 96497814e4
Revert update to createRoot in Checkout block. (#51289)
* Revert "[React 18] Use `createRoot().render()` instead of `render()` (#48843)"

This reverts commit 752273e6ce.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-11 13:44:09 +00:00
Fernando Marichal e4f03589ab
Deprecate single product block save (#51153)
* Add deprecated save

* Fix button styles

* Add changelog

* Add attributes to deprecated prop

* Add supports prop to deprecated obj

* Add code comment
2024-09-11 09:54:43 -03:00
Chi-Hsuan Huang b728f53f29
Fix duplicate spec evaluation in `evaluate_specs()` (#51166)
* feat: Add memoization to EvaluateSuggestion class

This commit adds memoization to the `EvaluateSuggestion` class in order to improve performance by caching the results of the `evaluate_specs` method. The memoization is implemented using an associative array called `$memo`, which stores the results of previous evaluations based on the input specifications and logger arguments. The memoization logic checks if the results for a given set of specifications and logger arguments already exist in the `$memo` array, and if so, returns the cached results instead of re-evaluating the specs. This helps to avoid redundant computations and improves the overall efficiency of the `evaluate_specs` method.

* Add changelog

* Only use specs as key

* Move shipping test to correct folder

* Fix tests

* Fix tests

* Fix lint

* Address PR feedback
2024-09-11 08:13:48 +00:00
Chi-Hsuan Huang 007bd21a35
Clean up purchase task (#51274)
* Remove Purchase task

* Add changelog
2024-09-11 15:39:28 +08:00
Chi-Hsuan Huang 057e118a34
Fix size for coming soon banner login button (#51251)
* Fix coming soon banner login button style

* Add changelog
2024-09-11 13:47:02 +08:00
Tomek Wytrębowicz 065470dea8
Use `get_filtered_ids` consistently in `taxes` and `…/stats` datastores (#51219) 2024-09-10 23:17:10 +02:00
Álvaro Thomas be79bcca84
E2e Tests Order Copying Billing Shipping Address (#50131)
* Update order edit tests with shipping address tests

Update order edit tests with shipping address tests

* Add changelog

* Refactor new tests

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-09-10 23:13:54 +03:00
Adrian Moldovan d409d6db99
[e2e tests] Don't catch api errors in fixtures (#51265) 2024-09-10 10:32:41 -07:00
Boro Sitnikovski da7cf716d8
Add chevron after See more to the list header (#51199)
* Add chevron after See more to the list header

* Changelog

* Correct changelog path

* Alphabetically ordered imports :)
2024-09-10 18:28:31 +02:00
Adrian Moldovan 70716d1a6a
[e2e tests] Fix flaky product images test: can update a product gallery (#51263) 2024-09-10 09:16:52 -07:00
DAnn2012 b72e07c605
Fix typos (WooCommrece) (#50333)
* Update README.md

* Update 722.md

* Update 741.md

* Update docs-manifest.json

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
2024-09-10 08:15:36 -07:00
Adrian Moldovan 31a2474c3b
[e2e tests] Fix flaky test create-variable-product-block-editor > can create a variation option and publish the product (#51246) 2024-09-10 14:51:45 +02:00
Vladimir Reznichenko 9fd4b54902
PHPUnit: report slow tests. (#51253)
Enables reporting slow PHPUnit tests as part of testing [progress output.
2024-09-10 12:37:23 +02:00
Herman d53c5a2222
Fix in-app product card descriptions (#51228)
* Add classname to description section for business service card

* Decode HTML entities in product descriptions

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Raja sekar <raja.sekar.manimaran@automattic.com>
2024-09-10 12:55:24 +05:30
Herman 904dfaa2ff
Set in-app product card price meta dynamically (#51170)
* Set product card price currency and suffix dynamically based on endpoint data

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

* Remove unnecessary comment

* Update types to match data received from WCCOM after further changes to the API

* Apply suggestions from code review

Allow for future currencies that might switch the symbol/value order

Co-authored-by: Dan Q <dan@danq.me>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>
2024-09-10 06:57:52 +00:00
Herman 3b35e22c99
Update in-app product card clicked Tracks event (#51180)
* Add product and group id properties to Tracks data for product card clicks

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

* Update product tracksproperty to product_id

Co-authored-by: And Finally <andfinally@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-09-10 08:33:12 +02:00
Chi-Hsuan Huang 7dc26a8c66
Clean up 'Profile Wizard' code (#51190)
* Remove plugins/woocommerce-admin/client/profile-wizard

* Clean up styles

* Remove setup wizard hook reference

* Add changelog

* Remove e2e utils related to old setup wizard

* Fix lint

* Add changelog

* Remove unused usage modal
2024-09-10 11:29:14 +08:00
Vedanshu Jain e85869f3a4
Add phone to searchable FTS fields for order addresses. (#51065)
This PR adds the phone number to the FTS index on the order address table, and adds the migration routines so that we can recreate the index for shops that already have this enabled. Additionally, it also removes support for relevancy operators to make search performant.

Fixes #51213
2024-09-09 16:20:25 -07:00
Adrian Moldovan 0645a0326d
[k6 tests] Manage K6 version (#51239) 2024-09-09 21:29:09 +02:00
Matthew Reishus a8b42b3ce3
Blocks\Assets\Api: Do not attempt to update script_data transient with the same data (#50962)
* Blocks\Assets\Api: Do not attempt to update script_data transient with the same data

* Add changelog

* Update plugins/woocommerce/src/Blocks/Assets/Api.php

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

* Update plugins/woocommerce/changelog/50962-dont-update-transient-with-same-data

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2024-09-09 16:59:58 +01:00
Vlad Olaru b40c4a95e5
Attach WooPayments incentive ID to wcadmin_tasklist_click Tracks event props (#51105)
* Add WooPayments incentive ID to task additional data

* Attach WooPayments incentive ID to wcadmin_tasklist_click Tracks event

* Add changelog

* Add changelog

* Replace short array syntax

* docs: Update docs
2024-09-09 18:06:43 +03:00
louwie17 0e8d19d43b
Upgrade storybook to version 7 and add pages workflow for GH publishing (#51168)
* Updated storybook and renamed stories to use the *.story.js/tsx format

* Renamed stories within product editor and wc admin package

* Include *story files in product editor package

* Add storybook pages workflow

* Remove the 'on' param in storybook-pages

* Add changelogs

* Fix failing tests

* Add dirname for any other webpack configs that rely on the woocommerce-admin one

* Fix React 18 warnings

* Remove unneeded storybook packages from components package

* Remove storybook workflow, to be added as a follow up instead

* Revert @storybook/react back to fix unit tests
2024-09-09 12:06:01 -03:00
David Marín 7f89cd5090
Using new coupon_info metadata, if it exists, to determine the actual coupon id (#48262)
* Using new coupon_info metadata to determine the actual coupon id

Changes to make use of the new coupon_info meta data, if it exists, to determine the actually-used coupon.

If coupon_info meta data doesn't exist, I'm also adding an extra filter so, in case there are more than one active coupons with the same name, we filter out the ones that were created after the order.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-09-09 17:00:37 +02:00
Thomas Roberts 72112bd5d4
Update shipping calculator wording and Cart/Checkout order summary title (#51072)
* Update isAddressComplete to allow only specific fields to be checked

* Update tests for isAddressComplete

* Update wording on "enter address" prompt in Cart sidebar

* Update Shipping to Delivery in cart & checkout shipping total

* Only check the city, state, country, & postcode fields in shipping calc

* Update wording in the "Ships to" section of cart/checkout sidebar

* Update shipping calculator button to say delivery

* Update tests to use new strings

* Remove test that was falsely passing anyway

This test checked for presence of a string that wasn't in the codebase. It also doesn't seem like a valid test. Why would we want to remove the button just because default rates are available?

* Add changelog

* Left align text in shipping calculator button

It floats weirdly in the middle with the new text changes

* Update text in tests

* Update wording in unit tests

* Update shipping calculator text in test

* Update shipping text in test

* Update use of shipping in tests

* Skip test with no translation available

* Lint fixes

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-09-09 15:19:57 +02:00
DAnn2012 acdf296215
Fix typo (wc-update-functions.php) (#50146)
* Update wc-update-functions.php

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-09-09 12:15:19 +00:00
Herman b913931623
Remove title for Extensions and Themes tabs (#51195)
* Remove title for Extensions and Themes tabs

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>
2024-09-09 14:08:49 +02:00
Vladimir Reznichenko 8dcb562c39
[dev] PSR-4 naming fixes in tests (part 2) (#51198)
In this PR we address PSR-4 naming-related violations (class FQN vs path mismatches and co) in tests.
2024-09-09 11:26:55 +02:00
Vladimir Reznichenko 199883a05a
[dev] PSR-4 naming fixes in tests (part 1) (#51194)
In this PR we address PSR-4 naming-related violations (class FQN vs path mismatches and co) in tests.
2024-09-09 10:37:30 +02:00
RJ 86c2358d18
dev: refactor xstate update query params made generic (#51167)
* refactor: make updateQueryParam generic

* changelog
2024-09-09 10:49:40 +08:00
Jonathan Lane 43cc912bba
Select bank transfer explicitly on customer payment page e2e test (#51210)
Select bank transfer explicitly

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-09-06 20:24:44 +00:00
Adrian Moldovan 36f85ef0c6
[e2e tests] Fix flakiness in page publishing action (#51196) 2024-09-06 11:34:51 -07:00
Veljko V. b71e6e22a8
[e2e] External sites - update /shopper tests, part 1 (#51068)
* Update shopper tests and util to fix external env compatibility

* Update WPCOM config to include shopper tests and skip one from testing

* Update WPCOM config

* Update shopper shop title deletion test to avoid false positives

* Add search and click steps to afterEach

* Update selector in test to pass across all envs

* Update external PW configs for shopper tests

* Improve existing test to use WP API for setup

---------

Co-authored-by: Ivan Stojadinov <ivan.stojadinov@automattic.com>
2024-09-06 15:34:45 +02:00
Roy Ho 63243c57a9
[Experimental] Product filters > Attributes loading state in editor (#51151)
* Fix no products component prematurely being rendered

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

* Use useMemo to memoirize component element on re-renders

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-06 05:33:02 -07:00
Ivan Stojadinov a61a2bd29e
[e2e tests] External sites - update /merchant tests, part 4 (#51181)
* Skip `WooCommerce woo.com Settings`

* Make `Update` button more unique

* Run entire /merchant folder

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-06 11:27:45 +02:00
Chi-Hsuan Huang 19661e3317
Refactor Country Specs to use in operator (#51162)
* Refactor Country Specs to use in operator

* Add changelog

* Refactor shipping specs
2024-09-06 15:45:49 +08:00
Ilyas Foo b4f1062783
Update coming soon docs to include more extensibility examples (#51160)
* Update docs

* Small update

* Changelog

* Lint

* Docs manifest

* Add store pages extensibility

* Docs manifest

* Update docs/extension-development/integrating-coming-soon-mode.md

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

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-09-06 14:38:59 +08:00
Ian Yu-Hsun Lin 43ce3c1c4d
[WC Analytics] Add filters for custom orderby query params (#49722)
* Add a filter `woocommerce_report_categories_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_coupons_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_coupons_stats_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_customers_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_downloads_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_downloads_stats_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_orders_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_orders_stats_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_products_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_products_stats_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_revenue_stats_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_stock_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_taxes_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_taxes_stats_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_variations_orderby_params` for custom orderby query params

* Add a filter `woocommerce_report_variations_stats_orderby_params` for custom orderby query params

* Add changelog

* Add a method `apply_custom_orderby_filters()` in analytics GenericController

* Use the shared method to in analytics GenericController to apply custom
orderby enum

* Fix typo, add more comments in analytics custom orderby filter PHPDoc

---------

Co-authored-by: Tomek Wytrębowicz <tomalecpub@gmail.com>
2024-09-06 12:13:03 +08:00
Chi-Hsuan Huang cb2549386a
Only run "woocommerce_admin_shared_settings" filter on admin requests (#51161)
* Only load settings if it's admin

* Add changelog
2024-09-06 11:44:01 +08:00
Chi-Hsuan Huang 0ef7d95aff
Hide site visibility badge when "Launch Your Store" feature is disabled (#51159)
* Fix: put site visibility badge behind the launch your store feature flag

* Add changelog
2024-09-06 10:39:55 +08:00
George Jipa a7b957dbce
Fix `Customers\DataStore::anonymize_customer` use of WC_Order instance as int (#38201) 2024-09-05 21:56:48 +02:00
Adrian Moldovan 61d41adf79
[k6 tests] Fix broken perf tests - updated page titles (#51173) 2024-09-05 10:53:00 -07:00
Boro Sitnikovski d2fb60a5d1
Change label `Browse` to `Extensions` (#51140)
* Change label `Browse` to `Extensions`

* Changelog
2024-09-05 17:11:42 +02:00
Karol Manijak a7231863c0
Product Collection: Trigger `wc-blocks_viewed_product` JS event (#51156)
* Define the event

* Add action sending an event in PC store

* Add directives and context to Product Template li element

* Use on--click directive in ProductImage

* Use on--click directive in Product Title

* Use on--click directive in Product Button

* Add changelog

* Add E2E tests

* Update docs

* Update blocks reference and docs manifest

* Update m,anifest

* Fix mistake in docs

* Regenerate docs manifest

* Fix lint

* Extractb new tests to a separate file
2024-09-05 12:52:35 +02:00
Ivan Stojadinov 5a5b1f0478
[e2e tests] External sites - update /merchant tests, part 3 (#51158)
* Skip `Merchant can view a list of all customers, filter and download`

* Skip `can receive new order email`

* Expand Pressable run with new set of /merchant tests

* Move `should filter by All` into for loop with existing tests

* Wait between two actions with `networkidle`

* Skip two tests on Pressable

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

* Remove `networkidle` and use class `current` for the selected filter

* Fix ESLint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-05 11:19:23 +02:00
Ivan Stojadinov ccd5669c21
[e2e tests] External sites - update /merchant tests, part 2 (#51016)
* Handle error for api.delete( coupons/<id> )

* Choose any product that contains "product" in its name

* Expand Pressable test suite

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

* Add missing `throw` error

* Make product name more unique with `Date.now()`

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-05 10:56:48 +02:00
RJ dcbc4dc588
dev: update webpack build to dynamiclly fetch wp-admin-scripts (#51133)
* dev: update webpack build to dynamiclly fetch wp-admin-scripts

* Update README.md

* Update README.md
2024-09-05 00:14:32 +00:00
Veljko V. 18ab90badd
[e2e tests] External sites - update /shopper tests, part 2 (#51100)
* Update shopper tests, external config and add tags

* Update WPCOM config to include shopper tests
2024-09-04 22:09:04 +02:00
Ivan Stojadinov a5623099dd
[e2e] Move Pressable and WPCOM to release checks instead of daily checks (#51148)
* Move Pressable and WPCOM to release checks instead of daily checks

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-04 21:53:59 +02:00
piinthecloud 0ea76c2ffb
fixes and updates (#51144)
* fixes and updates

* add changelog

* update quotes

* fix broken whitespace

* Update plugins/woocommerce/changelog/update-contrib-docs-and-fixes

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-09-04 17:11:35 +00:00
github-actions[bot] 0f2fa403f1
Delete changelog files based on PR 51081 (#51107)
Delete changelog files for 51081

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-04 09:42:18 -07:00
github-actions[bot] 8f3e824596
Delete changelog files based on PR 51067 (#51084)
Delete changelog files for 51067

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-04 09:42:00 -07:00
github-actions[bot] 941f85bb77
Delete changelog files based on PR 50970 (#51093)
Delete changelog files for 50970

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-04 09:41:53 -07:00
Tom Cafferkey 6bf6f32854
CYS: Replace Nokul theme with Gizmo (#51113)
* Replace Nokul theme with Gizmo in the CYS experience since it was retired
2024-09-04 14:34:00 +01:00
Tom Cafferkey c074c5580b
PTK: Check if theres a scheduled action before logging warning. (#51143)
* Check if there is a scheduled action before logging warning
2024-09-04 13:23:20 +00:00
Roy Ho b618f81c6d
[Experimental] Product filters - ensure we can add multiple instances (#51051)
* Product filters ensure we can add multiple instances

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

* Add e2e tests to ensure multiple filters can be added

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-04 05:39:07 -07:00
Gabriel Manussakis f93a05c467
[Accessibility] Add endpoint title to the document title (#50900)
* Add endpoint title to the document title

* Add changelog file

* Ignore phpcs NonceVerification
2024-09-04 10:22:21 +01:00
Gabriel Manussakis f8677c45d1
[Accessibility] Provide screen readers with product sorting status message (#50573)
* Update result-count template to display orderby message

* Update result count live region if products are sorted

* Bump result-count template version

* Remove additional full stop.

* Fix docblock spacings

* Remove jQuery code from sort by live region logic

* Validate filter result type

---------

Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2024-09-04 08:31:08 +01:00
Chi-Hsuan Huang 19aac5f6fb
Delete changelog files based on PR 51013 and 51046 (#51128)
Delete change logs for 51013 and 51046
2024-09-04 10:39:24 +08:00
Ivan Stojadinov 0d65648ed7
[e2e] Skipping 11 tests for the Pressable website (#51123)
* Skipping 11 tests for the Pressable website

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
2024-09-03 21:53:23 +00:00
Adrian Moldovan 881fd73847
[e2e tests] Fix restricted coupons tests - wait for animation to finish (#51121) 2024-09-03 14:29:07 -07:00
github-actions[bot] 1e4b34cad8
Delete changelog files based on PR 51075 (#51118)
Delete changelog files for 51075

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-09-03 14:04:43 -07:00
Adrian Moldovan 03a69eca0b
[api tests] Isolate test context for fix flakiness in product crud api tests (#51116) 2024-09-03 13:58:17 -07:00
Christopher Allford caf9ec635e
Use PHP 7.4 for WooCommerce Blocks' `wp-env` Config (#51075)
This resolves a PHP 7.4 compatibility problem as well as updates the `wp-env` config for the Blocks tests to use 7.4 rather than the latest.
2024-09-03 09:54:22 -07:00
Adrian Moldovan c656fdc59b
[e2e tests] Clean up created test products in product edit tests (#51112) 2024-09-03 18:02:58 +02:00
Gabriel Manussakis 57ef5a884e
[Accessibility] Improve Checkout block page accessibility after removing heading level 1 (#50925)
* Add aria-label to checkout form landmark

* Remove aria-hidden from checkout form sub-titles

* Add aria-label to checkout form

* Add changelog file

* Remove aria-hidden from form-step snapshots

* Bump form-checkout template version
2024-09-03 15:42:28 +01:00
louwie17 82a00a56e5
Remove usage of team specific names within PHP unit tests (#51017)
* Change team names in tests to generic names

* Add changelog
2024-09-03 10:29:45 -03:00
Mike Jolley a7f29ce98e
Consolidate Store API and Core account creation handling (#50913)
* Consolidate Store API and Core account creation handling

* Changelog

* Add hook doc

* Update tests to not use global settings

* Ignore lints for other hooks in file
2024-09-03 13:42:51 +01:00
Mike Jolley bdf8f2b1a4
[Flaky Test] Wait for response across all requests, including on the checkout page (#51048)
* Wait for response across all requests, including on the checkout page

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

* Update Docblock

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-03 11:22:19 +01:00
Sam Seay 115d4f16c9
Remove the wc combobox component, it is no longer used (#50975) 2024-09-03 09:20:46 +00:00
Paul Sealock bf7e81de8e
[Legacy Settings] Enable Save button on pages with tables (#51102) 2024-09-03 18:39:38 +12:00
RJ 258ae0b03b
add: remote logger request uri sanitisation (JS) (#51046)
* add: remote logger request uri sanitisation

* md lint

* Update packages/js/remote-logging/README.md

Co-authored-by: Paul Sealock <psealock@gmail.com>

* pr feedback

---------

Co-authored-by: Paul Sealock <psealock@gmail.com>
2024-09-03 05:42:03 +00:00
Chi-Hsuan Huang c1f9a73af1
Fix badge number fails to match the number of unfinished tasks (#51063)
* Update core profiler layout options

* Add changelog

* Disable footer
2024-09-03 13:38:00 +08:00
Ilyas Foo 4680b3dcfb
Add a check to make themes API query safer (#51081)
* Add check to ensure themes API is safe

* Changelog

* Lint

* Add more checks for malformed data
2024-09-03 13:01:32 +08:00
Adrian Moldovan 0be7e3deb0
[e2e tests] Fix linked products flaky test (#51099) 2024-09-03 04:53:32 +00:00
Paul Sealock cfcf074886
[Settings] Update feature flag usage (#50977) 2024-09-03 12:45:48 +12:00
Sam Najian 8b35b0785c
Update woocommerce shipping promo banner [wc-shipping-188] (#50970)
* Make sure the WC Shipping slug is used for installation

* Make sure the check to show banner metabox work for HPOS as well

* Make ShippingLabelBannerDisplayRules::order_has_shippable_products work with HPOS as well

* Remove Jetpack plugin specific checks in ShippingLabelBannerDisplayRules

* Use correct variable names for dotcom connection

* Fix comments

* Remove depenency on WCS&T for showing WC Shipping promo banner

* Remove WC Tax and WC Shipping from incompatible plugins

* Vary action button label if WCS&T is already installed

* Inject config and render label purchase app after activation

* Open the purchase modal after adding it to DOM

* Render Shipment tracking metabox

* Use a different headline when WCS&T is already installed

* Fix UX when a none-compatible WCS&T is already active

* Fix CSS linting issues

* Fix Jslint issues

* Improve around usage of localized variables

* Fix and update JS tests

* Address phpcs issues

* Delete metaboxes of compatible WCS&T

* Remove redundant variable assignment

* Remove css and js of WCS&T if a compatible version is installed

* Fix failing legacy PHPUnit tests

* Only open the new label purchase modal if WCS&T is not active

* Remove redundant code around TOS acceptance for showing the banner

* Remove redundant test for Jetpack version checking

* Make sure target passed to MutationObserver.observe is available

* Add changelog file

* Add openWcsModal to component's prototype

* Add more js unit tests

* Address PHP notice

* Remove redundant variable assignments

* Rename wcsPluginSlug to more clear wcShippingPluginSlug

* Add a link to plugins page if incompatible WCS&T is already installed

* Remove unused function parameters

* Fix API resource path

* Handle a case where none compatible version of WCShipping is installed
2024-09-02 14:23:52 +02:00
Adrian Moldovan 74e96d689b
[e2e tests] Tag some e2e tests to help with test audit (#51044) 2024-09-02 12:09:56 +02:00
Albert Juhé Lluveras 0f7773dd47
Fix My Account block icon being too small when inserted via block hooks (#51047)
* Fix My Account block icon being too small when inserted via block hooks

* Add changelog file
2024-09-02 09:40:47 +02:00
Manish Menaria 2433664aa8
Product Collection - Show product picker in Editor when collection requires a product but it doesn't exist (#50164)
* Show product picker control in the editor when a product context is required but not provided

Enhanced the Product Collection block by introducing the `selectedReference` attribute and implementing a product picker control. This control appears in the editor when a product context is required but not provided in the current template/page/post.

1. **block.json**: Added `selectedReference` attribute of type `object`.
2. **constants.ts**: Included `selectedReference` in the `queryContextIncludes` array.
3. **EditorProductPicker.tsx**: Created a new component for selecting products within the editor.
4. **editor.scss**: Added styles for the new Editor Product Picker component.
5. **index.tsx**: Updated logic to determine the component to render, incorporating the new Editor Product Picker.
6. **types.ts**: Defined types for `selectedReference` and updated `ProductCollectionAttributes` interface.

This enhancement allows merchants to manually select a product for collections that require a product context, ensuring the block displays correctly even when the product context is not available in the current template/page/post.

- **Product Picker Control**: Utilizes the existing `ProductControl` component for selecting products. This component is displayed in the editor when a collection requires a product context but it doesn't exist in the current template/page/post.

* Update label on ProductControl component

* Implement dynamic UI state management for product collection block

- Introduced `ProductCollectionUIStatesInEditor` enum to define various UI states for the product collection block.
- Added `getProductCollectionUIStateInEditor` utility function to determine the appropriate UI state based on context.
- Updated `Edit` component to use `getProductCollectionUIStateInEditor` for dynamic state management.
- Refactored `ProductCollectionContent` to utilize the new Editor UI state management.

* Fix: Product picker isn't showing

* Fix: Preview label state isn't showing

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

* Refactor WooCommerceBlockLocation type

- Introduced specific interfaces for WooCommerceBlockLocation, including ProductLocation, ArchiveLocation, CartLocation, OrderLocation, and SiteLocation, to improve type safety and code clarity.
- Updated createLocationObject function to return a BaseLocation type.
- Refactored useSetPreviewState hook in product-collection utils:
  - Extracted termId from location.sourceData for cleaner and more readable code.
  - Replaced direct access of location.sourceData?.termId with termId variable.

* Remove fallback to 0 in case there may be a product with id 0

* Use optional chaining to avoid undefined errors

* Rename  to

* Change order of arguments in  function

* Pass boolean prop instead of making further recognition of the UI state in ProductCollectionContent

* Destructure  props in  component

* Rename  to

* Update names in  enum

* Rename  to  and change the structure to single number.

* Rename location to

* Add a method to choose a product in the product picker in Editor

* Add E2E tests

* Fix failing e2e tests by changing location to productCollectionLocation

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

* Don't allow selecting product variations

* Minor code refactoring

* Fix: Product control isn't showing products

**Before**
```tsx
const getRenderItemFunc = () => {
		if ( renderItem ) {
			return renderItem;
		} else if ( showVariations ) {
			return renderItemWithVariations;
		}
    return () => null;
	};
```

As you can see above, `return () => null;` is returning a function which is causing the issue. This will render nothing in the list. I changed this to `return undefined;`. This way, we will use default render item function.

* Translate text in ProductPicker component

* Improve E2E test

* Use createInterpolateElement to safely render strong HTML tag

* Fix E2E tests

* Fix E2E tests

* Product Collection: Inspector control to change selected product (#50590)

* Add Linked Product Control to Product Collection Block Inspector Controls

- Introduced a new `LinkedProductControl` component in the Product Collection block's Inspector Controls.
- This control allows users to link a specific product to the product collection via a dropdown with a search capability.
- Added corresponding styles to `editor.scss`.
- Integrated a `useGetProduct` hook in the `utils.tsx` to fetch and manage the state of the linked product data, including handling loading states and errors.
- Updated the Inspector Controls to include the new Linked Product Control component, enhancing the block's customization options for users.

* Add E2E tests

* Hide product picker when product context is available

* Improve logic to hide Linked Product Control

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

* Remove hasError state from useGetProduct hook

* Rename isShowLinkedProductControl to showLinkedProductControl

* Convert jsxProductButton to ProductButton component

* Refactor jsxPopoverContent to LinkedProductPopoverContent component

* Improve UI of Linked Product Control

* Address PR feedback

* Fix E2E tests

---------

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

* Rename isUsesReferencePreviewMode to isUsingReferencePreviewMode

* Change order of conditions in getProductCollectionUIStateInEditor

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-02 12:39:33 +05:30
RJ 36ede651db
add: sanitise query params in remote logging (PHP) (#51013) 2024-09-02 12:38:22 +08:00
Fernando Marichal 3def18623e
Fix variation selector display issues on the front end (#51023)
* Add woocommerce class to single-product

* Add changelog

* Fix chevron alignment
2024-08-30 17:47:20 -03:00
Seghir Nadir dec89a1311
Revert "Store API: Do not resume orders with `pending` status (#50531)" (#51067)
* Revert "Store API: Do not resume orders with `pending` status (#50531)"

This reverts commit 3170acd1b0.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-30 18:24:53 +01:00
louwie17 2890e16c86
Add product data views list to experimental product data views page (#51008)
* Add products data views list

* Add navigation on the left

* Update edit site package

* Fix styling

* Add changelog

* Add wp/icons package to syncpack exception list

* Delete some unused stuff and address types

* Add changelog

* Remove un needed css

* Remove dependency on edit-site package

* Fix custom status filters

* Make sure page size works with view config

* Remove use of canvasMode and navigation context as it is not needed

* Remove wordpress/dom from syncpack
2024-08-30 13:27:10 -03:00
Albert Juhé Lluveras e589fa87e1
CYS: Mark several classes as internal (#51069)
* CYS: Mark several classes as internal

* Add changelog file
2024-08-30 16:59:28 +02:00
Alba Rincón 502b4abe43
Fix increasing & decreasing sale price in product bulk edit (#50842)
* Set the regular price when the `Change to:` price is left empty

* Avoid fatal error when price is empty

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

* Avoid setting the price to 0 when there wasn't a previous sale

* Move the WC_Tests_Admin_Post_Types test to the appropiate folder so it's run

* Add e2e test

* Add e2e test

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

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

* Fix lint errors

* Fix lint errors

* Fix test

* Fix lint errors

* Revert mv

* Address increasing sale from 0

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-30 14:40:05 +02:00
Chi-Hsuan Huang 7971df1d28
Enhance WooCommerce version checking for remote logging reliability (#51009)
* Enhance WooCommerce version checking using get_plugin_updates()

* Update remote logger tool to toggle remote logging feature properly

* Add changelog
2024-08-30 20:25:52 +08:00
Tom Cafferkey 44b5f54d08
Add doc blocks to Products shortcode hooks (#51061)
* Add doc blocks to products shortcode woocommerce_before_shop_loop hooks

* Improved comments

* Add changelog
2024-08-30 11:24:34 +00:00
Vedanshu Jain 5999ea6716
Add filter to overwrite response of `wc_rest_should_load_namespace` (#50902)
* Add filter to allow overwriting `wc_rest_should_load_namespace`.

* Unit tests + changelog.

* Add doc block.

* Update version number.

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-08-30 16:42:28 +05:30
Alba Rincón 40cde50879
`Product SKU` improvements (#51033)
* Add new prefix and suffix attributes

* Add editable prefix & suffix rich text fields

* Remove the uppercase style from prefix and suffix

* Render the prefix and suffix in the front end

* Fix lint errors

* Handle old sku block without prefix and suffix

* Improve the editor styles

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

* Use wp_kses_post to filter and format the suffix and perfix

* Address extra space when empty and better escaping

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-30 10:23:28 +02:00
Gabriel Manussakis 0f1634d6da
[Accessibility] Trap focus inside the product gallery modal (#50730)
* Add i18n_open_product_gallery prop to wc_single_product_params

* Trap focus inside the product gallery modal

* Ensure the product gallery controls are always visible

* Add changelog file

* Add space before parameter

* Early return if there is no elements enough to trap focus

* Revert changes on the gallery trigger link

* Remove unnecessary white sopace

* Fix trap focus when the arrow buttons are hidden

* Remove usage of the Photoswipe destroy event
2024-08-30 10:14:22 +02:00
Bart Kalisz ff197207ef
Product Collection: Don't render when empty unless the no results block is present (#50404)
* Disable PC render when content empty unless no results block is present

* Introduce empty PC classname

* Add E2E test

* Add changelog entry

* Ensure the render is preserved as expected

* Do not render empty div

* Update tests

* Try a different logic

* Add hint to the docblock

* Remove obsolete e2e test

* Update render handler name to acknowledge context

* Fix tests failing due to recent v3 update

* Restore block interactivity

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-08-30 08:48:54 +02:00
Karol Manijak 062c4ed76a
Migrate Product Price to `block.json` (#50905)
* Migrate Product Price to block.json

* Add changelog

* Update block references

* Update block references and doc manifest

* Add shared config properties to Product Price block.json

* Update block references and docs manifest
2024-08-30 07:47:03 +02:00
Ivan Stojadinov 3a2a812e1d
[e2e tests] External sites - update /merchant tests, part 1 (#51014)
* Dismiss "Choose a pattern" if present

* Cover "New in store" for PRessable

* Handle error for `api.delete( coupons/<id> )`

* Check if `Select an option…` is available

* Expand Pressable suite

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

* Missed one spec, adding it now

* Handle "Choose a pattern" popup

* Use `closeChoosePatternModal` instead

* Remove comments

* Add missing `throw` error

* Revert to check `Browse store` link, after updating template on Pressable

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-29 21:05:30 +02:00
github-actions[bot] a5e9744ed5
Delete changelog files based on PR 51001 (#51039)
Delete changelog files for 51001

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-30 01:04:09 +07:00
Tung Du cd638721f9
[Experimental] Update folder structure for new product filter blocks (#51029) 2024-08-29 15:23:40 +00:00
github-actions[bot] 84e689d8a4
Delete changelog files based on PR 50923 (#51036)
Delete changelog files for 50923

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-29 19:10:24 +07:00
RJ 88806aae87
add: stripe tax to onboarding tax task (#50989) 2024-08-29 19:48:51 +08:00
Vedanshu Jain f359c20f84
Bust WC object cache on direct postmeta updates. (#50215) 2024-08-29 08:42:26 -03:00
Corey McKrill ad94888ce3
Ensure stock change notifications only fire when necessary (#51001)
* Ensure stock change notifs only fire when necessary

In #49583 we changed when the actions that trigger stock change
notifications fire, to decouple them from order creation. However, it
turns out what during product creation, the stock quantity update
routines still run even when no stock is being set and even when the
"manage stock" setting is set to false. Rather than try to untangle the
web of why this happens (and potentially break other things in the
process), this simply adds a check for the "manage stock" setting prior
to firing the notif actions, and bail early if the product does not have
managed stock.

It also adds a unit test, which is really more of an integration test,
to ensure this behavior.

Fixes #50958

* Remove irrelevant doc block info

In #49583 we added a second parameter to the
`woocommerce_variation_set_stock` and `woocommerce_product_set_stock`
action hooks, but it was later removed. However, we didn't remove the
corresponding doc block info.

* Add changelog file

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-08-29 17:11:38 +07:00
Alba Rincón 0a1af26785
Remove extra bottom padding in filters in the editor (#51012)
* Remove filter margins in the editor

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

* Remove small space after + sign

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-29 10:26:11 +02:00
github-actions[bot] 260409fcad
Delete changelog files based on PR 51021 (#51032)
Delete changelog files for 51021

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-29 09:24:40 +01:00
Adrian Moldovan 0a3c4dde65
[tests] Execute test env setup on host instead of wp-env container (reverts #50445) (#51021) 2024-08-29 11:17:31 +03:00
Albert Juhé Lluveras 84532c8823
CYS: Fix icon alignment in header patterns used by CYS (#50952)
* Align Cart and My Account icons to the right in the Essential Header pattern

* Align navigation icon to the right in the Minimal Header pattern

* Add changelog file
2024-08-29 08:56:27 +02:00
Albert Juhé Lluveras b7c4c68598
Conditionally initialize block template compatibility classes (#50785)
* Don't initialize the block template compatibility classes in classic themes

* Conditionally initialize the block template compatibility classes when the template is being rendered

* Add changelog file

* Remove unnecessary blank line

* Conditionally initialize the block template compatibility classes when the template is being rendered (II)
2024-08-29 08:54:28 +02:00
Manish Menaria 055cf09cc1
Change cursor style of preview button to default (#50612)
* Change cursor style of preview button to default

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

* Hover and active state shouldn't change background color of the preview button.

* Remove use of wp-block-woocommerce-product-collection class

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-29 11:16:59 +05:30
Karol Manijak 81ebd85f9e
Migrate Product Image to `block.json` (#50903)
* Migrate Product Image to block.json

* Remove unnecessary property

* Add changelog

* Update block references

* Remove duplicated attributes

* Update block references and doc manifest
2024-08-28 19:56:27 +02:00
Lukas Kurzmann ccc5042ce9
fixes not allowed size parameter for any input types, which do not al… (#50438)
* fixes not allowed size parameter for any input types, which do not allow them

* add changelog

* Update plugins/woocommerce/templates/global/quantity-input.php

* Appease linter

---------

Co-authored-by: Lukas Kurzmann <lukas.kurzmann@sunlime.at>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-08-28 13:00:45 -03:00
Mike Jolley 0aae5fd859
[Flaky Test] Wait for cart response after applying coupons (#50996)
* Wait for cart response after applying coupons

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

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

* trigger CI

* Delete plugins/woocommerce/changelog/50995-fix-flaky—cart—oupon-test-50928

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-28 16:55:18 +01:00
Karol Manijak d9a47a15a9
Migrate On Sale Badge to `block.json` (#50908)
* Migrate On Sale Badge to block.json

* Add changelog

* Fix types

* Update block references

* Update block references and doc manifest
2024-08-28 16:26:21 +02:00
Gabriel Manussakis 91b6e972e3
[Accessibility] Fix misspelling in plugins/woocommerce-blocks/docs (#48562)
* Fix "overriden" typo

* Fix "prequisites" typo

* Fix "overriden" typo

* Fix "recieve" typo

* Fix "differnt" typo

* Fix "revew" typo

* Fix "resetted" typo

* Fix "overriden" typo

* Fix "overriden" typo

* Fix "Appearence" typo

* Fix "Producto" typo

* Fix "tha" and "modifed" typos

* Fix "Boundry" typo

* Fix "boths" typo

* Fix "visibile" typo

* Fix "overriden" typo

* Fix "Apperance" typo

* Fix "returing" typo

* Fix "extration" typo

* Fix "brough" typo

* Fix "teh" typo

* Fix "fileds" typo

* Fix "arry" typo

* Add changelog file

* Revert change of "Producto" word

* Revert change of "Producto" word
2024-08-28 10:00:01 -04:00
Ivan Stojadinov 98aebdfcc7
[e2e tests] External sites - update /customize-store tests (#51004)
* Skip - number of introductory patterns not same on Pressable

* Skip - "Want more patterns?" is always present, skipping for now

* Skip -  it activates theme through CLI, don't work for Pressable

* Include /customize-store folder for Pressable execution

* Update month formatting

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-08-28 13:03:33 +02:00
Alex Florisca 9f79715d06
Small updates to the express checkout area (#50644) 2024-08-28 11:16:55 +01:00
Alba Rincón 1d21197f77
Hide reviews in the frontend when they are disabled at store or product level (#50979)
* Not show reviews in the frontend when they are disabled at store or product level

* Add tests for single product template

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

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

* Fix typo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-28 10:01:55 +02:00
Corey McKrill eb868090b1
PluginUtil: Add method to get active valid plugins (2nd attempt) (#50974)
* Restore changes from 48709

* Update the PluginUtil method and related unit test

* Update API endpoint, fix schemas

* Improve unit tests for API controllers
2024-08-28 08:44:17 +02:00
Chi-Hsuan Huang 4dbc8aa74b
Refactor WooCommercePayments task to use woo payment gateway from`WC()->payment_gateways->payment_gateways()` (#50953)
* Fake woopayments gateway is_account_partially_onboarded return false

* Refactor WooCommercePayments class to use get_woo_payments_gateway() function

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

* Remove changelog

* Add unit tests

* Update changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-28 10:44:28 +08:00
Tomek Wytrębowicz deb76cbada
Log deprecation warnings for Query class (#50969)
Log deprecation warnings for analytic reports `Automattic\WooCommerce\Admin\API\Reports\Query` class usage.

Co-authored-by: github-actions <github-actions@github.com>
2024-08-28 01:45:04 +02:00
Jorge A. Torres bd9716a33e
Remove changelog files from 9.3 from the `changelog/` (#50998)
Remove changelog files from 9.3 from the changelog/ directory
2024-08-27 16:41:35 -03:00
Fernando Marichal 9ed5a7923b
Convert with-reviews to TS (#50890)
* Convert with-reviews to ts

* Add changelog

* Remove bind
2024-08-27 16:29:44 -03:00
Ivan Stojadinov 013cef959e
[e2e tests] External sites - update admin-* folders (#50994)
* Skip `Introduction can be dismissed`

* This part is already covered in `Introduction can be dismissed`

* Skip Analytics-related tests since there are already some numbers on Pressable website

* Include admin related tests into default-pressable test suite

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-08-27 18:44:56 +02:00
Ivan Stojadinov dd79e4bf97
[e2e tests] External sites - update products/add-variable-product folder (#50942)
* Include add-variable-product/**/*.spec.js for Pressable env

* Use unique identifier for the Update button

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

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

* Remove @local tag

* Use getBy* instead of locator

* Use `locator( '#publishing-action' )`

* Fix lint issues

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-27 18:01:41 +02:00
Albert Juhé Lluveras e13febddac
CYS: Fix bottom margin of last patterns (#50991)
* CYS: Fix bottom margin of last patterns

* Add changelog file
2024-08-27 17:25:01 +02:00
Gabriel Manussakis 2ebbe68555
[Accessibility] Fix typos in inline documentation in woocommerce client, includes, and lib folders (#50739)
* Fix typo in inline doc in woocommerce client, includes, and lib folders

* Fix typo in comment

* Uppercase the Brazilian word

---------

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-08-27 16:23:04 +02:00
Ivan Stojadinov 1364adb690
[e2e tests] External sites - update products/block-editor folder (#50960)
* Include products/block-editor into default-pressable set of tests

* Wait for `Block: Product attributes` before proceeding

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

* Put comment on why to wait for the element

* Fix issue caught by Lint - @woocommerce/plugin-woocommerce

* Fix linting error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-27 15:56:14 +02:00
Maikel Perez e5c6477a4e
Blocks E2E: Move register product collection tester e2e tests from product collection file to its own file (#50852)
* Move register product collection tester e2e tests from product collection file to its own file

* Add changelog file

* Remove the unstable allTextContents usage

* Remove page.waitForTimeout because it doesn't validate that the button is hidden after exactly 1 second

* Remove page.waitForTimeout from 'Should display properly in Product Catalog template' e2e test

* Let's use one parent describe per file for good practice

* Keeping the structure flat
2024-08-27 09:37:45 -04:00
Albert Juhé Lluveras 1e650d06a9
Add 'Show tab title' attribute to the Product Details block (#50884)
* Add 'Show tab title' attribute to the Product Details block

* Add tests

* Add changelog file

* Linting

* Use editor.selectBlocks() instead of block.click()
2024-08-27 15:10:49 +02:00
louwie17 f2941d76e5
Add initial product data views screen (#50981)
* Add product data views feature flag

* Add basic products app file

* Add lazy render for product app

* Only render if GB is enabled

* Add translation

* Add changelogs

* Address lint issues

* Address final lint error
2024-08-27 09:49:04 -03:00
Thomas Roberts cf042dfb0a
Update WC Blocks hooks docs to point to new WC monorepo location (#50766) 2024-08-27 13:43:41 +01:00
Ivan Stojadinov 3c12dd8abb
[e2e tests] External sites - update activate-and-setup tests (#50927)
* Disable woocommerce_calc_taxes before tests start

* TEMP: Comment on expect `#setting-error-settings_updated`

* Include activate-and-setup folder into test runs for external envs

* Update core-profiler.spec.js so it's passing on Pressable and WPCOM

* Check only active plugins

* "Total sales" is missing on one of the external sites. Trying without it.

* Remove comments

* Revert to use `#submit` locator

* Revert "#setting-error-settings_updated"

* Revert "I’m just starting my business" string - check `'` sign on CI

* Revert all strings that initially contained `'` sign

* Revert "Revert "#setting-error-settings_updated""

This reverts commit ae6b72b5c4.

* Revert "Revert "I’m just starting my business" string - check `'` sign on CI"

This reverts commit e852707e06.

* Revert "Revert all strings that initially contained `'` sign"

This reverts commit f978595303.

* Reload page and check settings state instead of verifying `#setting-error-settings_updated`

* Ensure the store is not in "Coming soon" mode before basic.spec.js

* Check if store is in "Comin soon" mode - `hasText` instead of `name`

* Remove `grepInvert: /@local/`

* WPCOM - run only `basic.spec.js`

* WPCOM - run only `basic.spec.js`

* Revert default-wpcpom/playwright.config.js

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

* Introduce @skip-on-default-pressable and skip `Can connect to WooCommerce.com`

* Revert "Introduce @skip-on-default-pressable and skip `Can connect to WooCommerce.com`"

This reverts commit e38abebdd2.

* Re-enable "Go to WC Home and make sure the total sales is visible"

* Introduce @skip-on-default-pressable and skip `core-profiler.spec.js`

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-27 14:07:18 +02:00
Chi-Hsuan Huang 47ff627048
Fix site visibility badge style (#50976)
* Fix site visibility badge style

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-27 16:59:01 +08:00
Karol Manijak 5a80d5e1da
Update Block Reference and make it public doc (#50906)
* Update Block References doc

* Move the Block References to public Docs

* Change the place Block Reference is generated to

* Add changelog

* Update docs manifest file

* Update manifest
2024-08-27 09:04:15 +02:00
Chi-Hsuan Huang c63bb88e0e
Add react-powered main payments settings screen (#50825)
* Fix payment store selector type

* Add changelog

* Add react-powered payment settings main screen

* Add changelog

* Update style

* Revert changes

* Fix enable payment gateway error

* Fix wcpay install busy state

* Check if Nonce exist or not

* Fix extra payment methods

* Fix untranslated texts

* Fix lint
2024-08-27 14:30:01 +08:00
Roy Ho cc07a5f902
[Experimental] Price filter: fix range slider update (#50935)
* Price filter: fix range slider update

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

* Fix linting error

* Remove unneeded state setter

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/price-filter/frontend.ts

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

* Fix linting error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-08-26 19:57:01 -07:00
Naman Malhotra 4142afbc05
Update stable tag to 9.2.3 (#50965)
woorelease: Update stable tag to 9.2.3
2024-08-27 01:36:29 +07:00
Corey McKrill 70faf5bba2
Checkout: prevent error from get_value method when WC has not been properly initialized (#50692)
* Ensure WC's customer and cart props are initialized

If the customer or cart property of the main WooCommerce class is
accessed before the `woocommerce_init` action has fired, those
properties will be `null` instead of containing their respective
classes, which can cause a fatal error if you then try to access a
method on one of the classes. This makes sure the props will always
return a class.

Fixes #50245

* Revert "Ensure WC's customer and cart props are initialized"

This approach unexpectedly breaks a lot of things...

This reverts commit 310fd2c118.

* Alternate solution

The attempt to fix the problem wholistically ended up causing a lot of
things to break, so this is the band-aid approach instead.

* Add changelog file

* Remove unnecessary assignment to global POST var

This was polluting the results of the new test, causing it to fail.
2024-08-26 08:17:36 -07:00
Chi-Hsuan Huang 30ae60b273
Fix flaky remote logging PHP unit test (#50950)
* Fix flaky remote logging test_remote_logging_allowed() test

* Fix Undefined variable $enabled

* Add changelog
2024-08-26 20:57:03 +08:00
Ilyas Foo 99c1980b94
Show payments recommendation on settings payment main page (#50947)
* Show payments recommendation when main settings element is found

* Changelog

* Revert to old logic instead
2024-08-26 20:18:48 +08:00
Albert Juhé Lluveras 08f724b8d8
Improve the tabs focus style in the Product Details block with Minimal style variation (#50880)
* Improve the tabs focus style in the Product Details block with Minimal style variation

* Add changelog file

* Remove direct child selector
2024-08-26 13:18:28 +02:00
Ilyas Foo b4322595c5
Hide payments recommendation when no extensions are available (#50949)
* Hide payment recommendations when no extensions are available

* Changelog
2024-08-26 16:53:05 +08:00
Alba Rincón 9e40710482
CYS - Remove usage of `prepare_item_for_response` function in `Images` endpoint (#50923)
* Remove usage of `prepare_item_for_response` function

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-26 09:58:54 +02:00
Albert Juhé Lluveras e6b1cac49c
Update compatibility layer logic so it detects blocks inside patterns (#50595)
* Detect Legacy Template block when it's inside a pattern

* Detect Single Product blocks when they are inside a pattern

* Typo

* Remove empty error messages

* Fix wrong variable passed to parse_blocks()

* Remove unnecessary parameters

* Add tests to check if the Single Product template contents are updated when the Legacy Template is in the content

* Add changelog file

* Linting

* Typo

* Make sure the correct template is used when deciding whether to disable the compatibility layer or not

* Simplify code

* Remove duplicate content in tests

* Simplify single product slug logic

* Add an extra test to make sure Single Product template logic doesn't leak into other templates

* Linting

---------

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2024-08-26 09:46:32 +02:00
Tomek Wytrębowicz 53be5776f4
Remove the usage of `<ReportSummary isRequesting>` as it has no effect (#50751)
The support for such property was removed in woocommerce/woocommerce-admin#4858 ~4 years ago.

Co-authored-by: github-actions <github-actions@github.com>
2024-08-25 19:56:59 +02:00
Gabriel Manussakis 50e7a85821
[Accessibility] Remove title attribute from images in product gallery (#50886)
* Remove title attribute from images in product gallery

* Remove wp-post-image class from image selector

* Scope the image locator to the link

* Add changelog file

* Move image params filter out of wp_get_attachment_image call

* Add docblock to the woocommerce_gallery_image_html_attachment_image_params filter

* Remove unnecessary empty space
2024-08-23 12:37:45 -07:00
Mike Jolley 6c4a26770d
Order confirmation: Update mobile order summary styling so items appear side by side (#50722)
* Update order confirmation wording

* Style order details inline

* Changelog

* Update test due to change of text
2024-08-23 19:22:59 +01:00
Gabriel Manussakis d773bb483a
[Accessibility] Focus coupon input if it has an error (#48738)
* Focus cupon input if it has errors

* Add changelog file

* Add styles to coupon field with error on cart page

* Make coupon errors accessible on the cart page

* Add styles to coupon field with error on checkout page

* Rename coupon variables on cart

* Focus coupon field with error before updating live region on cart page

* Focus coupon field with error before updating live region on checkout page

* Remove incorrect early return

* Update coupon error notice test

* Improve coupon error message semantics

* Fix coupon errors for block based themes

* Update tests to not look for coupon errors on the notice block

* Rename coupon-error-message to coupon-error-notice

* Fix notice if coupon doesn't exist on tests

* FIx invalid coupon notice on classic theme test

* Update test for coupon inline notice

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Don't clear coupon input if code doesn't exist

* Create coupon error notice mixin

* Update coupon error notice styles

* Coupon error notice T19 compatibility

* Coupon error notice T17 compatibility

* Coupon error notice TT1 compatibility

* Coupon error notice TT compatibility

* Coupon error notice TT2 compatibility

* Coupon error notice TT3 compatibility

* Add spaces around paramenters

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Add spaces around paramenters

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Replace $red SCSS variable with a CSS one

* Keep input with the invalid coupon code after notice appears

* Fix typo in comment

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Fix typo in comment

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Break notice message into two lines

* Break if statement into two lines

---------

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-08-23 19:22:28 +01:00
Caleb Mazalevskis b4fd419f74
Fix typos. (#50047) 2024-08-23 18:26:09 +01:00
Seghir Nadir e66ccf698c
Run Checkout block coupon filter on empty array (#50876)
* Run Checkout block coupon filter on empty array

* fix conditional

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

* remove useless eslint skip

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-23 15:34:57 +00:00
github-actions[bot] db8890bbb0
Delete changelog files based on PR 50892 (#50912)
Delete changelog files for 50892

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-23 10:57:26 -03:00
Maikel Perez c09e45a391
Blocks E2E: Move collections e2e tests from product collection file to its own file (#50853)
* Move collections e2e tests from product collection file to its own file

* Add changelog file
2024-08-23 09:26:38 -04:00
Karol Manijak 2f68f9265b
Fix most of lint warnings (#50869)
* Fix number of lint warnings

* Add changelog

* Improve mocking value

* Fix exports

* Fix mock

* Bring back the empty array hook dependency
2024-08-23 14:30:14 +02:00
Alba Rincón 257762b564
Fix restoring product prices on bulk edit (#50836)
* Set the regular price when the `Change to:` price is left empty

* Avoid fatal error when price is empty

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

* Add e2e test

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-23 13:28:11 +02:00
Alba Rincón 091141218e
CYS - Move the `private/patterns` endpoint to woocommerce admin API (#50400)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* CYS - Move the ai/store-info endpoint to woocommerce admin API

* Update endpoint

* CYS - Move the ai/images endpoint to woocommerce admin API

* CYS - Move the `ai/patterns` endpoint to woocommerce admin API

* CYS - Move the `ai/product` endpoint to woocommerce admin API

* CYS - Move the `ai/products` endpoint to woocommerce admin API

* CYS - Move the `private/patterns` endpoint to woocommerce admin API

* Remove unnecessary variable

* Replace endpoint

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

* Fix lint errors

* Fix some feedback

* Refactor route to return an error not an exception and add tests

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-23 13:27:57 +02:00
Seghir Nadir eef4749d97
Ensure translation is loaded for new shared file in Checkout Block (#50892)
* Ensure translation is loaded for new shared file

* add other files

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-23 12:37:33 +02:00
Mike Jolley 42cdc0e978
Block Checkout: Respect default saved payment method when using tokens (#50481)
* activeSavedToken state is unused

* Select is_default saved token by default

* changelog

* Unused objectHasProp
2024-08-23 12:03:11 +02:00
Jorge A. Torres ae6c278e53
Cherry-pick PR#50881 into trunk (#50897)
* Revert "PluginUtil: Add method to get active valid plugins (#48709)"

This reverts commit 4d68cd486e.

* Reintroduce get_all_active_valid_plugins public function after revert (#50885)

Retroduce get_all_active_valid_plugins public function after revert

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-08-22 20:06:49 -03:00
Jorge A. Torres 06f441fde6
Cherry-pick PR#50854 into trunk (#50896)
* Revert "Drop Select2 in Backwards compatable manner (#48731)"

This reverts commit 8f98a2a057.

* Fix linting issue

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-08-22 20:05:55 -03:00
Jorge A. Torres ff0a2c7ced
Bump stable tag after 9.2.2 (#50895)
Update stable tag
2024-08-22 18:52:16 -03:00
Maikel Perez a779788a93
Blocks E2E: Move the inspector controls e2e tests from product collection file to its own file (#50849)
* Move the inspector controls e2e tests from product collection file to its own file

* Add changelog file
2024-08-22 10:55:20 -04:00
Roy Ho 320c165cb8
Add additional size units to product image element (#50770)
* Add additional size units to product image element

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-22 06:32:03 -07:00
github-actions[bot] 7ba0fb4fde
Prep trunk for 9.4 cycle (#50859)
Prep trunk for 9.4 cycle with version bump to 9.4.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-22 09:47:25 -03:00
piinthecloud 1bf6b6e44a
fix lint rule (#50843)
* fix lint rule

* add manifest

* add changelog
2024-08-22 14:25:57 +02:00
Albert Juhé Lluveras 2c0d9e0622
Store API: Add test coverage for Product Reviews endpoint (#50639)
* Store API: Add test coverage for Product Reviews endpoint

* Add changelog file

* Use assertSame() instead of assertEquals()

* Linting

* Fix category_id param test
2024-08-22 13:47:41 +02:00
Praveen 2853488410
Conditionally set new order email sent meta field (#50858)
* Add conditional logic to set email sent metafield

* Add changelog file for fix being submitted
2024-08-22 13:29:34 +05:30
Alba Rincón ae6f7837b2
CYS - Move the `ai/products` endpoint to woocommerce admin API (#50396)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* CYS - Move the ai/store-info endpoint to woocommerce admin API

* Update endpoint

* CYS - Move the ai/images endpoint to woocommerce admin API

* CYS - Move the `ai/patterns` endpoint to woocommerce admin API

* CYS - Move the `ai/product` endpoint to woocommerce admin API

* CYS - Move the `ai/products` endpoint to woocommerce admin API

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

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

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

* Fix merge issues

* Add strict types

* Start extending from AIEndpoint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-22 09:47:03 +02:00
Chi-Hsuan Huang 0a60c3c5ec
Add e2e tests to confirm that the store is in coming soon mode after completing the core profiler (#50784)
* Update core profiler setup e2e to handle coming soon mode

This adds a new test to confirm that the store is in coming soon mode after completing the core profiler. Additionally, it adds a new test to confirm that the store is in coming soon mode after skipping the core profiler.

These changes are necessary to ensure that the core profiler setup works correctly when the store is in coming soon mode.

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

* Include coming soon test case in core profiler steps

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-22 11:34:23 +08:00
Chi-Hsuan Huang b04f535a54
[Beta tester] Add fake WooPayments completion tool (#50699)
* Add woocommerce beta tester fake wcpay tool

* Add changelog
2024-08-22 10:27:35 +08:00
Ilyas Foo 8b62cf87e1
Improve reset password check using or locator (#50823)
* Update to use or locator

* Changelog
2024-08-22 08:57:46 +08:00
Sam Seay 35cdc6dc20
Use syncpack to lock pnpm version till we can fix issues (#50828) 2024-08-22 12:34:42 +12:00
Lucas fa6ea00b3c
Use stricter text selector on test (#50848)
* Use stricter text selector

Removes text ambiguity to avoid errors like "Strict mode violation resolved to 2 elements". For instance, it might search for "Settings", and there might be a menu "Foo Settings" which would resolve to 2 elements. This changes the behavior to match the exact test, instead of a substring.

* Update page-loads.spec.js

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-21 13:25:27 -07:00
Tomek Wytrębowicz 63f96eb5a8
Mark props with defaults as not required (#50816) 2024-08-21 21:59:42 +02:00
Adrian Moldovan e1e628ccf0
[e2e tests] Fix flaky navigation to editor (#50841) 2024-08-21 22:18:20 +03:00
Tomek Wytrębowicz d31aae633a
Move `ReportError` to `@woocommerce/components` as `AnalyticsError` (#50108)
Co-authored-by: Eason <eason.su.tw@gmail.com>
2024-08-21 20:12:13 +02:00
Tomek Wytrębowicz 536807ca43
Fix optional param in PHPdoc for WC_Admin_Marketplace_Promotions (#50732)
Co-authored-by: github-actions <github-actions@github.com>
2024-08-21 20:11:16 +02:00
Jorge A. Torres b798b261b3
Update stable tag to 9.2.1 (#50850)
woorelease: Update stable tag to 9.2.1
2024-08-21 15:10:28 -03:00
Corey McKrill b430971093
Avoid fatal in `wc_get_chosen_shipping_method_ids` (#50774)
This ensures the WC() session object is initialized before attempting to
get chosen shipping methods. If it's not initialized,
`wc_get_chosen_shipping_method_ids` will return an empty array.

Fixes #50283
2024-08-21 10:28:54 -07:00
Tomek Wytrębowicz 0322426dce
Reduce duplicated code in Analytics classes (#49425)
- Add code docs to the Analytics classes and make get_order_statuses non-internal.
   Document analytics classes and some methods. Add simple examples of how to use it. Give a brief "why?" and "when?" answers. Add links between related classes.
- Replace `Automattic\WooCommerce\Admin\API\Reports\*\Query` classes with a single `GenericQuery` class.
- Reduce the amount of duplicated code in Analytics `DataStore`s.
- Reduce duplicated code in Analytics controllers
- Add `FilteredGetDataTrait`, `OrderAwareControllerTrait`, and `StatsDataStoreTrait` for extension developers to reuse while creating custom Analytics
- Add a `GenericQuery` to reduce duplicated code in Query classes.
   Also, to expose it to community extensions for reuse.
- Use `GenericQuery` instead of duplicated `Query` classes
- Move caching code to shared `DataStore::get_data`
- Move intervals specific `initialize_queries` to shared Trait
- Move intervals checking logic to shared `StatsDataStoreTrait`
- Reuse `GenericController::prepare_item_for_response` for `Reports\Controller` subclasses
- Reuse `GenericController::get_collection_params` for `Reports\Controller` subclasses.
- Move `get_items` code to shared `GenericStatsController`
- Move shared paginable controllers `get_items` code to the generic class
- Move fields param to `GenericStatsController`
- Separate `OrderAwareControllerTrait` from `ReportController`
   to allow specific Analytics Controllers to extend the `Generic(Stats)Controller` directly, without extending the `ReportController`, which is used to list reports.


It's meant not to change any behavior. However, due to unification, it did tweak a few things mostly from the developer perspective:
- Previously, only some controllers threw an error from `get_items` when the data was missing; some did not. Now controllers the following Controllers changed behavior to also for such an error:
	- Coupons
	- Customers
	- Downloads
	- Orders
	- Products
	- Taxes
- the error has one error code from all controllers:`woocommerce_rest_reports_invalid_response` (previously there were report-specific)
   - `woocommerce_rest_reports_categories_invalid_response` -> `woocommerce_rest_reports_invalid_response`
- In Orders Controller, the `$orders_data['order_number'], $orders_data['total_formatted']` are set in the `prepare_item_for_response` method, not in the `get_items`So `prepare_item_for_response` function is expected to be called with bare data from Query
- In Products Controller extended-info is now sanitized in the `prepare_item_for_response` method, not in the `get_items`
- ⚠️ (breaking) Previosly some Controlers' `prepare_item_for_response` function was getting and expecting first argument to be casted to `object`, while the rest of controllers used data as returned from the Store. This PR unifies this behavior  for
   -  `Coupons\Stats\Controller`
   -  `Taxes\Controller`
   -  `Taxes\Stats\Controller`
   So, if you extend those classes and override `prepare_item_for_response` in a way that expects `object`, you will get an error. (I have not found such cases in the `all-plugins` repo.)
   All `woocommerce_rest_prepare_report_*` filters remain intact and inconsistent for backward compatibility.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mik <mikkamp@users.noreply.github.com>
2024-08-21 19:23:51 +02:00
Adrian Duffell c738aeed17
Update site visibility badge height to 18px (#50792)
* Update badge height to 18px

* Add changelog
2024-08-22 00:23:40 +08:00
Adrian Moldovan cb9912bcf4
[e2e test] Fix strict mode violation in delete variation test (#50838) 2024-08-21 08:57:48 -07:00
piinthecloud 7dd2f11805
Docs/check payment method support (#50845)
* Fixed minor issues with recently added snippets docs

Fixed a few duplicate titles and encoding issues in the docs that were recently added via public resources.

* Create docs-check_payment_method_support

* update manifest

* fix linter errors

---------

Co-authored-by: Yaku <15178758+jacoswan@users.noreply.github.com>
2024-08-21 11:56:26 -04:00
Alba Rincón 796854770c
CYS - Move the `ai/product` endpoint to woocommerce admin API (#50393)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* CYS - Move the ai/store-info endpoint to woocommerce admin API

* Update endpoint

* CYS - Move the ai/images endpoint to woocommerce admin API

* CYS - Move the `ai/patterns` endpoint to woocommerce admin API

* CYS - Move the `ai/product` endpoint to woocommerce admin API

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

* Remove import

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

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

* Add strict types

* Extract AI_CONTENT_GENERATED constant

* Move instance creating to where it's used

* Add try/catch and fix the on Patterns

* Use the base AIEndpoint class

* Fix endpoint

* Update comment return type

* Fix comments

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-21 15:34:12 +02:00
Roy Ho 944d9233ed
Add/clear theme info cache (#50803)
* Add function to clear system status theme info cache to tool page

* Add clear cache tooltip to the template override section

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

* Remove extra td

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-21 06:21:14 -07:00
DAnn2012 5690850e47
Fix typo (class-wc-tests-customizing-product-catalog.php) (#50336)
* Update class-wc-tests-customizing-product-catalog.php

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-08-21 17:39:39 +05:30
Ilyas Foo 20a6327637
Add CSS outline for keyboard accessibility (#50794)
* Add CSS outline for keyboard accessibility

* Changelog
2024-08-21 18:47:33 +08:00
Adrian Duffell e45b59b71f
Update the link color in legal disclaimers on core profiler (#50830)
* Revert t&c link colors in core profiler

* Add changelog
2024-08-21 17:11:07 +08:00
Ilyas Foo 64dcafe29b
Vertically center product meta box elements (#50826)
* Vertically center product meta elements

* Changelog
2024-08-21 14:42:59 +08:00
Gabriel Manussakis b449ca840f
[Accessibility] Announce notice messages after page loads (#50061)
* Update makup of add to cart success message

* Update CSS to position the add to cart success message content

* Focus notice message after page loads

* Add changelog file

* Remove tabindex attribute from add-to-cart success message

* Update tests for the add-to-cart success message

* Remove white space on test

* Increase delay before focusing the error message

* Cobine delay with queue method

* Remove unnecessary woocommerce-notice-content class

* Swap view cart link order in notice

* Remove woocommerce-notice-content wrapper

* Refactor to vanilla JS code that focus on notice message

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-08-21 11:54:58 +05:30
Akeda Bagus 9ef1b72fc1
Set timeout to 2 seconds for helper product-usage-notice-rules endpoint request (#50821) 2024-08-21 11:47:40 +07:00
Moon dac8fa8eba
Coming soon mode - Match shop page when permalink structure is set to plain (#50567)
* Match shop page when permalink structure is set to plain

* Revert uninteded change

* Match post types

* Check for param

* Add test for post_type check

* Fix tests

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

* Use wp_parse_url

* Test returning false

* Lint fixes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-20 19:50:00 -07:00
Jorge A. Torres d07cb35247
Cherry pick PR#50805 into trunk (#50814) 2024-08-20 20:46:07 -03:00
Jorge A. Torres d2104e1079
Cherry pick PR#50804 into trunk (#50812) 2024-08-20 20:45:13 -03:00
Thilina Pituwala 28ce18e13a
SDK to control product feature usage (#50218)
* Methods for fetching and caching product feature restrictions.

* DTO for passing product feature rule set to the plugin.

* Main class for handling product feature restriction logic.

* Remove unconnected WCCOM site related restrictions.

* Start with minimalist rule

If `\WC_Product_Usage::get_rules_for_product( 27147 )` returns null it
means no rule set to apply for product with ID 27147. Otherwise, it
returns `\WC_Product_Usage_Rule_Set`.

* Remove unused constant

* Remove underscore prefix on the method name; it's discouraged by the linter

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Akeda Bagus <akeda.bagus@automattic.com>
2024-08-21 06:07:31 +07:00
Jorge A. Torres 7e6125ee76
Cherry pick PR#50801 into trunk (#50813) 2024-08-20 18:35:54 -03:00
Jonathan Lane 02596ba4b0
Fix flaky product variations test (#50807)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-08-20 13:35:21 -07:00
Gabriel Manussakis 7e08187671
[Accessibility] Make the matching variations alert a live region (#50132)
* Add aria label to the Clear variation options link

* Make the matching variations alert a live region

* Bump add-to-cart variable template version

* Add changelog file

* Add docblock comment to woocommerce_reset_variations_link filter

* Revert changes for Clear variations button

* Make unavailable product combination message a live region

* Improve no matching variation message for screen readers

* Align variables declaration

* Bump template version

* Add role alert to the parent of the no matching message

* Add empty alt text for pesudo-element content

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-20 18:57:30 +02:00
DAnn2012 d2e9e982ec
Fix typo (wc-template-functions.php) (#50147)
* Update wc-template-functions.php

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

* Update plugins/woocommerce/includes/wc-template-functions.php

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-08-20 23:29:42 +07:00
Fernando Marichal 771fd00e5d
Featured Product: Fix variable product Selection dropdown (#50633)
* Add hook to SearchListItem

* Add changelog

* Invert is-expanded chevron

* Fix expanded setting

* Fix e2e test

* Add hasChildren and isSelected as dependency
2024-08-20 12:42:35 -03:00
Miguel Pérez Pellicer a883856171
Render GTIN in Product structured data (#50087)
* Add GTIN in structured data

* Changelog

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

* Delete plugins/woocommerce/changelog/50087-tweak-add-gtin-ld-json

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

* Lint

* Delete plugins/woocommerce/changelog/50087-tweak-add-gtin-ld-json

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-20 18:57:23 +04:00
Gabriel Manussakis c9aa65a22f
[Accessibility] Fix focus order on checkout block page (#49649)
* Render total blocks before fields on checkout

* Reverse checkout total blocks position on desktop

* Add changelog file

* Add conditional styles to reverse checkout blocks order

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-20 15:42:38 +02:00
Fernando Marichal ce98e51430
[Filter Products by Price]: Update view when changing the min/max value (#50651)
* Use handlePriceChange method

* Fix E2E test

* Add changelog

* Remove onBlur

* Add select when clicked

* Fix comment

* Add functionality to experimental block

* Fix E2E test
2024-08-20 10:20:09 -03:00
Alba Rincón 4e76cb11be
CYS - Move the `ai/patterns` endpoint to woocommerce admin API (#50372)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* CYS - Move the ai/store-info endpoint to woocommerce admin API

* Update endpoint

* CYS - Move the ai/images endpoint to woocommerce admin API

* CYS - Move the `ai/patterns` endpoint to woocommerce admin API

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

* Fix duplicated entries

* Use AI endpoint base class

* Remove unnecessary change

* Add strict types

* Remove unnecessary return type

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-20 15:17:27 +02:00
DAnn2012 8387b0a842
Fix typo (1140.md) (#50160)
* Update 1140.md

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

* Update 1140.md

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-20 12:37:13 +01:00
piinthecloud 5098bb1169
create block theme folder (#50638)
* create block theme folder

* add changelog

* update titles
2024-08-20 13:19:47 +02:00
RJ 905fe2246f
fix: reduce core profiler sticky footer height (#50788)
* fix: reduce core profiler sticky footer height

* increased height to 120px
2024-08-20 18:48:49 +08:00
Seghir Nadir 2a406c7e8a
Update all blocks to V3 (#48720)
* Update all blocks to V3

* remove explicit version set in shared config blocks

* update styling for Cart/Checkout in iframe

* test: fix block e2e tests

* test: fix attribute filter e2e tests

* test: fix product collection e2e tests

* test: fix product on sale e2e test

* test: fix rating filter e2e tests

* test: fix review e2e tests

* test: fix stock e2e tests

* test: fix preview button test

* fix: product on sale wrapper

* test: fix insertBlockByShortcut in iframe

* test: fix core e2e tests

* chore: changelog

* test: typo

* test: update PC e2e tests

* add test to make sure iframe canvas is loaded

* fix syntax error

* Update plugins/woocommerce-blocks/tests/e2e/tests/basic.block_theme.spec.ts

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

---------

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-08-20 10:14:11 +00:00
RJ d7682504d9
fix: replaced apostrophes for WooCommerce Admin JS strings in Homescreen & Core Profiler (#50776) 2024-08-20 17:13:17 +08:00
Adrian Duffell 6a59fbc111
Add site visibility badge to admin menu (#50775)
* Add admin bar badge

* Remove previous badge

* Update e2e

* Add changelog

* Fix lint issues

* Hide embedded CSS when admin bar is not showing

* lint fix

* Fix copypasta

* Update doc comments

* Fix lys e2e tests

* Remove unused props

* Fix lysTourHidden check

* Update site visibility badge ID in tour and admin bar

* Add hover effects

* Update id in css

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-08-20 08:36:20 +00:00
Alba Rincón 071af63f32
CYS - Move the `ai/images` endpoint to woocommerce admin API (#50365)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* CYS - Move the ai/store-info endpoint to woocommerce admin API

* Update endpoint

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

* CYS - Move the ai/images endpoint to woocommerce admin API

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

* Use constant and normalize site title values

* Add base AI Endpoint class

* Fix lint error

* Use the endpoint base class

* Revert change

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

* Use ai endpoint class

* Add strict types

* Fix lint error

* Add strict type

* Fix lint and use ai endpoint base

* Fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-20 10:34:27 +02:00
Alba Rincón c06190d529
CYS - Move the `ai/store-info` endpoint to woocommerce admin API (#50363)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* CYS - Move the ai/store-info endpoint to woocommerce admin API

* Update endpoint

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

* Use constant and normalize site title values

* Add base AI Endpoint class

* Fix lint error

* Use the endpoint base class

* Revert change

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

* Use ai endpoint class

* Add strict types

* Fix lint error

* Add strict type

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-20 09:54:57 +02:00
Adrian Duffell ace3169c0a
Remove the "We're here to help" spotlight (#47812)
* Remove tooltip

* Fix lint issues

* lint

* Remove tests

* Add changelog

* Lint fix
2024-08-20 15:51:44 +08:00
Jonathan Lane d5c901e3b7
Update Playwright to 1.46.1 (#50772) 2024-08-20 10:40:46 +03:00
Alba Rincón 9b1d91c7d2
CYS - Move the `ai/business-description` endpoint to woocommerce admin API (#50359)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* CYS - Move the ai/business-description endpoint to woocommerce admin API

* Use constant and normalize site title values

* Add base AI Endpoint class

* Fix lint error

* Use the endpoint base class

* Revert change

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

* Add strict types

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-20 09:11:20 +02:00
RJ 6bac54ad82
Revert "Prevent initializing coming soon feature if it's already initialized" (#50783)
Revert "Prevent initializing coming soon feature if it's already initialized …"

This reverts commit bcf1a38a58.
2024-08-20 14:39:13 +08:00
Ilyas Foo ad1b233a9c
Update AdditionalPayments task to use default gateway suggestion (#50674)
* Add new default spec function

* Changelog

* Add a new method to get cached or default

* Add test

* Update comment

* Revert comment

* Update docblock

* Lint

* Typo

* Set specs to default when marketplace suggestion is disabled

* Update tests
2024-08-20 14:22:58 +08:00
RJ 34d40f9a63
dev: see which tests fail when coming soon is enabled (#50344)
* test: see which tests fail when coming soon is enabled

* changelog

* empty commit to trigger CI
2024-08-20 13:57:28 +08:00
Ilyas Foo c7b7805b7e
Site visibility settings add documentation link and copy changes (#50781)
* Add link to title, remove link from a description, minor copy changes

* Changelog

* Update link

* Update test and copies
2024-08-20 13:49:05 +08:00
Chi-Hsuan Huang deaca578cc
Migrate LYS user meta (#50664)
* Migrate lys meta

* Update lys meta logic

* Update user preferences types and logic

* Add changelog

* Revert changes

* Fix types

* Fix logic

* Fix lint
2024-08-20 13:06:57 +08:00
Akeda Bagus 403d78ae22
Fix wcadmin-product-usage-notice-modal react18 createroot (#50765) 2024-08-20 11:50:26 +07:00
Moon 6a9da36388
Track product and tax rates importer view triggered from WP importer/exporter (#50769)
* Track product and tax rates importer view triggered from WP importer screen

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

* Use $this for the callback

* Make sure id exist

* Do not track if we are in a specific import screen

* Ignore phpcs warning -- we are not using the value

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 21:29:46 -07:00
Chi-Hsuan Huang 855d94b42d
Improve `setup_tasks_remaining()` performance to make `menu_task_count` safer (#50655)
* feat: Update TaskLists.php to improve performance and fix bugs

The code changes in TaskLists.php optimize the performance by reducing unnecessary checks and improve the functionality by fixing bugs related to the "setup tasks remaining" feature.

* Update tests

* Add changelog

* Fix lint

* Update TaskLists.php to fix completed tasks array initialization
2024-08-20 03:46:55 +00:00
Ilyas Foo 6733c22f3f
Add site visibility settings confirmation modal (#50759)
* Add confirmation modal for site visibility when changing from live to coming soon mode

* Changelog

* Remove unnecessary space

* Update tests

* Lint
2024-08-20 11:17:17 +08:00
Daniel W. Robert 6a2aee397d
CYS: Update Fiver Logo Maker LP Link Per Request. (#50753)
* Update Fiver Logo Maker LP link per request.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 21:20:48 -04:00
Moon c3d0d4a87d
Rename woocommerce_is_store_page to woocommerce_is_extension_store_page (#50771)
* Rename woocommerce_is_store_page to woocommerce_is_extension_store_page

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 18:11:48 -07:00
RJ fd30c4460e
fix: core profiler sticky footer button variable vh breakpoints (#50727)
* fix: core profiler sticky footer button variable vh breakpoints

* lint

* lint
2024-08-20 07:37:32 +08:00
Caleb Mazalevskis 50900d9d4e
Fix markdown typos. (#50282)
* Fix markdown typos.

* Re-fix typos.

* Add changelogs (#issuecomment-2296573205).
2024-08-19 14:59:10 -03:00
Alex Florisca cda0f8a3f8
Revert "Add new buttonAttributes API to style express checkout buttons coherently (#47899) (#50763)
* Revert "Add new buttonAttributes API to style express checkout buttons coherently (#47899)"

This reverts commit 006fbc6714.

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

* Update changelog

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 18:54:58 +01:00
Matt Sherman 42e943dc0e
Decode HTML entities and strip HTML tags in product names for cart quantity change notifications (#50541)
* Decode cart item names
* Strip HTML tags from product name

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-19 12:07:11 -04:00
Seghir Nadir 6b36b42f47
Add email type to email field in Checkout block (#48611)
* add email type to email field in Checkout block

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

* fix changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 16:05:19 +00:00
github-actions[bot] 99d8b9bf42
Delete changelog files based on PR 50700 (#50712)
* Delete changelog files for 50700

* Remove related changelog file

---------

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-08-19 11:17:13 -03:00
Álvaro Thomas cd54a09c27
Add Tests to Product Reviews (#50060)
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-08-19 14:13:46 +00:00
Gabriel Manussakis d7783511ff
[WIP][Accessibility] Fix inline documentation typos in woocommerce-blocks (#50737)
* Fix inline documentation typos in woocommerce-blocks

* Add changelog file

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

* Remove original changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-08-19 13:57:38 +01:00
Mike Jolley 47386e18c2
Classic cart: Remove common query string variables which affect cart contents (#50725)
* Remove common query string variables which affect cart contents

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 13:45:13 +01:00
RJ 15e9dd6b25
fix: wcadmin react18 createroot wc addon tour (#48833)
alpha

alpha
2024-08-19 12:52:24 +01:00
Adrian Moldovan 85e7bb0a0c
[e2e tests] Ignore Playwright focused tests in CI (#50643) 2024-08-19 13:09:21 +02:00
Paul Sealock 17c6fb9b0f
[Beta Tester] Add tool to force wccom endpoint errors or timeout (#50654) 2024-08-19 20:35:59 +12:00
Dusty Reagan db9623395d
Fix sticky admin bar CSS positioning bug in WordPress.com mobile (#50709)
* Use slightly more specific CSS selector for wpadminbar

* Add changelog

* Move changelog
2024-08-16 14:12:54 -07:00
Adrian Duffell a4fe8a6417
Add visual changes to the blueprint slotfill (#50724) 2024-08-16 18:23:05 +00:00
github-actions[bot] 1bb9105cba
Delete changelog files based on PR 50685 (#50706)
* Delete changelog files for 50685

* Delete changelog files for 50702

---------

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-08-16 14:40:08 -03:00
Moon 454273d6d2
Blueprint - Add busy state on the import btn (#50716)
* Add busy state

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-08-16 09:59:14 -07:00
Miguel Pérez Pellicer bb532b7a6f
Prevent fatal error if NULL is provided in array_search under Jetpack Stats (#50696)
* Avoid potential fatal error if $fields is not an array

* Changelog

* Prevent fatals when $data['general'] is not an object.

* PHPCS
2024-08-16 13:53:01 +02:00
Mike Jolley 66a717840f
Logout confirmation notice missing due to global (#50720)
* Missing global $wp

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-16 12:18:23 +01:00
Mike Jolley 3170acd1b0
Store API: Do not resume orders with `pending` status (#50531)
* Do not resume pending orders

* changelog
2024-08-16 11:02:41 +01:00
Ames Plant 5f43827f7f
[Accessibility] Add scope attribute to the product attributes table (#49768)
* Add scope attribute to the product attrubutes table

* Update changelog

* Add changelog

* Bump version to 9.2.0

* Add a label to the table

* Update plugins/woocommerce/templates/single-product/product-attributes.php

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Revert "Update changelog"

This reverts commit 4c29c17f0a.

* Update product-attributes.php

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Update changelog to reflect aria-label

* Bump template version

---------

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-16 11:04:02 +02:00
Ilyas Foo a7b5527113
Update product data meta box checkboxes UI (#50619)
* Remove colon in product data meta box checkboxes

* Changelog

* Fix CSS for checkbox

* Update margin so the distance between checkbox and label is 8px, and distance between items are 32px

* Move checkbox to the left, added has-checkbox class, minor adjustments to margins

* Minor adjustment
2024-08-16 16:18:03 +08:00
RJ b239da65cd
fix: shipping region zone decode html entities (#50694)
* fix: shipping region zone decode html entities

* use wp/html-entities/decodeEntities instead
2024-08-16 09:42:08 +08:00
Corey McKrill 4ff92e0f1f
REST: Update product stock when removing line item from order (#50606)
* REST: Update product stock when removing line item from order

This ensures that the REST endpoint behaves the same as the UI when
updating an order to remove a line item.

Fixes #49651

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

* phpcs cleanup

* Add unit tests

* phpcs cleanup

* Update plugins/woocommerce/changelog/50606-fix-49651-rest-remove-line-item-stock

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

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

* Add void return type to new method

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-15 15:20:10 -07:00
Alexandre Lara 6185185589
[Experimental] Product Filters Redesign > Overlay Navigation: Add Block to the Product Filters Block (#50186)
* Add variation to Product Filters Overlay Navigation

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

* Move Product Filters Overlay Navigation to correct position

* Hide block when it is outside the Product Filters template part

* Display Navigation block in the frontend

* Show the Product Filters Overlay Navigation on the frontend

* Add logic to hide Product Filters Overlay Navigation block on the frontend

* Hide block on the Overlay template part

* Fix eslint errors

* Update the block variation title

* Remove the `isActive` property from the block variations

* Use Product Filters block context

* Replace enum with const

* Remove unnecessary `StyleAttributesUtils`

* Rename context key

* Move BlockOverlayAttribute to the constants.ts file

* fix BlockOverlayAttribute import

* Fix import error

* Improve code for the shouldHideBlock method

* Remove unnecessary attributes property

* Fix error in ProductFiltersOverlay block

* Prevent block from being hidden on Product Filters template part

* Fix inspector controls when block is hidden

* Remove unnecessary import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-15 14:50:45 -03:00
Ames Plant acaa5ad7a7
[Accessibility] Add aria-current to the current link in My Account side nav (#49800)
* Add aria-current to the current link in My Account side nav

* Update current page check for dashboard, orders, and payment methods

* Fix PHP linting errors

* Update function for getting current aria for account menu

* Bump template version

* Create a helper function to test current item in the account menu

* Fix liniting errors

---------

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
2024-08-15 17:08:23 +01:00
Mike Jolley cd4a10222a
Reset password form: Fix regression which prevents new logged in accounts from setting initial password (#50700)
* Update logic to allow new accounts to set their password

* Changelog

* phpcs ignores

* Doc block update

* Remove redirect if lost-password accessed by logged in user

* Remove restriction on lost password page
2024-08-15 16:43:00 +01:00
Chi-Hsuan Huang 73f45833b1
Enhance Remote Logging to Include `request_uri` (#50671)
Add request_uri prop to remote logging data
2024-08-15 22:14:53 +08:00
Nathan Silveira 1235f4d38a
Fix typo in wc_get_product_id_by_global_unique_id (#50702) 2024-08-15 10:14:33 -03:00
Chi-Hsuan Huang c07b7b8e9f
Update LYS frontend e2e tests to test with both classic and block themes (#50657)
* Update lys e2e tests to test with both classic and block themes

* Add changelog

* Minor tweak
2024-08-15 12:57:12 +00:00
Adrian Moldovan d7909ecb3c
[e2e tests] Add BuildKite reporter to Blocks e2e tests (#50642) 2024-08-15 13:48:44 +01:00
Nathan Silveira 70fc2d595e
Remove global_unique_id from interface and add warning in case it is not implemented (#50685) 2024-08-15 09:29:25 -03:00
Chi-Hsuan Huang bcf1a38a58
Prevent initializing coming soon feature if it's already initialized (#50668)
* Prevent initializing coming soon feature if store pages only

* Add changelog

* Improve check
2024-08-15 10:25:44 +00:00
Akeda Bagus 1806747254
Show expiring and expired notices to active and unconnected subscriptions (#50383) 2024-08-15 15:00:16 +07:00
github-actions[bot] de05966754
Delete changelog files based on PR 50679 (#50690)
Delete changelog files for 50679

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-14 17:41:28 +01:00
Alba Rincón 4252682583
Fix `Product meta` console error (#50680)
* Fix `Product meta` console error

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

* Not use Atomic class

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 16:53:20 +02:00
Luigi Teschio 67bc34e607
CYS: avoid to enqueue Jetpack scripts (#50679)
* CYS: avoid to enqueue jetpack scripts

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

* remove not necessary import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 14:49:47 +00:00
Mike Jolley 1d9592db87
Cart Shortcode: Fix cart rendering after AJAX updates by modifying cart page URL (#50524)
* Remove redirects in form handler if no referrer is passed

* Use current URL for cart URL if on the cart page

* Changelog

* Indents
2024-08-14 15:31:37 +01:00
Mike Jolley a932ceb59f
Fix extensionCartUpdates not surfacing errors to cart and checkout (#49762)
* Add context to type

* Clean up notifyerrors helpers

* Notify and clear top level cart errors

* changelog

* Make extensionCartUpdate surface the errors

* No automatic clearing of notice

* Handle generic errors only, add docs

* Rename param

* Fix linting in readme

* Update toc

* test coverage

* Unused import

* We're only dealing with arrays of errors so simplify logic
2024-08-14 15:24:44 +01:00
Gabriel Manussakis f3a1281cd0
[Accessibility] Improve hover style on product tabs (#50605)
* Make hover status style like active

* Add changelog file

* Update changelog message

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

---------

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2024-08-14 15:56:19 +02:00
Albert Juhé Lluveras 474eae1135
Make templates fallback methods template-agnostic (#46372)
* Make some methods agnostic of which fallback template is used

* Get rid of the template_is_eligible_for_fallback() util

* Get rid of the template_is_eligible_for_fallback() util (II)

* Add changelog

* Get rid of the template_is_eligible_for_fallback() util (III)

* Add back 'template_is_eligible_for_fallback' method

* Fix issue after rebase

* Remove some more instances of hard-coded templates from the template hierarchy code

* Update comments

* Remove unused template_is_eligible_for_fallback() function

* Add extra explanatory comment
2024-08-14 15:30:37 +02:00
Albert Juhé Lluveras 9f69c63a9e
Product Price block: prevent price amounts from breaking into multiple lines (#50660)
* Product Price block: prevent price amounts from breaking into multiple lines

* Add changelog file
2024-08-14 15:17:03 +02:00
Alba Rincón 3491c6b7dc
Fix `store-title` endpoint - Pass default value to `get_option` (#50673)
* Pass default value to get_option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 14:37:30 +02:00
Chi-Hsuan Huang 88e4a6f0e9
Tweak lost password e2e logic (#50666) 2024-08-14 19:31:18 +08:00
Alba Rincón a512668e96
Fix `AddToCartForm` translation on the `Single Product` block (#50628)
* Avoid registering block in the wrong context

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

* Fix Product meta translations

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

* Fix lint error

* Remove AddToCartForm from the list of blocks to not register in posts

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 12:10:16 +02:00
Alex Florisca 006fbc6714
Add new buttonAttributes API to style express checkout buttons coherently (#47899)
* Expose buttonAttributes to the express payment methods

* Add size and label attributes to the express checkout area

* Remove defaultHeight

* default button Label

* Remove the button label attribute

* Remove px from height

* Change large button height to 55px

* Load express checkout block with attributes

* Add toggle and borderRadius controls and remove getting border radius from the theme

* Remove extra border radius text

* Only pass buttonAttributes if toggled on

* Move express payment block attribute logic into a Provider

* Tidy up editor grid and parse attributes into context on frontend

* Add px to border-radius input

* Express payment methods not selectable

* Add a test

* lint fixes

* default button height is 48 not 4

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

* Update docs

* Add tests for express payment methods

* Center images within the express payment area in the editor

* Apply the buttonAttributes to the li container in the editor regardless of showButtonStyles

* Fix style issue

* fix linting

* fix lint again

* Update manifest

* Update docs manifest

* Resize images in editor

* lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 11:02:58 +01:00
Alba Rincón 9995b51a5a
Fix `Product Meta` translations (#50625)
* Avoid registering block in the wrong context

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

* Fix Product meta translations

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 11:29:03 +02:00
Karol Manijak f1be869ff4
Fix the PHP warning in which the null was passed to json_decode (#50661)
* Fix the PHP warning in which the null was passed to json_decode

* Add changelog
2024-08-14 11:13:37 +02:00
Alba Rincón 381c87da80
Fix translations - Avoid registering blocks in the wrong context (#50615)
* Avoid registering block in the wrong context

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 10:43:32 +02:00
Alba Rincón d04666e35c
Fix `Single product` translations on edit mode (#50599)
* Format json

* Get title and description from the registered block

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

* Add empty array dep

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 10:43:15 +02:00
Chi-Hsuan Huang 5c980cc629
Optimize large image files (#50517)
* Optimize large image files

* Add changelog

* Update logo-tiktok.png

* Update tiktok logo - 128x128 px
2024-08-14 12:29:03 +08:00
Chi-Hsuan Huang 6290e8e0f7
Add lost password e2e tests (#50611)
* Add lost password e2e tests

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

* Update lost password e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 04:28:16 +00:00
Chi-Hsuan Huang 175ebe2a5e
Update the LYS "Add payment methods" link to the payment settings page (#50609)
* Fix the "Add payment methods" link in LYS congrat screen redirects to a blank page

* Add changelog

* Fix link
2024-08-14 09:39:03 +08:00
Chi-Hsuan Huang 9fcd59d3d0
Update WooCommercePayments task `is_supported` method to use default suggestions (#50585)
* Update WooCommercePayments task is_supported to use default suggestions

* Add changelog
2024-08-14 09:38:50 +08:00
Chi-Hsuan Huang bb7dbf9e3c
Add `woocommerce_coming_soon` option for all sites (#50581)
* Add woocommerce_coming_soon option for all sites

* Set default option

* Add changelog

* Update `woocommerce_coming_soon` option to use `update_option` instead of `add_option`
2024-08-14 09:37:31 +08:00
Paul Sealock 75c18a6902
[Beta Tester] Add WCPay test order meta data (#50467) 2024-08-14 10:08:59 +12:00
github-actions[bot] ff4c3c37b1
Delete changelog files based on PR 50592 (#50603)
Delete changelog files for 50592

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-13 20:22:58 +01:00
github-actions[bot] ac7e295820
Delete changelog files based on PR 50608 (#50648)
Delete changelog files for 50608

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-13 20:08:59 +01:00
Marianne380 883f557dc4
[Fix] Clear product unique ID (`global_unique_id`) when duplicating products. (#50629)
* Generates unique product unique ID (`global_unique_id`) when duplicating products.

* Just clear the global unique id.

* Add changelog
2024-08-13 15:04:27 -03:00
github-actions[bot] 10c66ad031
Delete changelog files based on PR 50496 (#50646)
Delete changelog files for 50496

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-13 18:29:12 +01:00
Vedanshu Jain f0b637f9c4
Cache order year_months in options for performance. (#50066)
* Cache order year_months in options for performance.

* Modify to prevent unnecessary option changed.

Add unit tests.

* Add the strict type directive.

* Use exact check to use more cache instances.

* Add clean state test.

* Add namespace.

* Namespace fixes.
2024-08-13 21:32:30 +05:30
Fernando Marichal 5922b42577
Only count published products in productCount (#50503)
* Only count published products in productCount

* Add changelog

* Fix lint

* Fix lint
2024-08-13 12:28:55 -03:00
Adrian Moldovan 7a20d626d3
[e2e tests] Transform Classic Checkout: add an extra check of API response before checking the UI (#50627) 2024-08-13 17:53:07 +03:00
Bart Kalisz daa6a95b56
Metrics: Use utils provided by `@wordpress/e2e-test-utils-playwright` (#50626) 2024-08-13 15:26:47 +02:00
Adrian Moldovan f91bcf44c7
[e2e tests] Add an option to skip the env setup script when running tests (#50620)
Add the -x option to skip executing the env setup script
2024-08-13 16:03:10 +03:00
DAnn2012 3a363d232b
Fix typo (product-collection.block_theme.spec.ts) (#50154)
Co-authored-by: github-actions <github-actions@github.com>
2024-08-13 12:38:56 +01:00
Adrian Moldovan eaa13c0151
[e2e tests] Replace hardcoded default wp-env credentials (#50617) 2024-08-13 13:54:37 +03:00
Thomas Roberts 8707e71eb3
Add additional unit tests for Store API checkout flow (#50033)
* Add virtual product to fixtures

* Add test to check virtual products can be ordered

* Add test to check orders cannot be placed with invalid payment method

* Add test to ensure orders can't be placed with out of stock items

* Add test to ensure orders can't be placed with unowned coupons

* Add test to ensure orders can't be placed coupons exceeding usage limit

* Add test to ensure that orders can be placed with coupons.

* Add changelog

* Clean up coupon management

* use correct WC case

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-13 10:45:06 +00:00
Karol Manijak 8bdc78c777
Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166)
* Dispatch JS event about PC being rendered

* Revert format changes

* Write the callback

* Add functions descriptions

* Add changelog

* Remove empty line

* Add tests

* Rename test cases

* Replace waiting for page load with more reliable expect.poll

* Remove leftover step

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

* Fix typo in function name

* Add collection name to default Product Collection block

* Expect collection name in the event

* Expose the collection name through IAPI context

* Send the collection name with the event

* Trigger event also on page change

* Remove unused CUSTOM collection type

* Provide documentation

* Update TOC

* Update tests that verify the event payload

* Improve E2E tests further

* Don't add a Product Catalog collection type to default collection

* Avoid repeating the same piece of code by extracting some function on tag processor

* Rename function to better depict its purpose

* Move the documentation to the right place

* Remove the unused variable

* Add example to dom-events doc

* Update documentation

* Update docs manifest

* Attach default collection name

* Add the default collection context in PHP so it covers all the cases

* Prevent exposing product catalog collection name in event

* Update docs

* Update test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-08-13 12:29:04 +02:00
Adrian Moldovan 7802209887
[e2e tests] Update locators for Customers page in page-loads spec (#50559) 2024-08-13 12:04:41 +02:00
Bart Kalisz 03049e0d17
Fix Metrics job (#50482) 2024-08-13 11:31:39 +02:00
Bart Kalisz 418c8f029f
Product Collection: Remove automatic migration code (#50440)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-13 11:29:07 +02:00
Adrian Moldovan e82f1ea98f
[e2e tests] Add hpos disabled environment and tag tests (#50448) 2024-08-13 11:28:21 +02:00
Chi-Hsuan Huang 49e11aa25b
Update add product task bottom section UI (#50580)
* Update add product task bottom section UI

* Add changelog
2024-08-13 13:02:50 +08:00
Chi-Hsuan Huang 30e3e3cd6d
Fix navigation badge decreases when installing extension in "Grow your business task" (#50584)
* Fix update badge logic

* Add changelog

* Fix lint
2024-08-13 11:50:12 +08:00
Chi-Hsuan Huang 701a5cbb60
Update Continue button container on core profiler extension screen (#50582)
* Update core profiler continue button container

On desktop screens 900px and smaller, add a 140px tall container stuck to the bottom of the viewport
Add a transparent to solid white gradient to the container (top to bottom)
Vertically center align the continue button and dislaimer text inside the container

* Add docs

* Update style
2024-08-13 11:49:07 +08:00
Chi-Hsuan Huang af75166a07
Fix the spacing between the "Set up my store" button and TOS is too tight on small desktop screens (#50579)
Fix core profiler set up my store button and TOS are too close to each other
2024-08-13 11:48:05 +08:00
Chi-Hsuan Huang 770730272c
Clean up unused images in `./assets/image` folder (#50516)
* Clean up unused images

* Add changelog
2024-08-13 11:47:50 +08:00
Moon 9ff42c8b09
Exclude privacy page from the store pages -- it is a core page (#50608)
* Exclude privacy page from the store pages -- it is a core page

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

* Remove privacy page deletion in unit test

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-08-13 11:34:18 +08:00
Moon 0468bdbe82
blueprint - add php package and cli commands (#49763)
* Add blueprint package

* Add blueprint to composer

* Register blueprint cli commands

* Add feature flag

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

* Update packages/php/blueprint/src/Exporters/HasAlias.php

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

* Update packages/php/blueprint/src/Exporters/ExportInstallThemeSteps.php

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

* Update packages/php/blueprint/src/UseWPFunctions.php

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

* Set destination correctly

* Make sure the given path is within wp content dir

* Remove debug code

* Fix typo

* Fix typo

* Fix lint errors with README

* Move READMD.md from src to the root directory and add development.md

* Add run-unit-tests.sh

* Setup test env

* Create dirs recursively

* Remove debug code

* Update packages/php/blueprint/src/Util.php

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

* Update packages/php/blueprint/src/ZipExportedSchema.php

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

* Check for steps key

* Use if statement

* Add hook comment for wooblueprint_exporters and wooblueprint_importers

* Fix plugin activation condition

* Check for download_link -- it can be empty

* Check to make sure a file was written

* Plugin must be deactivated before attemping to delete it

* Lint fixes

* Lint fixes

* blueprint - add rest api (#49765)

* Add blueprint rest api endpoint

* Rename process to import

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Remove unavailable 2nd argument from get_param -- default values are already set from the rest api def.

* blueprint - add builder page  (#49774)

* Add blueprint builder page

* Change to the correct endpoint

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

* Note that the builder intro page is temporary

* Remove unused code

---------

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

* blueprint - add blueprint settings page (#49775)

* Add blueprint settings page

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

---------

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

* Fix broken test

* Lint fixes

---------

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

* Update unit test env

* Added composer scripts to setup and run tests
* Moved tests to Unit dir to make space for Integration tests later

* WIP Add tests

* Use full if statement

* Use the correct step names

* Use activate_plugin and wp_get_thmes from wp functions trait

* Skip inactive plugins

* Use plural for collections

* Add a comment for StepExporter

* Remove unused construct code

* Correct function return types

* Update packages/php/blueprint/src/Importers/ImportActivateTheme.php

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

* Use full if statement

* Make sure plugin is installed

* Use functions from trait

* Remove unused functions

* Pass $force_convert correctly

* Correctly assign $this->validator

* Fix lint issues

* Rename setOptions to setSiteOptions

* Do not use die() -- throw an exception instead

* Make sure slug is a valid WP plugin slug

* Remove hardcoded string with get_step_name()

* Fix lint issues

* Update json example files

* Removed woo-specific examples -- these should be placed in the core
* Updated the built-in steps to reflect the recent changes

* Update packages/php/blueprint/src/docs/json-examples/deletePlugin.json

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Rename to correct filename

* Set version number

* Use mime_content_type for checking mime type

* Catch all exceptions

* Only allow zip and json

* Remove unused function

* Remove unused functions

* Add PHPCS command and ruleset

* PHP lint fixes

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php

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

* Add back removed functions

* blueprint - Add woo blueprint exporters and importers (#50057)

* Add woo blueprint exporters and importers

* Comment fix

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Add a test for ImportSetWCTaxRates

* Lint fixes

* Lint fixes

* Fix setWCShipping schema and data format

* Add woocommerce_default_country option

* Lint fixes

* Fix typo -- it should be decode, not encode

* Fix incorrect argument order

* Fix typo

* Export and import shipping method settings

* Lint fixes

* Lint fixes

* Type functions -- base PR has changed

---------

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

* Require admin for import and export

* Use mime type from $_FILES -- mime_content_type can return incorrect mime type depending on the system configuration

* Enable export button when backend errors out

* Enable export button when backend errors out

* Allow WooCommerce export

* Change copy text

* Remove redundant check

* Fix lint issues

* Fix lint issues

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-12 16:33:05 -07:00
Paul Sealock cbfda08537
[Beta Tester] Fix build step (#50518)
* build project as well

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-13 11:17:33 +12:00
Paul Sealock 6fcc0f8490
[Remote Specs] Treat empty arrays as valid cached values (#50521) 2024-08-13 09:23:59 +12:00
Corey McKrill d569c419b2
wp-env: Update package dependency + add mysqlPort (#50568)
* wp-env: Update package dependency + add mysqlPort

Starting in v10.1.0, wp-env can take a `mysqlPort` property in both
`env.development` and `env.tests` objects, which allows you to specify
the database connection port. This port is otherwise randomly assigned
every time you start up the containers. This allows for having a more
consistent development environment.

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

* Further update to pnpm lock file
2024-08-12 12:56:49 -07:00
Maikel Perez 640a6ca439
CheckboxList and CheckboxControl: Label htmlFor and Input id should be unique (#50566)
* Extract the checkbox list option logic into its own component
This allows to generate a dynamic id per option so it never repeats in the entire document.

* Add changelog file

* Move CheckboxListOptionControl to its own file

* Add value to the checkbox control to be aligned with the native input type=checkbox element. And also use it to get the correct checkbox by value in unit tests

* Because checkboxes not longer have fixed ids, now we use their value to lookup for them instead

* Updating snapshots since the checkboxes ids are now autogenerated
2024-08-12 12:33:17 -04:00
Paulo Arromba ddbb24e021
Fixed the order of elements on the Order Confirmation screen (#50592)
* Fixed the order of elements on the Order Confirmation screen

* Added changelog

* Linting.

* Add wrapper around account notices

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-08-12 16:34:09 +01:00
Nathan Silveira f7595c6725
Add pattern validation for global_unique_id (#50501)
* Add validation for global_unique_id in classic editor

* Fix an issue with validations in the text block

* Replace everything that is not number or hyphen in the product API

* Add pattern validation in the product and variation templates

* Add changelogs

* Increment regex to also accept empty string

* Fix e2e test

* Update update-stricter-global-unique-id
2024-08-12 08:27:06 -03:00
Chi-Hsuan Huang 9bc69246ff
[Beta Tester] Flush cache after deleting option and resetting PHP rate limit (#50512)
* Flush cache after deleting option and resetting PHP rate limit

* Add changelog
2024-08-12 18:05:01 +08:00
Nathan Silveira 9297409c5a
Clear global_unique_id when restoring a product with an existing global_unique_id (#50496)
* Clear global_unique_id when restoring a product that doesn't have an unique id

* Check if product exists before calling methods
2024-08-10 07:16:07 -04:00
Naman Malhotra 10bc399c07
Fix failing tests for canonical extensions due to 49583 (#50519)
Revert the addition of a new parameter in the woocommerce_product_set_stock hook, which was causing unit tests to fail in some extensions.
2024-08-09 15:08:23 -07:00
Alex Jones cc9d558a31
Fix emptying cart issue for custom order statuses (#44515)
* fix: add filter for pre payment order statuses

* chore: resolve linting issue

* chore: remove comment

* chore: add filter comment block

* chore: resolve linting issue

* fix: replace pre payment status filter with clear cart boolean filter

* chore: resolve linting issue

* refactor: remove double negation in check

Co-authored-by: Leif Singer <github.2017@singer.sh>

* tweak changelog message

* rename changelog file

* tweak changelog format

* fix: rework wc_clear_cart_after_payment to clear the cart at the end

* fix: remove order as param for clear cart after payment filter

* Linting/whitespace.

* fix: add after payment flag to prevent calling filter unnecessarily

---------

Co-authored-by: Leif Singer <github.2017@singer.sh>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-09 12:18:21 -07:00
Naman Malhotra c8c8a6a56d
Fix: Allow verified parameter to be set by REST API request (#50525)
* Rest API  product review the verified parameter is not working

* added changelog

---------

Co-authored-by: 79mplus Admin <36501099+79mplus-admin@users.noreply.github.com>
2024-08-09 12:14:59 -07:00
github-actions[bot] 27cc2028f9
Delete changelog files based on PR 50507 (#50562)
Delete changelog files for 50507

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-09 11:05:59 -07:00
Moon c2390f4633
Remove jetpack-boost (#50378)
* Update Jetpack logic

* Removed use of jetpack-boost -- we no longer run the experiment
* Jetpack should be considered as selected if it is already installed

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

* removed jetpack check because it's already checked prior

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: rjchow <me@rjchow.com>
2024-08-09 10:58:52 -07:00
Adrian Moldovan 3eabb3eb6b
[testing workflows] Include more paths in changes lists (#50399) 2024-08-09 23:24:35 +07:00
RJ e770aef3fe
fix: wcadmin react18 createroot print shipping banner (#48831)
Co-authored-by: André Kallehauge <3846700+kallehauge@users.noreply.github.com>
2024-08-09 17:57:24 +02:00
Luigi Teschio 3425a2c017
Product Gallery: add defensive check (#50495)
* Product Gallery: add defensive check

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-09 17:52:32 +02:00
Luigi Teschio 1fbfa83fb4
CYS: Improve opt in flow (#50529)
* CYS: Improve opt in flow

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

* fix import

* fix imports and remove not used functions

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-09 17:44:10 +02:00
Mike Jolley 1160414b14
Checkout: Fix display of coupon removal notices (#50412)
* Replace receiveCartContents with thunk which handles errors

* Avoid notice dismissal when pushing changes

* Update coupon error messaging for store API requests

* Changelog

* Undo thunks import change

* Remove unused removeAllNotices
2024-08-09 16:28:18 +01:00
Brian Taylor 062b161525
Update docs links blocks documentation (#50239)
* Update "Learn More" docs link for incompatible extensions

* Update links to blocks documentation

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

* Remove Unnecessary changelog message

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

* Delete unneeded changelog file

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-09 16:27:04 +01:00
Tom Cafferkey 16ef869587
CYS: Revert Zoom Feature (#50535)
* Revert "CYS: E2E Tests for device and zoom toolbar (#50436)"

This reverts commit 94f6ec5ccc.

* Revert "CYS: Fix DeviceToolbar animation (#50411)"

This reverts commit f01e945204.

* Revert "CYS: Add Zoomed Out feature (#50070)"

This reverts commit a579e866b7.
2024-08-09 16:15:06 +01:00
Adrian Moldovan 8eaa980794
[e2e tests] Update documentation to clarify the usage of dotenv files (#50530) 2024-08-09 16:19:20 +02:00
Vlad Olaru db5eb6baa6
Fix active plugins detection in multisite setups (#50417)
* Improve getting the active plugins slugs with multisite aware logic

* Use better WP function to test for active plugin

* Minor docs fixes

* test: Add a multisite test

* Add changelog

* test: Fix unit tests relying on active plugins

* test: Cleanup

* test: Add unit test for WCPay DefaultPromotions

* Lint fixes
2024-08-09 16:15:15 +03:00
RJ 90b835478b
fix: wcadmin react18 createroot marketing coupons (#48832)
Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
2024-08-09 21:13:56 +08:00
Tung Du 70e54f90ca
[Experimental]Attribute Filter: Dynamic title and description. (#50234) 2024-08-09 19:57:40 +07:00
Adrian Moldovan ff347bdcd4
[testing workflow] Disable shards when re-running failed tests (#50492) 2024-08-09 13:49:19 +03:00
Moon c406f1991e
Manually init template registry and controller for non-block themes (#50507)
* Manually init template registry and cotnroller when get_query_template returns nothing

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

* Validate template before including it

* Move class registration to init method

* Remove container registration from coming soon handler

* Lint

* Moved registration to register_dependencies

* Change blocks init condition to only when it's not initialized

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-08-09 18:08:02 +08:00
Tung Du 5047182efd
Product Collection: Fix: ensure the global product object is always ready for compatibility layer (#49971)
* add: method for block to declare extra block setting for registration

* update: register Product Template block with skip_inner_blocks

* chore: remove unused import

* chore: changelog

* Revert "update: register Product Template block with skip_inner_blocks"

This reverts commit 88b076bde3.

* Revert "add: method for block to declare extra block setting for registration"

This reverts commit d1545dbba5.

* fix: filter block setting for product template

* chore: changelog

* Revert "chore: remove unused import"

This reverts commit 0f8f66bad1.
2024-08-09 16:37:45 +07:00
Tung Du aaf3046eb6
[Experimental] Product Filters Redesign: Attribute Filters: List style (#50340)
* update: new simplified markup and style

* add: editor preview

* add: show 15 items initially

* fix: render li class for checked items

* chore: naming

* chore: changelog

* update: set some preview items checked for styling purpose

* fix: only show show more button when the list is long

* chore: lint

* fix: e2e tests
2024-08-09 16:17:14 +07:00
Luigi Teschio 7e691560d4
CYS: disable zoom out on fonts/color pairs iframe (#50498)
* CYS: disable zoom out on fonts iframe

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-09 09:16:17 +00:00
Paul Sealock 1561024d6e
[Store Alerts] Make alert action keys unique (#50424) 2024-08-09 20:44:09 +12:00
Paul Sealock bcdff6d134
[Beta Tester] Fix build:zip script to make sure dependencies are built first (#50508) 2024-08-09 20:43:26 +12:00
Tung Du 528be023ae
Refactor: migrate the All Products block to functional component (#50203)
* refactor: migrate the All Products block to functional component

* chore: changelog

* chore: lint
2024-08-09 14:42:45 +07:00
Adrian Duffell a687a97154
Move "Grow your business" to "Things to do next" task list (#50487)
* Move marketing task to thngs to do next

* Add changelog
2024-08-09 13:06:59 +08:00
Adrian Duffell a337cfcab9
Remove remote API call in "Grow your business" task (#50479)
* Remove call to remote API in marketing task

* Add changelog

* Deprecate unused class methods
2024-08-09 12:33:39 +08:00
Sakri Koskimies 201f165600
Fix analytics report download link not being sent (action scheduler blocking) (#50082)
* Reschedule jobs blocked by other delayed jobs

* Add changelog entry

* Comment next action time fallback

* Allow actions to be scheduled in the past

---------

Co-authored-by: Eason <eason.su.tw@gmail.com>
2024-08-09 10:34:00 +08:00
Paul Sealock 9d12459c44
[Navigation] Prepare to remove feature (#50190) 2024-08-09 14:18:39 +12:00
Hugo Drelon 47e4d918c9
[Enhancement] Create new filter `wc_lock_sku_query` for SKU lock query. (#49755)
Create a new filter wc_lock_sku_query to allow third party to filter the SKU lock query.

Fixes #49660

* Create new filter wc_lock_sku_query.

* Bail early with filter prop @coreymckrill

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

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-08 16:15:20 -07:00
Adrian Moldovan b01aabef29
[testing workflows] Disable Metrics job in CI (#50488) 2024-08-08 20:01:38 +02:00
Corey McKrill 623b1f320f
Change when stock notif emails are triggered (#49583)
Moves the check for low/no stock to the point when a product's stock quantity is updated. This decouples the check from orders, since stock can also change in other contexts (such as updates via REST API).

Fixes #31664
2024-08-08 10:22:54 -07:00
Miguel Pérez Pellicer c6732011d6
Bump jetpack connection, stats and constants (#50471)
* Bump jetpack-connection package

* Fix deprecated is_staging_site

* Add required declare( strict_types = 1)

* Revert -- Add required declare( strict_types = 1)

* Bump Stats versions

* Add changelog
2024-08-08 18:19:46 +02:00
Luigi Teschio 79ccf3a77f
CYS: Fix auto scroll when a new block is added (#50431)
* CYS: Fix autoscroll when a new block is added

* add E2E test

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

* remove not necessary changes

* rename blockToScroll to insertedPattern

* add smooth scroll

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-08 15:57:07 +00:00
Luigi Teschio f095fc5696
CYS: fix survey tracking (#50354)
* CYS: fix survey tracking

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-08 17:27:18 +02:00
Alba Rincón a5dba829c9
CYS - Update icon and text colors in the assembler (#50478)
* Customer Account - Maintain the size of the icon in smaller screens

* Hide overflow text

* Update logo and buttons color

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-08 17:18:30 +02:00
Adrian Moldovan 49109ea287
[e2e tests] Fix flaky product-attributes-block-editor -> can add existing attributes (#50485) 2024-08-08 16:09:08 +03:00
github-actions[bot] e280ba3ddc
Delete changelog files based on PR 50410 (#50477)
Delete changelog files for 50410

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-08 13:09:09 +01:00
Adrian Moldovan 6f9863574b
[e2e tests] Fixed broken logo picker tests (#50473) 2024-08-08 13:53:58 +03:00
Tung Du 6b4001118e
[Experimental] Add default product attribute pattern to Product Filters template part (#50158)
* fix: always return an object

* tweak: fallback to the default product attribute

* add: default product attribute pattern

* update: use default product attribute pattern in the template part

* chore: changelog

* tweak: escaping

* performance: add in memory cache

* chore: lint and use strtr for readability
2024-08-08 16:47:04 +07:00
Alba Rincón ff89ce7494
CYS - Move the `ai/store-title` endpoint to woocommerce admin api (#50352)
* CYS - Move the ai/store-title endpoint to woocommerce admin api

* Add middleware and callback

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

* Fix lint error

* Use constant and normalize site title values

* Add base AI Endpoint class

* Fix lint error

* Extract the ai title option name

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-08 10:27:29 +02:00
Chi-Hsuan Huang 8aba7eebde
Prepare 2.4.0 Beta Tester Release (#50461)
Prepared 2.4.0 Beta Tester Release
2024-08-08 14:20:44 +08:00
Chi-Hsuan Huang 450a4ce3bb
Add remote logging tool to beta tester (#50425)
* Add remote logging beta tester tool

* chore: Update log method return type to Promise<boolean>

* Update pnpm-lock.yaml

* Reformat

* Check window.wcSettings?.isRemoteLoggingEnabled

* Add changelogs

* Fix test

* Update toggle_remote_logging

* Fix toggle_remote_logging

* Improve message

* Fix lint
2024-08-08 11:12:51 +08:00
Chi-Hsuan Huang e4bb2c2317
Add remote logger as a log handler to wc logger (#50430)
* Register remote log handler in WooCommerce class

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

* Fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-08 10:50:16 +08:00
github-actions[bot] d0e0567291
Delete changelog files based on PR 50138 (#50457)
Delete changelog files for 50138

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-07 22:58:37 +02:00
Vladimir Reznichenko 169f02009f
CI: boost wp-env setup speed (minor, ~10 seconds). (#50445) 2024-08-07 17:46:57 +02:00
Alba Rincón 0235907b14
Customer Account - Maintain the size of the icon in smaller screens (#50410)
* Customer Account - Maintain the size of the icon in smaller screens

* Hide overflow text

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-07 17:45:16 +02:00
Ames Plant 2d8bd64c54
[Accessibility] Add ability for a screen reader to announce the current tab on a sing… (#50373)
Add ability for a screen reader to announce the current tab on a single product page.

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
2024-08-07 17:26:27 +02:00
Tom Cafferkey 94f6ec5ccc
CYS: E2E Tests for device and zoom toolbar (#50436)
* Add e2e tests

* Changelog

* Toolbar updates
2024-08-07 15:25:07 +01:00
Tom Cafferkey 03f9b06d17
CYS: Remove links from sidebar (#50414)
* Remove EditorLinks from sidebar navigations

* Remove other links from sidebar navigations

* Reset warning modal

* Add changelog
2024-08-07 15:16:42 +01:00
Adrian Moldovan 649baf9855
[e2e tests] Tweak HTML reporter output path (#50443) 2024-08-07 16:04:55 +03:00
Vlad Olaru d46e65f092
Add default WooPayments promotions specs (#50345)
* Remove manual include PHP file since we have autoloading

* Delete transient on store country change

* Attach store country to data sources URLs

* Add WCPay default promotions

* Fallback to WCPay default promotions when marketplace suggestions are off

* Remove unused constant

* Replace deprecated uses

* Fix typos and off-brand docs

* Add changelog

* Lint fixes

* test: Update unit tests

* Cleanup

* Declare strict types

* Lint fixes

* Use default specs when remote ones are empty

* test: Update unit tests

* Lint fixes

* Lint fixes

* Remove needless condition
2024-08-07 15:57:22 +03:00
Luigi Teschio 9ae7485039
Compatibility Layer: fix 'woocommerce_before_single_product_summary' hook position (#50392)
* Compatibility Layer: fix 'woocommerce_before_single_product_summary' hook position

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-07 14:53:11 +02:00
Sakri Koskimies da18c925b9
Make `WC_Cache_Helper::geolocation_ajax_get_location_hash` case-insensitive, add tests (#45439)
* Add tests for geolocation_ajax_get_location_hash

* Make geolocation_ajax_get_location_hash case-insensitive

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

* Fix changelog.

* Docblock.

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

* Fix changelog.

* Strict types is required.

* Set state before assertion

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-07 05:13:57 -07:00
Albert Juhé Lluveras 06b9380ab4
Enable Classic Template tests in the frontend and the Product Attribute template (#49199)
* Enable Classic Template tests in the Product Attribute template

* Reenable and simplify frontend test

* Add changelog file
2024-08-07 12:32:54 +02:00
Gabriel Manussakis 1693fc7694
[Accessibility] Hide zoomed product images for screen readers. (#50003)
* Hide zoomed image products for screen readers.

* Add chengelog file
2024-08-07 09:58:03 +02:00
Jorge A. Torres ba4a82a656
Prevent sync on read when using HPOS diff CLI tool (#49726)
* Prevent read-on-sync when using `wc hpos diff` CLI tool

* Add changelog

* Implement suggestion

* Add clarifying comment

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-08-07 08:40:52 +01:00
Matt Sherman fe7fafa729
[e2e] Product Editor: Add SKU, GTIN, shipping, and custom fields to simple product creation test (#50241)
* Refactor to add steps in 'can create a simple product' test

* Remove unnecessary await

* Fill in shipping dimensions

* Add frontend verification step

* Get permalink from editor page

* Verify shipping dimensions

* Verify sku and gtin

* Fix label association for sku field

* Fill in shipping class

* Fill custom field

* Handle SKU auto-update before filling in SKU

* Changelog

* Changelog

* Add more specific locator for attributes "Add new" button

* Update comment for why click() is used instead of check() for toggle

* Fix incorrect selector for attributes "Add new" button

* Remove check for toggle being checked, as it is flaky

* Await isChecked()

* Scroll custom fields toggle into view if needed

* Make custom field toggling more reliable

* Break filling into a separate step

* Break filling and verifying of full description into separate steps

* Verify the description and fix verifying shipping details

* Make showing of description toolbar more reliable

* Suppress errant warning

* Suppress warning for conditional and add comment about why it is okay

* Remove unused const
2024-08-07 04:34:31 -03:00
Chi-Hsuan Huang c37795d694
Enable remote logging feature flag (#50351)
* Enable remote logging feature flag

* Do not send log in local or dev envs

* Add changelog

* Fix env check
2024-08-07 10:33:47 +08:00
Vladimir Reznichenko a307c22d1e
Monorepo: PSR-4 classes naming and Strict types directive rules for CodeSniffer. (#49438)
* Monorepo: PSR-4 classes naming linting.

* Monorepo: codesniffer config changes after reviewing existing violations.

* Monorepo: enable `Generic.PHP.RequireStrictTypes` rule.

* Monorepo: some exclusions for the new rule.

* Monorepo: test changes.

* Monorepo: test changes.

* Monorepo: cleanup.

* Monorepo: changelog entry.
2024-08-06 14:56:23 -07:00
Adrian Moldovan adbdcceb28
[testing workflows] Only re-run failed e2e tests (#50267)
* Use Playwright's last info run

* Add changelog

* Fix workflow syntax

* Fix workflow syntax

* Try with continue-on-error

* Try with merge-multiple

* Try with pattern instead of name

* Print the run command

* Print the run command

* Use LAST_RUN_FLAG

* Update outputDir

* Update upload paths and parse the file content

* Don't try to download lat run info if the test type is not e2e

* Rename the downloaded file

* Rename the downloaded file

* Rename the downloaded file

* Full path to the downloaded file

* Check download path content

* Check download path content

* Check the last-run file in the right path

* Fail different tests on different run attempts

* Fix artifact name

* Force test failures

* Cleanup console logs

* Cleanup console logs

* Cleanup console logs

* Log if last run info exists but no tests are found

* Revert test changes
2024-08-06 14:50:25 -07:00
github-actions[bot] 0a7d23e868
Delete changelog files based on PR 50200 (#50419)
Delete changelog files for 50200

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-06 10:48:25 -07:00
Bart Kalisz 1da62a3fb5
Core: Update @wordpress/e2e-test-utils-playwright to wp-6.6 (#50274)
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-08-06 19:51:11 +03:00
Vlad Olaru a2d1468c42
Fix and improve payment gateway suggestions unit tests (#50390)
* test: Fix and improve payment gateway suggestions unit tests

* Add changelog

* Code styling fix

---------

Co-authored-by: Daniel Mallory <daniel.mallory@automattic.com>
2024-08-06 18:26:48 +03:00
Tom Cafferkey f01e945204
CYS: Fix DeviceToolbar animation (#50411)
* Wrap device toolbar in motion div

* Adds changelog
2024-08-06 15:27:55 +01:00
Albert Juhé Lluveras bd41bd34f6
Remove duplicate Add to Cart Form block from Webpack entries (#50394)
* Remove duplicate Add to Cart Form block from Webpack entries

* Typo

* Add changelog file
2024-08-06 15:57:41 +02:00
Tom Cafferkey a579e866b7
CYS: Add Zoomed Out feature (#50070)
* useZoomOut hook

* Update iframe with logic with zoomed out feature

* Add back in styling code for margins

* Spaces to tabs

* Device size toolbar

* Move zoom out state to context

* Rename variable

* Fork iframe component from Gutenberg

* Add getCompatibilityStyles needed for forked iframe

* Update usePopoverHandler iframe selector

* Remove zoom out context as its not needed

* Revert "Remove zoom out context as its not needed"

This reverts commit b29780d805.

* Add Zoom Out toggle to icons WIP

* Fix icon fill

* Update selectors to fix toolbar and sidebar pattern bugs

* Add comment to get getCompatibilityStyles file

* Update iframe comment

* Move device toolbar into its own component

* Resize and device changes

* Add prop to disable the resize handler

* Update toolbar to work with Zoom Out

* Hide changes behind feature gate so they dont impact design with AI flow

* Toolbar account for top device bar

* Add body class for with/without AI flow

* Adds changelog

* Fix typo

* Change TS comment to expect error

* Cleanup iframe with unneeded code

* Remove getcompatibilitystyles

* Remove device code from resizable frame

* Add ? operator

* Remove keydown code from iframe

* Fix toolbar scroll

* Pass deviceType as a prop to resizable frame

* Disable devicetoolbar whilst editor is loading

* Disable focus state

* Remove comment

* not disabled selector for button hover states

* Fix linting

* Remove unused fn

* Focus specific styles
2024-08-06 14:29:21 +01:00
Tom Cafferkey 91a1b92e9a
Image Optimization: Compress pattern placeholder images (#50405)
* Compress images

* Adds changelog
2024-08-06 13:42:21 +01:00
RJ b74bd01ca1
fix: remove defaultProps in prep for react 19 (#50266) 2024-08-06 12:20:45 +00:00
Sam Seay 1488a02817
Remove unused php imports from BlockTemplatesRegistry that were accidentally left in a previous commit (#49757)
* Remove unused php imports that were accidentally left in ddabdb1bc2
2024-08-06 23:20:31 +12:00
Tarun Vijwani 5e5378e444
Remove Active Shipping Zones check for displaying shipping calculator on Cart Page (#49214)
* Remove active shipping zones check for displaying shipping calculator

- Remove active shipping zones check for displaying shipping calculator on Cart Page

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

---------

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-06 10:41:26 +01:00
Bart Kalisz 52119dfcc9
Fix CI Metrics job (#50214) 2024-08-06 11:23:04 +02:00
Adrian Duffell 3d16f16ae1
Use admin password reset link on admin login screen (#50200)
* Use admin password reset link on admin login screen

* Add changelog

* Take a different approach that’s compatible with JN

* Update code comment

* use existing variable

* Update tests

* Lintfix

* Change to alternative aproach for detecting admin login form

* Whitespace

* Update test

* Lint fix
2024-08-06 10:29:01 +08:00
DAnn2012 ec6711346b
Fix typo (sidebar-navigation-screen-typography.tsx) (#50332)
* Update sidebar-navigation-screen-typography.tsx

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-06 00:36:17 +00:00
piinthecloud f7f280fd1b
create product collection category and move to main docs folder (#50368)
* create product collection category and move to main docs folder

* add readme

* update title

* update title

* add changelog and remove emojis

* Update docs/product-collection-block/register-product-collection.md

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

---------

Co-authored-by: Shani <shanibanerjee@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-05 11:51:32 -04:00
Luigi Teschio fd2dbf5517
CYS: improve CTA (#50278)
* CYS: improve CTA

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 15:13:39 +00:00
Seghir Nadir ef224a1a70
Fix new account notice not showing in Checkout block. (#50138)
* Correctly cast the account creation nag option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 17:08:46 +02:00
Gabriel Manussakis a00c61481d
[Accessibility] Remove opacity from the hover style of the mini cart button (#50240)
* Remove opacity from the hover style of the mini cart button

* Add changelog file
2024-08-05 15:58:48 +02:00
DAnn2012 162874a408
Fix typos (920.md) (#50335)
* Update 920.md

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-05 15:56:35 +02:00
Gabriel Manussakis 0223715af6
[Accessibility] Fix address heading level on My Account page (#49764)
* Change address title from h3 to h2 on my account

* Bump up my-address template version

* Add changelog file

* Change address title from h3 to h2 on edit address page

* Bump up form-edit-address template version

* Update form-edit-address.php

* Update my-address.php

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-08-05 14:51:23 +01:00
github-actions[bot] a757c53e8b
Delete changelog files based on PR 50126 (#50357)
Delete changelog files for 50126

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-05 12:51:02 +01:00
Fernando Marichal 54b29ec50e
[E2E tests]: Add product description using the block editor (#50232)
* Add product description

* Add changelog

* Add changelog

* Always use same label for ToolbarItem
2024-08-05 08:43:22 -03:00
Luigi Teschio 854c81d9ad
Compatibility Layer: fix documentation (#50348)
* Compatibility Layer: fix documentation

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

* Update plugins/woocommerce-blocks/docs/internal-developers/blockified-templates/compatibility-layer.md

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-08-05 09:59:25 +00:00
DAnn2012 6c22840dcf
Fix typos (Produts) (#50334)
* Update config.js

* Update data.json

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 05:54:52 +00:00
Marianne380 0ca152fa0d
[Enhancement] Create new filter `woocommerce_is_store_page` for filtering if the URL is a store page. (#50174)
Create a new filter woocommerce_is_store_page for filtering if the URL is a store page.

Fixes #50173

* Create new filter  for filtering if the URL is a store page

* Fix brace

* Update plugins/woocommerce/src/Admin/WCAdminHelper.php

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

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

* Remove extra whitespace

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:10:57 -07:00
piinthecloud d92161cbd1
Move checkout docs to main v2 (#49984)
* move checkout docs with front matter to main folder (#49186)

* move checkout docs with front matter to main folder

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>

* initial commit to reapply changes from PR #49186

* update html tags to unicode and clean up hashlinks

* revert unicode

* remove emoji

* update manifest

* test readme page

* remove avail-filters since it is now redundant with the readme

* update links

* test htmlentity

* pdate links

* typo fix

* update readme with actual doc

* fix links

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-08-02 20:12:06 +02:00
Alba Rincón f8854e0a4f
CYS - Improve the error when a request fails due to permissions (#50211)
* Improve the error when a request fails due to permissions

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

* Fix regression and copy

* Fix feedback: improve types

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:50:13 +02:00
Luigi Teschio 5e78db0585
CYS: Improve tracking survey (#50196)
* CYS: Improve tracking survey

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:38:25 +02:00
Ames Plant dbc3056845
[WIP][Accessibility] Add field for the email footer text color (#49648)
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 16:14:21 +01:00
Adrian Moldovan 8849f54491
[e2e tests] Implement the flaky test reporter for core e2e tests (#50259) 2024-08-02 13:32:41 +02:00
DAnn2012 66daa66aa3
Fix typo (filter-setter.php) (#50157)
* Update filter-setter.php

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2024-08-02 11:24:48 +01:00
Luigi Teschio 83b12d59ee
CYS: add E2E tests for fonts installation (#50210)
* CYS: add E2E tests for fonts installation

* remove check

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

* remove console.log

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 08:43:35 +00:00
Adrian Moldovan 4e2c72ec23
[e2e tests] Remove Github reporter (#50256) 2024-08-02 11:38:24 +03:00
RJ c4beb062bf
fix: fixed react18 React.render deprecation notice for WCAdmin (#48785) 2024-08-02 06:53:49 +00:00