Commit Graph

63504 Commits

Author SHA1 Message Date
Leif Singer d1be68b88c
Update @woo.com email addresses to @woocommerce.com (#46387)
* update @woo.com email addresses

* update %40woo.com email address

* add changelog file

* update docs manifest
2024-04-19 21:11:01 +00:00
Jorge A. Torres 5fe34385a1
Migrate HPOS wiki docs to the docs site (#46724)
* Add HPOS CLI tools doc

* Add HPOS extension recipe book

* Add HPOS querying improvements

* Update manifest

* Fix some linting issues

* Apply suggestions from review

* Update manifest
2024-04-19 11:51:10 -07:00
Nathan Silveira ea96bea77e
Highlighting text in the product's description of the new product editor is not visible inside editor (#46728)
* Enqueue global presets css while loading the new product editor

* Change from gutenberg to wp prefix
2024-04-19 13:47:13 -03:00
Fernando Marichal d21b03588a
Add E2E tests to cover Publish dropdown options (#46658)
* Add e2e tests for publish options

* Add changelog

* Create different tests for options

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/product-edit-block-editor.spec.js

Co-authored-by: louwie17 <lourensschep@gmail.com>

---------

Co-authored-by: louwie17 <lourensschep@gmail.com>
2024-04-19 10:46:32 -03:00
Maikel Perez 46d87d427a
[CFT Custom fields]: Show error message after pressing Add or Add another (#46703)
* Show validation message in the field that lost the focus

* Add unique validation for custom field names and trim values

* Let edit custom fields when creating a new product

* Add changelog file
2024-04-19 12:39:52 +00:00
Fernando Marichal eb4873dcd3
Fix edit custom field modal width (#46727)
* Remove min-width

* Add changelog

* move changelog

* Fix width
2024-04-19 09:36:09 -03:00
Justin Palmer 2d71790b72
Avoid JS errors if Sourcebuster library isn't loaded (#46723)
* Don't initialize or handle data if SBJS isn't loaded
2024-04-19 12:24:10 +02:00
Panos (Panagiotis Synetos) afc471d0ed
[LYS] Fix deprecation error with lowercase $user->id (#46747)
👌 Use uppercase $user->ID and some text updates
2024-04-19 13:17:14 +03:00
Chi-Hsuan Huang b575fd580e
Apply styles to Coming soon entire store regardless of theme (#46619)
* Hide woo breadcrumb

* Add deregistration of unnecessary styles for the coming soon page in ComingSoonRequestHandler.php

* Update coming soon entire site style

* Add fonts

* Add changelog

* Update style

* Fix wp group block
2024-04-19 08:00:49 +00:00
EngHell 05a728ff03
performance: checks fo $this->data_synchronizer->data_sync_is_enabled… (#46616)
* performance: checks fo $this->data_synchronizer->data_sync_is_enabled() before executing $this->data_synchronizer->get_sync_status()

* Update plugins/woocommerce/src/Internal/Utilities/COTMigrationUtil.php

Fix code style issues

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-04-18 15:59:18 -07:00
Gan Eng Chin 48f2a4c5ad
Display "Origin" column in Orders table in Orders Analytics (#46424)
* Display channel column in Orders Analytics UI.

* Set $data to false to not use cache.

For development purpose.

* Get channel info from order meta and put into extended_info.

* Set channel in order item level.

* Replace channel with get_origin_label in extended_info.

* Remove unnneeded channel in orders_data.

* Display origin instead of channel in table.

* Fix lint errors.

* Query order meta table based on HPOS.

* Remove code for development purpose.

* Add changelog.

* Fix code comment.

* Guard against null values.

`_wc_order_attribution_utm_source` can be null when the order is created via web admin.

* Set default origin label to "Unknown".

This default is the same as found in `output_origin_column` function in plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php.

* Support server side report download.

This is needed when there are more than 25 records in the Orders Analytics report.

* Fix failed test.

* Fix lint error.

* Simplify code.

We loop through $orders_data instead of $order_attributions data. This is because $order_attributions may not have attributions data for some orders.

By looping through $orders_data, it would automatically cater for "Unknown" data from get_origin_label function call, and we don't need to specify "Unknown" as default value for origin.

* Change "channel" to "attribution" object in controller.

This is because we need more than one piece of information, so we need it to be an object with properties like `origin`, `device` etc.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Change `origin` string to `attribution` array in Orders DataStore.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Change origin string to attribution object.

* Fix indexing after changing from origin string to attribution object.

* Change from origin string to attribution object in table.js.

* Simplify code.

To make code shorter and easier to read, instead of long horizontal code.

* Fix lint errors.

* Fix failed test.

* Fix lint error.

* Fix retrieving origin in CSV export.

* Use $wpdb->postmeta; cosmetic change.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Cosmetic change.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Sanitize order IDs by using absint.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

---------

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>
2024-04-18 16:16:26 +00:00
Leif Singer 2d837ac687
Fix: update REST API v3 reports/orders/totals endpoint to be compatible with HPOS (#46715)
* add a failing test for order totals with HPOS enabled but sync disabled

* fix comment

* ensure the wc/v3/reports/orders/totals endpoint is compatible with HPOS

* add changelog file

* address linter issues
2024-04-18 15:49:19 +00:00
Seghir Nadir af53de9aaa
Fix E2E search string for Cart block shipping tests (#46720)
* Fix E2E search string for Cart block shipping tests

* add changelog

* update to uppercase

* fix test

* fix test one last time

* fix lint
2024-04-18 17:13:49 +02:00
Nathan Silveira 80133578be
Fix description block collapsing when unfocused (#46646) 2024-04-18 10:37:40 -03:00
Nathan Silveira 3a21f87bed
Allow saving a product as a draft when hitting ctrl/cmd + S (#46552)
* Allow saving a product as a draft when hitting ctrl/cmd + S

* Increment logic to keep product published/scheduled after it is published when using shortcut
2024-04-18 10:37:30 -03:00
Raluca Stan f165667632
Prevent checkout blocks breakage for stores using similar number separators (#46241)
* Add a safety check for the numbers with the same value for the separators

This case breaks the library we are using for number formatting. This is not documented on their end and can't be fixed by passing a different configuration.
We are fixing it on our end by overwriting the thousand separator.
This change will only surface in the checkout blocks, at they are the only blocks doing formatting via React (the products blocks use php).
This will not apply to the order confirmation.
This change is preventing a fatal error thrown by the library and allowing users to see the content of the cart.
It's an edge case, because it happens only why people have the same values for the separators, which is an non-standard way to format.

* Add unit tests and changelog

* Add a safety check for the numbers with the same value for the separators

This case breaks the library we are using for number formatting. This is not documented on their end and can't be fixed by passing a different configuration.
We are fixing it on our end by overwriting the thousand separator.
This change will only surface in the checkout blocks, at they are the only blocks doing formatting via React (the products blocks use php).
This will not apply to the order confirmation.
This change is preventing a fatal error thrown by the library and allowing users to see the content of the cart.
It's an edge case, because it happens only why people have the same values for the separators, which is an non-standard way to format.

* Add unit tests and changelog

* Improve tests

* "Improve tests"
2024-04-18 15:17:30 +03:00
Ron Rennick 4797d72c60
Release webpack dependency plugin (#46702)
* add changelog entry for node bump

* bump package version

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-18 11:26:01 +01:00
Damián Suárez 2df389329e
[Product Block Editor]: when adding a new attribute, show selected item right after user clicks on it (#46713)
* render selected value before porpulate terms

* changelog
2024-04-18 05:22:16 -04:00
Chi-Hsuan Huang ea27c1f364
[LYS] Regenerate share key on the fly (#46662)
* Add logic to regenerate the share key if it's not set in LaunchYourStore.php

* Add changelog

* Use add_option directly
2024-04-18 19:39:23 +12:00
Nathan Silveira 5e7962af67
Fix pages not being scrollable on variations on the new product editor (#46700) 2024-04-18 04:16:31 -03:00
Damián Suárez b0e3e31cbe
Data: introduce optimisticQueryUpdate item option (#46343)
* add a CustomActionDispatchers for createProductAttribute action

* add optional options to createItem() fn

* update items object when optimisticQueryUpdate is defined

* reduce itemsCount when creating a new item

* polish TS types

* update reducer tests

* clean unused type

* clean dirty code

* add optimisticQueryUpdate test

* changelog

* minor improvement

* options could be undefined

* compute items and itemsCount based on data

* fix TS error

* changelog
2024-04-18 01:27:40 -04:00
Chi-Hsuan Huang da5272497d
Fix LYS success page shown but Task not crossed off (#46663)
* Add useDispatch hook and ONBOARDING_STORE_NAME import in Congrats.tsx

* Add changelog
2024-04-18 10:29:07 +12:00
Ilyas Foo d2c4490c92
Fix deprecated error message for LYS in PHP 8.1 environment (#46661)
* Fix deprecated error with strlen when using PHP 8.1

* Changelog
2024-04-18 05:45:13 +08:00
Thomas Roberts 9e0fab4ebc
Reset shipping rate font size to match other elements (#46345) 2024-04-17 13:54:43 -07:00
Maikel Perez 4b1e7cbcb8
[CFT Custom fields]: Fix modal separator at the bottom (#46691)
* Remove table separator, move field names to table columns and fix the modal growing when there are validation errors

* Add changelog file
2024-04-17 15:36:33 -03:00
nigeljamesstevenson 486a0210ed
Update changelog.txt 2024-04-17 18:47:00 +01:00
github-actions[bot] 29e2c40d7a
Update changelog.txt from release 8.8.2 (#46679)
Prep trunk post release 8.8.2

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-17 18:44:42 +01:00
Maikel Perez 24306bf0bd
[CFT Custom fields]: Remove horizontal separator that initially appears (#46682)
* Remove block appender below the custom fields block

* Add changelog files
2024-04-17 14:40:10 -03:00
Brent MacKinnon b530a6e9dd
Update guide-large-store.md (#46697)
* Update guide-large-store.md

* Update docs-manifest.json
2024-04-17 11:14:38 -06:00
nigeljamesstevenson f10cc1af4e
Update stable tag to 8.8.2 (#46698)
woorelease: Update stable tag to 8.8.2
2024-04-17 18:03:08 +01:00
Fernando Marichal fd521fb338
Convert the downloable checkbox into a toggle (#46693)
* Convert downloable checkbox into a toggle

* Add changelog
2024-04-17 13:53:53 -03:00
Bart Kalisz 8da0396b34
Blocks E2E: Fix basic role-based tests (#46684) 2024-04-17 18:50:37 +02:00
Jonathan Lane 87ac3d2c85
Add stalebot for flaky e2e test reporter (#46585)
* Add flaky test reporter for flaky e2e test reporter

* Add to stalebot workflow instead

* Update stale action to 9 for node 20

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-17 11:03:12 -03:00
Ron Rennick f51d6fe652
fix js lint filename pattern matching (#46605)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-17 16:55:52 +03:00
Ron Rennick 9cd793abbc
revert change to community assignment workflow (#46681) 2024-04-17 14:07:50 +01:00
Jonathan Lane 9888ee7f4b
Updated deprecated gh-script action to node 20 variant (#46673)
* Updated deprecated gh-script action to node 20 variant

* Minor change in e2e test to trigger CI

* Revert e2e test change

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-17 12:31:16 +01:00
Gan Eng Chin 6e78a1c6ca
Remove unneeded empty "Unknown" code handling in Order Attribution (#46654)
* Remove empty "Unknown" handling.

This is because `get_origin_label` would return "Unknown" by default, and therefore empty($origin) would not be true.

If someone use a wc_order_attribution_origin_formatted_source filter to return '' as the formatted source, we should respect it anyway and we should not override it with "Unknown".

* Add changelog.
2024-04-17 19:28:09 +08:00
Prahesa Kusuma Setia 1fddbb1001
Add notice to connect to woocommerce.com in wc settings and marketplace (#45536)
* add a woo.com connect notice in the plugin list for unconnected store

* add an extra notice string for store that runs outdated woo plugins

* add connect page hyoerlink to the plugin notice

* add changelog

* add comment for maybe_show_connect_notice_in_plugin_list()

* fix linter error

* use installed local woo plugin as the counter of extra notices

* only show woo connect notice in the woocommerce settings page

* add woocom connect notice component

* add woocom connect notice component to the content component

* add extra notice in the woocom connect notice component based on the local woo plugins count

* persist dismissal of woo connect notice in the wc admin settings page

* update changelog

* use update-check-public for unconnected stores

* use information from update-check-public API to determine notice show logic

* re-show dismissed connect woocom notice after 1 month

* add re-show notice logic for react admin page of woo connect notice

* fix identation

* differentiate local storage key for notice dismissal

* move woo connect notice script to different file

* rename to connectnotice

* fix linter issue

* fix linter issue

* update woo.com to woocommerce.com

* update woo.com to woocommerce.com in comment

* capitalize the WooCommerce.com

Co-authored-by: Leif Singer <leif@automattic.com>

* capitalize WooCommerce.com

---------

Co-authored-by: Leif Singer <leif@automattic.com>
2024-04-17 10:13:24 +00:00
louwie17 c0424210ab
Add safety check for rare fatal case with subscription note (#46472)
* Add safety check for rare fatal case

* Change to is_object check
2024-04-17 07:05:34 -03:00
Alex Florisca 3089b1888e
Refactor the Order Summary of the Cart & Checkout blocks (#46386)
* Added new OrderSummaryTotals Block

* Refactor order summary and totals block to contain the inner children

* Add migration for Order Summary Block

* Migration to handle older order summary without totals block

* Remove empty lines from order summary migration

* block editor migration for order summary

* Fix isEligible function

* Update Totals title

* Add checkout totals

* Remove echos and dies

* replace individual checkout blocks with totals block

* Change parent of totals inner blocks and add totals block to innerBlockAreas map

* change CART_ORDER_SUMMARY_TOTALS to CHECKOUT_ORDER_SUMMARY_TOTALS

* Fix linting issues

* fix lint warnings

* Add  changelog

* Lock movement of the taxes block in attributes.tsx

* Less indentation in the render function of CartOrderSummaryBlock and CheckoutOrderSummaryBlock

* Rename webpack chunkName for order summary totals
2024-04-17 10:28:30 +01:00
Moon 87868097d2
Add dismiss button to coming soon banner (#46149)
* Add coming_soon page as a store page

* Implement coming soon banner dismiss

* Added a new REST for Launch Your Store with a dismiss endpoint

* Updated coming soon banner logic to check for woocommerce_coming_soon_banner_dismissed

* Lint fixes

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

* Update plugins/woocommerce/src/Admin/API/LaunchYourStore.php

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

* Update plugins/woocommerce/src/Admin/API/LaunchYourStore.php

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

* Update plugins/woocommerce/src/Admin/API/LaunchYourStore.php

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

* Use user meta to save woocommerce_coming_soon_banner_dismissed

* Lint fixes

* Use the built-in rest api to manage woocommerce_coming_soon_banner_dismissed user meta

* Reset woocommerce_coming_soon_banner_dismissed on login

* Fix lint issues and add back wp_login hook to reset banner dismiss user meta

* Use constant for user meta field

* Update woocommerce_coming_soon_banner_dismissed user meta when X button is clicked

* Restrict user meta to shop manager or admin

* Fix lint issue

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-04-17 12:26:42 +12:00
github-actions[bot] ec80c8d641
Delete changelog files based on PR 46642 (#46653)
Delete changelog files for 46642

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-16 17:18:33 +01:00
Maikel Perez 27b1605a3f
[CFT Custom fields] Fix copy and link (#46640)
* Fix the link in the custom field helper test

* Fix tooltip copy

* Add tracking events

* Add changelog files
2024-04-16 13:09:22 -03:00
Gan Eng Chin efa43d9fcf
Remove unused "No order source data available." message (#46648)
* Remove unused "No order source data available." message.

* Add changelog.
2024-04-17 00:05:10 +08:00
github-actions[bot] f0dfc87b44
Delete changelog files based on PR 46630 (#46651)
Delete changelog files for 46630

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-16 16:58:50 +01:00
Paulo Arromba 77f7b6162b
Set access modifier for $error_message to public and added a setter method (#46642)
* Set access modifier for $error_message to public and added a setter method.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 16:55:02 +01:00
Fernando Marichal e8a2c20914
[Enhancement]: Implement Lazy Loading inside ProductPage component (#46601)
* Improve fcp

* Add spinner

* Add changelog
2024-04-16 12:15:47 -03:00
Leif Singer c973ff93c0
Fix Woo.com reference in the Inbox during onboarding (#46600)
* Fix: Woo.com Reference in the Inbox During Onboarding

* add changelog file

* fix linting error
2024-04-16 17:01:30 +02:00
Raluca Stan 466b3a8d06
Can only be inserted once test excludes the mini-cart template button (#46478)
* Can only be inserted once test excludes the mini-cart template button

* Use function for testing disabled state

* Account for blocks advertise and change selector
2024-04-16 17:15:38 +03:00
Fernando Marichal 25eafffcae
Fix duplicate product endpoint args for item schema (#46551)
* Fix endpoint args for item schema

* Add tests

* Add changelog
2024-04-16 11:13:12 -03:00