Commit Graph

22261 Commits

Author SHA1 Message Date
Thomas Roberts 32f3e08657
If local pickup text is not set, save an empty string to allow fallback to work (#51580) 2024-11-01 21:32:52 +00:00
Roy Ho 877342cd6d
[Experimental] Product filters/active block new structure (#52268)
* Update product filters active block to new structure

* Build active chips items

* Add changelog

* Remove unneeded line-height

* Fix linting

* Fix e2e tests

* Refactor removeText

* Clean up

* Add clear button even without group

* Fix stock status name in e2e test

* Remove heading block

* Remove unused i18n module

* Remove period

* Add clear button variation description

* Fix typo

* Rename active chips to removable chips

* Extract data items from removable chips to make it reusable

* Fix e2e tests

* Add frontend script loading to null

* Don't render the block if no active filters

* Disable clear button by default

* Clean up

* Hide with iAPI

* Fix linting and e2e

* fix: add hidden tag serverside

---------

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-11-01 05:44:46 -07:00
Karol Manijak 2d836d8088
Update E2E tests to work with WP 6.7 RC2 (#52447)
* Use WP 6.7 RC2 for Blocks env

* Update edited template heading selector

* Change selector in revertTemplate util due to issue in GB (WP 6.7)

* Update edited template heading selector in another suite

* Use page instead of editor.canvas to access components-popover

* Add changelog

* Update editor heading selector

* Update editor heading selector
2024-11-01 11:58:24 +01:00
Damián Suárez c0ae9b4a29
Rating Filter: first iteration of Minimum Rating feature (#52484)
* clean obsolete atttribute types

* check properly when showing no product Notice

* add new minRating attribute

* add first implementation of Minimum Rating panel

* introduce setCountVisibility internal helper

* add title to stars label

* rename vars. Simplify getting ratings data

* simplify checking rating_counts prop

* clean jsdoc block

* simpligy creating ratingOptions collection

* sort() > reverse()

* filter rating by minimum rating attr

* tidy process to render rating options

* changelog

* use Flex to layout the labels

* fix changelog typo

* import type explicitely
2024-11-01 10:45:07 +00:00
Adrian Moldovan b10c4d0988
[e2e tests] Remove update-woocommerce spec (#52493) 2024-11-01 12:35:15 +02:00
Mik 4b4e16454c
Track first and last 20 orders to Weekly Tracker Snapshot (#52074)
* Fetch order snapshot for HPOS

* Fetch order snapshot for legacy order storage

* Include snapshot generation time

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

* Fix linter error

* Add unit test for order snapshot data

* Add unit test for snapshot generation time

* Fix phpcs error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-01 08:09:10 +00:00
Tung Du 8bd4f9ea34
Experimental: Product Filters Overlay overhaul (#52279) 2024-11-01 12:16:59 +07:00
Paul Sealock 148e3b9295
[Settings] Add JSON object to power React view (#52472) 2024-11-01 17:32:22 +13:00
Chi-Hsuan Huang 59c323655c
Optimize Coming Soon badge performance with early exits (#52477)
* Optimize Coming Soon badge performance with early exits

Improves performance by preventing unnecessary code execution for non-admin users:
- Add early exit in setup_hooks() for non-admin users
- Move hook registration to init to ensure WordPress is loaded
- Prevent badge-related actions from being registered for non-privileged users

This change reduces unnecessary code execution and improves overall
performance by isolating the Coming Soon badge functionality to only
run for authenticated admin users.

* Add changelog

* Fix permission check
2024-11-01 11:48:07 +08:00
Sam Seay a24502fe23
Add separator to "Place order" button and use the block style variations API (#52017) 2024-11-01 05:49:23 +13:00
Sam Seay 601e14a253
Checkout: Collapsible Order Summary in mobile view (#52253) 2024-11-01 05:48:54 +13:00
Wesley Rosa f6ee6de76c
Introducing order status constants (#51919)
* Introducing order status constants

* Replacing static calls

* Additional comment blocks

* Updating PHP docs

* Updating PHP docs

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

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Removing unnecessary order statuses group constants + more documentation

* Including the 'new' status (legacy)

* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants

* Moving statuses to a new enum class

* Fix CS issues

* Fix lint issues

* Minor doc improvement

* Changing namespace to make it less granular

* Adding missing documentation for existing filters

* Update plugins/woocommerce/src/Enums/OrderStatus.php

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

* Update plugins/woocommerce/includes/class-wc-order.php

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

* Update plugins/woocommerce/src/Enums/OrderStatus.php

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

* Making the order status class final

* Adding missing filter comments

* Moving conditional filter back to if statement

* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants

* Adding 'since' annotation to fix lint errors

* Adding 'since' annotation to fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
2024-10-31 13:57:47 +01:00
Manish Menaria 928d523a35
Product Collection: Add "Rating, low to high" and "Rating, high to low" sorting options (#52372)
* Product Collection: Add "Rating, low to high" and "Rating, high to low" sorting options

This commit adds a new sorting option to the Product Collection block that allows
sorting products by rating from low to high. The existing "Top Rated" option has
also been renamed to "Rating, high to low" for consistency.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-31 17:49:27 +05:30
Damián Suárez 90b8770257
Introduce file to define Product Collection types. Improve types handling. (#52458)
* introduce file to define collection data types

* do not define `results` always like an array

* update passing types to useCollection intances

* allow to set the useCollectionData response type

* reuse RatingValues type

* tidy collection types in status filter

* clean types defined in type-defs pck

* change changelog type

* update attribute filter

* move Collection Data types to product-collection folder

* update WCStoreV1ProductsCollectionProps path

* improve defining the results type for the collection

* update path to import product collection types

* fix path to import RatingValues type
2024-10-31 09:30:40 +00:00
louwie17 ebb300c1e7
Fix storybook wireit commands conflict (#52438)
* Update storybook wireit commands to avoid project wildcard

* Update regex for storybook build command

* Add changelog
2024-10-31 06:12:51 -03:00
Damián Suárez fa6eec988b
[Experimental] Rating Filter: clean code about dropdown mode (#52451)
* remove dropdown mode from InspectorControls

* clean dropdown code from Edit component

* clean block attributes and types

* changelog

* remove unused imported components

* remove unused PreviewDropdown component
2024-10-31 08:04:38 +00:00
Oliver Juhas 21c5a3d806
Adding `$default_path` parameter to `woocommerce_locate_template` filter (#52169)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-10-31 08:59:18 +01:00
Damián Suárez 20d210421d
Rating Filter: introduce RatingStars component (#52468)
* introduce RatingStars component

* changelog

* remove aweful inline style

* set gap zero
2024-10-31 07:33:44 +00:00
Chi-Hsuan Huang 0963fa5738
Fix JS translations broken when plugin folder name is not "woocommece" (#52448)
* Fix plugin domain handling in Translations class

* Remove unused import

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

* Fix translations

* Fix plugin file path

* Add changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-31 10:01:45 +08:00
github-actions[bot] f9c8f8efdf
Delete changelog files based on PR 51739 (#52034)
Delete changelog files for 51739

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-10-30 16:31:38 -07:00
github-actions[bot] c9738ff207
Delete changelog files based on PR 51499 (#52036)
Delete changelog files for 51499

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-10-30 16:31:24 -07:00
github-actions[bot] 4c311261de
Delete changelog files based on PR 52405 (#52471)
Delete changelog files for 52405

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-10-30 16:26:12 -07:00
Dmytro 11188e7827
Adding Facebook extension recommendation. (#52405)
* Adding Facebook extension recommendation.

* Adding 'built by woocommerce' tag.

* Adding changelog file.

* Update plugins/woocommerce/src/Admin/Features/MarketingRecommendations/DefaultMarketingRecommendations.php

Removing 'built by WooCommerce' tag

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

---------

Co-authored-by: Dima <9010963+message-dimke@users.noreply.github.com>
Co-authored-by: Justin P <228780+layoutd@users.noreply.github.com>
2024-10-30 15:09:24 -07:00
Ján Mikláš 0e4d4c676e
Update email preview to show processing order email (#52415)
* Move email preview rendering into separate class

* Allow setting WC_Email $object

This is needed so in an email preview, we can set order to be rendered in an email

* Render "Processing order" with dummy order in email preview

* Always show shipping address in email preview

* Allow fetching dummy email preview product

* Add changelog

* Add unit test for EmailPreview

* Clean up filters after rendering email preview

* Improve duplicate filter comment

* Replace __return_true with a function to prevent accidental filter removal
2024-10-30 19:48:21 +03:00
Alba Rincón c8beb771f1
Add support for `email` query parameter in `OrderActionsRestController` (#52454)
Co-authored-by: github-actions <github-actions@github.com>
2024-10-30 17:31:44 +01:00
Alba Rincón 5078b45da2
Fix empty last4 rendering (#52399)
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-10-30 17:13:16 +01:00
Mike Jolley e35c326b8c
Cart Block: Reduce prop drilling in shipping calculator by introducing context (#52380)
* Avoiding shipping calculator prop drilling with context

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

* useCallback for update functions

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-30 13:06:07 +00:00
Manish Menaria ac9dbb2a2f
Fix: Product Collection block inside Single Product block was not rendering correctly on frontend. (#52299)
* Fix Product Collection rendering inside Single Product block

This commit addresses issue #51352 where the Product Collection block
inside a Single Product block was not rendering correctly on the frontend.
Specifically, the first product in the collection was being replaced by
the product selected in the parent Single Product block.

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

* Fix issue for core/post-template block too

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-30 17:43:54 +05:30
Mike Jolley c218a82b14
Delayed account creation: Prevent duplicate after saving content (#52456)
* Register block hooks on the PHP side

* changelog

* substitute name

* indenting
2024-10-30 12:08:51 +00:00
Karol Manijak 1f03f64e4e
[WordPress 6.7] Make sure Product Image Gallery renders placeholder in Editor (#52432)
* Render placeholder of Product Image Gallery every time

* Add changelog

* Fix lint
2024-10-30 11:22:39 +01:00
Manish Menaria 4b66e42e18
Product Collection: Add "Random" sorting option (#52322)
* Add random sorting option to Product Collection block

This commit introduces a new 'Random' sorting option to the Product Collection block. The changes include:
1. Adding a new option for random sorting in the frontend UI (order-by-control.tsx).
2. Updating the backend to support the new random sorting option (ProductCollection.php).

These changes allow users to display products in a random order, enhancing the flexibility of product presentations in WooCommerce stores.

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

* Add PHP unit tests for random sorting option

* Remove "asc" suffix from random sorting option

The "asc/desc" order is not needed for random sorting. This commit:
- Changes `random/asc` to just `random` in sorting options
- Updates code to handle sorting options without order suffix
- Adds fallback to 'asc' order when no order is specified

* Fix: "order" shouldn't be present in REST API params

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-30 15:11:21 +05:30
Tung Du 5936da3b79
[Experimental] Attribute Filter: Respect Show Empty settings (#52208) 2024-10-30 12:41:45 +07:00
Chi-Hsuan Huang c4fa094d1b
Enhance remote logging data privacy (#52321)
* Refactor RemoteLogger to improve backtrace handling and sanitize sensitive data

* Add changelog

* Fix remote logger

* Refactor RemoteLoggerTest to improve error handling and sanitize sensitive data

* Address PR feedback

- Add a filter so that we can add more arbitrary sanitisation
- Update phone number sanitisation
- Add credit card sanitisation

Fix remote logger

* Fix lint

* Fix sanitize file path in error context

* Redact API keys

* Fix tests
2024-10-30 10:35:24 +08:00
Paulo Arromba 378172a63f
Renamed Local Pickup options on mock data. (#51716)
* Removed Los Angeles local pickup option from mock data.

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

* Updated js test

* Reverted js test

* Updated mockup pickup locations

* Updated mockup pickup locations

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-30 01:12:54 +00:00
Paul Sealock 5d1a7499ce
[Settings] Add fresh page, script, and package (#52391) 2024-10-30 14:05:13 +13:00
Néstor Soriano 9ac48232a9
Add the Cost of Goods Sold related code and REST APIs for the orders and order items (#52067)
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-10-29 17:22:21 +01:00
Corey McKrill c9ad98c952
Orders: Add method for obtaining payment info for use in emails and printed receipts (#52173) 2024-10-29 16:34:14 +01:00
Alex Florisca 8fa2797a6f
Check for valid session object before calling get_customer_id in Cart Route (#52410)
* Check for valid session object before calling get_customer_id in Cart Route

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

* Harden get_cart_token function to make sure the cart is loaded before we access the session

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-29 14:54:26 +00:00
Joshua T Flowers 8716d97996
Lower opacity for payments section to work across light and dark backgrounds (#52241)
* Lower opacity for payments section to work across light and dark backgrounds

* Add changelog entry
2024-10-29 10:03:04 -04:00
Mike Jolley e5ca2eb011
Checkout: Add loading placeholder and payment method toggle (#52044)
* Create loading state for payment methods on block checkout

* Tidy and type fix checkPaymentMethodsCanPay

* Disable place order button before payments are Initialized

* Toggle and loading state

* changelog

* Reduce scope of change in check payment methods

* saved methods are hidden when empty
2024-10-29 11:45:40 +00:00
Karol Manijak 8d81b632f2
Fix selector in shopper test (#52328)
* Simplify the test and fix it so it works with and without iframe canvas

* Add changelog
2024-10-29 09:59:59 +01:00
Alba Rincón 42b4c1f25d
Add the new `/orders/{id}/actions` endpoint (#52050)
* Add new /orders/{id}/details endpoint first version

* Add tests for the OrderDetailsRestController

* Fix lint errors and service provider

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

* Update note to mention it was created via a REST API request

* Document the original actions and reference them from the endpoint

* Refactor the endpoint to be `/actions`

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

* Add back loading payment gateway and shipping classes

* Refactor endpoint to be `actions/send_order_details`

* Address feedback: improve error message and note

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-29 09:38:11 +01:00
Vladimir Reznichenko df47723e1e
[dev] CI: install core composer dependencies synchronously in CI-environment. (#52395) 2024-10-29 09:16:11 +01:00
Damián Suárez 9b47acb2e1
[Experimental] Refact Rating filter block for the new Product Filters block structure (#52152)
* update Rating experimental filter title

* allow to insert the filter block

* fix ancestor block name

* remove showFilterButton from attribute types

* udpate icon

* add rating to the initial filters template

* clean rating filter utils

* minor styling code enhancement

* tidy

* remove isEditor const

* import type explicitely

* rename block to CheckboxListEdit

* set defautl style for Rating block

* rename block to RatingFilterEdit

* undestructuring attributes object

* compose rating block by using template

* use InitialDisabled instead of Disabled

* set block instance name

* set display style properly

* do not rename checkbox list block instance

* passing context to CheckboxList block, server-side

* import type explicitely

* process rating data in server-side

* handle activate/deactivate rating filters

* support clean rating filters in the frontend

* remove temporarely action to handle dropdown

* changelog

* remove Dropdown mode for now

* use custom Notice component

* do not import unused libs

* rename method to get_rating_items

* declar selected_ratings_query as mixed

* sort rating stars by value descending

* udpate changelog message

* linting

* remove unused vars

* set selected_ratings_query like an array

* set get_rating_items $select param as an array

* set explicitely Attributes type

* remove unneeded InitialDisabled component

* remove useSetWraperVisibility hook usage

* sort rating straight via SQL
props to @dinhtungdu https://github.com/woocommerce/woocommerce/pull/52152/files#r1818839577

* remove local state to show no products notice
2024-10-29 08:00:04 +00:00
Boro Sitnikovski f0beaa9885
Use the correct `getAdminSetting` call for fetching `siteUrl` (#52376)
* Use the correct `getAdminSetting` call for fetching `siteUrl`

* Lint
2024-10-29 08:54:18 +02:00
Ilyas Foo 262631e344
Add Kliken to default OBW extension list (#52295)
* Add Kliken Meta Ads & Pixel in core profiler recommendation 50% in place of pinterest

* Lint

* Changelog

* Fix using the correct pinterest object

* Lint
2024-10-29 11:56:07 +08:00
Chi-Hsuan Huang 169e9936cb
Fix Mobile App Task Not Marked Complete After Dismiss Action (#52370)
* Fix mobile app task is not marked as complete after clicking the dismiss button

* Add changelog
2024-10-29 11:55:57 +08:00
RJ f9264fb79e
fix: refactored core profiler plugins page and added error screen (#52301) 2024-10-29 11:48:59 +08:00
Paul Sealock 027b91f220
[Navigation] Gracefully handle deprecation of classes (#52248) 2024-10-29 10:46:24 +13:00
David Remer 2c77be6444
Wrong error message in CSV importer (#51966)
* Test that sku skipping works

#46505

* Switch SKU and ID error detection

If we find an product with the same SKU we overwrite the imported product id with the existing one. When we check for the existing ID first, we would get now a match although the imported ID did not match. Therefore we first check if the SKU is already present before checking for the ID

#46505

* Add doc

* Add changelog

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

* Remove unneeded changelog entry pulled in during rebase.

* Remove mistakenly pushed debug code.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-10-28 11:55:08 -07:00
Barry Hughes b7ecd5e294
Cherry-pick PR#52055 (remove changelog) (#52346)
Remove changelog (this fix was cherry-picked back to 9.4).
2024-10-28 09:52:33 -07:00
Miguel Pérez Pellicer aec23fdb0e
Restore total_formatted column in exported reports (#52174)
* Restore total_formatted column

* Add changelog
2024-10-28 10:27:08 -06:00
Gabriel Manussakis ee66739f29
[Accessibility] Add focus ring to close notice banner button (#52079) 2024-10-28 16:04:21 +00:00
Boro Sitnikovski 1f0dc7a37f
Add a `is_string` check to the params iterator (#52361)
This works fine:

```
curl -u bor0:asdf -X OPTIONS "localhost:8080/wp-json/wc/store/v1/products?_unstable_tax_asdf_operator=1" | jq
```

However, this causes a fatal error `PHP Fatal error:  Uncaught TypeError: str_starts_with(): Argument #1 ($haystack) must be of type string, int given`:

```
curl -u bor0:asdf -X OPTIONS "localhost:8080/wp-json/wc/store/v1/products?1=2" | jq
```
2024-10-28 15:38:09 +01:00
Fernando Marichal 0b56f7e30a
Record `Cancel` and `Close` events on modal to change collection type (#52314)
* Add Cancel and Close events to PC

* Add changelog
2024-10-28 11:31:19 -03:00
Albert Juhé Lluveras 250a9bc451
CYS: Prevent '0' to appear next to the Logo section (#52371)
* CYS: Prevent '0' to appear next to the Logo section

* Add changelog file
2024-10-28 14:33:15 +01:00
Maikel Perez aa5e764db9
CYS > Accessibility: update the contrast for the social icons on Large Footer Pattern (#52344)
* Fix the social links icon color from footer-large pattern to automatically pick the icon color from the site theme styles

* Add changelog file
2024-10-28 10:16:43 -03:00
Boro Sitnikovski aed63a9797
Remove double changelog entry which causes CI to fail (#52379) 2024-10-28 08:46:29 -03:00
Mike Jolley d27129b155
Checkout: Make return to cart button text editable (#52262)
* Make return to cart button text editable

* Changelog
2024-10-28 11:03:14 +00:00
Ally 953388ef4c
Include global_unique_id in product import mapper (#52240)
* Add global_unique_id to importer controller

* Add changelog for gtin import mapper

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-28 06:54:10 -03:00
Karol Manijak b610c9d740
Add tracking to collection replacement (#52266)
* Implement new tracks in PC block

* Add changelog

* Record from what to what collection is replaced
2024-10-28 10:42:34 +01:00
Naman Malhotra bcbd08816b
PRR flow (#52160)
* init

* comment tweak

* changelog

* use gihub recommended method

* removed content write permission

* change in how to extract PR number

* change in how to extract PR number

* change in how to extract PR number

* regex change

* regex change

* template updates

* updated comments

* set global permission to empty and moved it within each job

* refactored code, created a needs step

* add condition to prep

* added acknowdegement section

* added github comment

* Moved variables to env

* PRR template

* PRR template changes

* Added changes to cfe notifications

* minor changes

* Added slack message sanitization

* PRR cherry-pick flow

* add cherry pick to frozen release label

* bug fix

* use js instead of shell

* use js instead of shell

* template updates

* frozen release as output

* added some comments

* pr base change

* pr base change

* descp change

* copy changes

* Added checkboxes conformation

* added ack section

* fixed bug

* fixed bug

* fixed bug

* typo

* bug fix

* bug fix

* added logic for github comment

* bug fix

* GH PR comment

* GH PR comment for CFE flow

* GH PR comment for CFE flow

* changelog

* In complechangelog step - extract version from branch

* add validation for manual version input

* log the version user entered

* log the version user entered

* rebased changes

* Code refactor

* bug fixes and formatting

* code refactor

* bug fixes

* template updates and using context object instead of parsing

* bug fixes

* renamed file

* moved vars to env
2024-10-28 16:34:10 +07:00
Ján Mikláš eb7aa1132c
Add experimental feature for email improvements (#52232)
* Add experimental feature for email improvements (#52212)

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-28 09:42:03 +01:00
Naman Malhotra 36f2990170
CFE - added strict check for PR and release number extracted from issue body (#52002)
* Init

* comment tweak

* changelog

* use gihub recommended method

* removed content write permission

* change in how to extract PR number

* regex change

* template updates

* updated comments

* set global permission to empty and moved it within each job

* refactored code, created a needs step

* add condition to prep

* added acknowdegement section

* added github comment

* Moved variables to env

* review changes
2024-10-28 14:31:41 +07:00
Karol Manijak 7c477fe9dc
Product Collection: add "Products" suffix to couple of collections (#52325)
* Add "Products" suffix to some collections name as they're being exposed in the inserter and had confusing names without Product Collection context

* Add changelog

* Update E2E tests
2024-10-28 08:26:01 +01:00
Sam Seay 623cb35976
Adjust copy and show the address in the updated warning message. (#51760) 2024-10-28 18:00:06 +13:00
Chi-Hsuan Huang 5eaecdf383
Prevent synchronous WCCOM API calls in admin pages (#52281)
* Remove Internal/Admin/Onboarding/OnboardingThemes.php

* Only init WCPayPromotion for payment setting page

* Use cached specs

* Add changelog

* Update onboarding.php

* Move isWooPayEligible settings to init

* Fix $is_payments_task check

* Update is_woopay_eligible

* Fix isWooPayEligible logic
2024-10-28 11:46:03 +08:00
RJ 05c3bacac3
fix: removed siteground cache buster (#52365) 2024-10-28 11:44:39 +08:00
Chi-Hsuan Huang ed795b0faf
Fix "Coming soon" bar styles are missing in several themes (#52290)
* Refactor coming soon banner styles and enqueueing

This commit refactors the styles for the coming soon banner in the WooCommerce plugin. The changes include:
- Moving the styles from the `woocommerce.scss` file to a new `coming-soon.scss` file.
- Updating the styles for the `#coming-soon-footer-banner` element.
- Adding a new class `.coming-soon-footer-banner__content` for the content inside the banner.
- Updating the styles for the dismiss button.

Additionally, the commit modifies the `ComingSoonRequestHandler.php` file to enqueue the new `coming-soon.css` file when the coming soon feature is enabled.

These changes improve the organization and maintainability of the code related to the coming soon banner and ensure that the correct styles are applied.

* Add changelog

* Fix styles

* Remove empty line

* Update check orders
2024-10-28 11:01:43 +08:00
Barry Hughes 292144b5be
Update readme.txt, fix WP CLI link. (#52351) 2024-10-25 14:32:01 -07:00
Tung Du d35ea9764c
[Experimental] Update Price Filter block to the new structure and add the Price Slider block (#51660) 2024-10-25 23:04:04 +07:00
github-actions[bot] 624955f7e6
Delete changelog files based on PR 52199 (#52341)
Delete changelog files for 52199

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-10-25 08:42:44 -07:00
Barry Hughes 12f18dc4f5
Early translation mitigation (#52199)
* Improve handling (WP 6.7+) when translations are inadvertently loaded early.

* Changelog.
2024-10-25 08:26:09 -07:00
Gabriel Manussakis 1fde6a54de
[Accessibility] Make coupon code errors announced by screen readers (#52040)
* Remove withInstanceId HOC from TotalsCoupon

* Pass instanceId prop to TotalsCoupon component

* Add changelog file

* Remove withInstanceId import

* Update coupon tests
2024-10-25 15:40:26 +01:00
Manish Menaria 4ca6696f12
Product Collection: Add "order" reference to Upsells and Cross-sells (#52258)
* Add order reference to Upsells and Cross-sells

- Added 'order' to usesReference in cross-sells and upsells
- Updated LinkedProductControl for order context
- Enhanced ProductCollection to handle order references

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

* Add PHP code for Cross-sells collection

* Fix formatting

* Add E2E tests

1. In the Cart Template, it checks that "From products in the cart" is
   selected by default for the "My Custom Collection - Cart Context".

2. In the Order Confirmation Template, it verifies that "From products
   in the order" is chosen by default for the "My Custom Collection -
   Order Context".

* Add 'block' scope to cross-sells collection

* Extract and use reference type constants

This commit extracts the REFERENCE_TYPE_CART and REFERENCE_TYPE_ORDER
constants to the top of the file and updates their usage throughout
the code, including in the getFromCurrentProductRadioLabel function.

* Align variable naming for product references in Product Collection

This commit updates the ProductCollection class to ensure consistency in
variable naming for product references across different collection types,
particularly aligning with the naming convention used in Upsells.

* Add "hadOrderReference" to conditional label display

Key changes:
- Removed `isUsesReferenceIncludesCart` parameter from `getFromCurrentProductRadioLabel`
- Introduced `hasCartReference` and `hasOrderReference` parameters for consistency
- Updated conditional logic to check for both cart and order references
- Adjusted the function call in `LinkedProductControl` to pass both new parameters

* Fallback to 0 for orderId in get_product_ids_from_order calls

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-25 14:56:39 +05:30
Veljko V. cd2edff752
Update e2e tests to be compatible with WP 6.7 (#52304)
* Updated e2e tests to be compatible with WP 6.7

* Add changelog
2024-10-24 10:40:11 -07:00
Maikel Perez f5701ab537
[CYS on core] Ensure the URL for the transitional page is correct whenever accessing it for the very first time (#52271)
* Ensure the URL for the transitional page is correct whenever accessing it for the very first time after completing the CYS flow

* Add changelog file
2024-10-24 14:18:47 -03:00
Alexandre Lara a39958a4a7
[Experimental] Product Filters Redesign > Status filter block: Rename Stock Status Filter to Status Filter (#52076)
* Rename Stock Status Filter to Status Filter

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

* Fix e2e test error

* fix php lint error

* Fix php lint errors

* fix php lint errors

* Update variable name to match the new block name

* Update block name

* Rename variables to match new block name

* fix import error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-24 14:16:54 -03:00
Fernando Marichal c3381a02a6
Fix Upsells and Cross-Sells selection changes depending on block position (#52235)
* Try a fix for 52235

* Add changelog

* Verify product_collection inside is_related_products_block

* Fix lint

* Fix tests

* Add default to $block

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-10-24 10:17:38 -03:00
Seghir Nadir b84067c9f0
add delayed account creation to WC_Tracker snapshot (#52214)
* add delayed account creation to WC_Tracker snapshot

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-24 14:40:26 +02:00
Seghir Nadir af56d3f19d
Use method title or gateway title in Checkout compatiblity notice (#52070)
* Use method title or gateway title in Checkout compatiblity notice

* use better conditions

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-24 14:38:00 +02:00
Tung Du b53163e219
Add experimental-blocks flag to live branches userscript (#52285) 2024-10-24 13:41:04 +02:00
Nikita 7030b646f9
[Translations]: Fixed a bug with translations of "Privacy Policy" and "Terms and conditions (#52218)
Co-authored-by: Nikita Koida <nikita.koido@intexsoft.by>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-10-24 12:54:26 +02:00
Albert Juhé Lluveras 05f70533bc
Fix block theming doc links (#52230)
* Fix block theming doc links

* Add changelog file

* Update manifest
2024-10-24 12:19:59 +02:00
Oleksandr Zhyian 840ad69e22
Add support for SalePrice in JSON-LD schema for structured data (#52105)
* feat: add support for SalePrice in JSON-LD schema for structured data

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

* fix: phpcs issues

* feat: add SalePrice property to variable products on sale

* feat: use sale end date of lowest-priced variation for validThrough in schema

* refactor: simplify code

* fix: ensure that only sale prices are considered for the SalePrice property in variable products on sale

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-24 12:18:42 +02:00
Viktor Szépe 9bfb75d6a3
Fix return type of WP_Background_Process::dispatch (#50054) 2024-10-24 08:45:09 +02:00
Gabriel Manussakis f3c66456d4
[Accessibility] Add focus indicator to select and text inputs on Cart/Checkout block pages (#52010)
* Add outline if select and text inputs are focused

* Add changelog file

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-10-24 08:44:41 +02:00
Tung Du 115619bcde
Fix: use correct wrapper class for product grids (#50697) 2024-10-24 08:44:17 +02:00
Tung Du 7bd713c5ed
Experimental: Prevent diffing error using key for each router region of Chips and Checkbox List (#52210) 2024-10-24 08:44:03 +02:00
Albert Juhé Lluveras 8de9cd3b36
CYS: Remove unnecessary 'as' prop from SiteHub component (#52260)
* CYS: Remove unnecessary 'as' prop from SiteHub component

* Add changelog file
2024-10-23 19:06:45 +02:00
Luigi Teschio 3b48d14f3c
Add To Cart Form: hide stepper when product is sold individually (#52193)
* Add To Cart Form: hide stepper when product is sold individually

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

* improve naming

* add comment

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-23 14:00:16 -03:00
Mike Jolley 084297a1a9
Cart Data Store: Use createReduxStore and fix type warnings (#52219)
* Use createReduxStore instead of deprecated registerStore

* Move thunks to correct file

* Fix type definitions

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

* changelog

* reduce diff size

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

* Remove todo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-23 17:15:41 +01:00
Joshua T Flowers 91eeb179e5
Set a fixed color to Select2 dropdown options (#52244)
* Set a fixed color to select2 dropdown options

* Add changelog entry
2024-10-23 11:48:23 -04:00
Thomas Roberts 6eb9d6a83d
Fix product count display on mini cart first render (#52124)
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-10-23 15:50:13 +01:00
Moon 42c7d33dbb
Track skip guided setup click (#47194)
* add: tracks for skip guided setup

* moved recordSkipGuided setup to skip guided setup step

* lint

* moved it further

---------

Co-authored-by: rjchow <me@rjchow.com>
2024-10-23 22:19:51 +08:00
Vladimir Reznichenko 21d14759b3
[dev] Monorepo: minor build speed improvement (tsconfig consolidation) (#52191)
In this PR, we consolidate TypeScript config files (using the 'include' setting) and JS test directory naming. The goal is to reduce the number of processed files during different build steps.
2024-10-23 13:48:36 +02:00
Luigi Teschio 1e8b6d6b76
Avoid duplicate custom classnames (#51910)
* Avoid duplicate custom classnames

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-10-23 12:52:28 +02:00
Mike Jolley a6d09c9133
Checkout: Fix default customer location and geolocation so only allowed countries get selected (#51885)
* Refactor wc_get_customer_default_location to ensure only valid countries are selected

* changelog

* MIssing doc block

* Updates tests

* Update test

* stripos usage

* Use isset for country check
2024-10-23 11:33:28 +01:00
Vladimir Reznichenko ed7d8c8505
[dev] CI: reduce number of wp-env startup crashes (take 2) (#52254)
To reduce wp-env startup crashes in CI, bump the ut's version to the latest and downgrade the MariaDB version used under the hood to 11.2. Related to https://github.com/WordPress/gutenberg/issues/62242, since it's addressed, we are good to remove the patch.
2024-10-23 11:13:20 +02:00
Ilyas Foo 983326c6d6
Improve stability of core profiler extensions e2e tests (#52252)
* Change e2e test to use plugin slugs instead

* Changelog

* Add data-slug in plugin screen, set remote variant for more predicability, change to use plugin slugs

* Update code to be clearer
2024-10-23 17:09:09 +08:00