Commit Graph

20366 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
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
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
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
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
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
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
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
And Finally eb75902c4c
Fix marketplace promotions action scheduler (#46630)
* Defensive coding for when `as_has_scheduled_action` Action Scheduler function is not defined.

* Changelog.
2024-04-16 14:08:39 +01:00
Thomas Roberts ab60527d6b
Update `PackageRates` component to show single rates as a radio button (#46284)
* Show a single shipping option as radio button

* Add changelog

* Update unused dependency
2024-04-16 13:39:55 +01:00
Luigi Teschio 7d41472206
[Blocks]: remove skipped tests (#46594)
* remove skipped tests

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 11:26:58 +02:00
Thomas Roberts fb481bdce5
Increase shipping/payment borders to prevent half pixel issues on high-resolution screens (#46525)
* Replace pixel box shadow with em to prevent half pixels

* Add changelog

* Apply 2px border

* Make padding around shipping options bigger
2024-04-16 09:50:54 +01:00
Moon 92dcb889b4
Render site visibility setting only when launch-your-store feature flag is on (#46622)
* Render site visibility only when launch-your-store feature flag is on

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 16:48:59 +12:00
RJ 1885f0af60
fix: cookie path in private link sharing (#46571)
* fix: cookie path in private link sharing

The commit includes a fix for the LYS private link woo-share cookie entry. The path for setting the cookie has been corrected to ensure proper functionality. T

* lint
2024-04-16 15:13:39 +12:00
Chi-Hsuan Huang f1bdbec656
Update coming soon page link to template editor (#46566)
* Update coming soon page link to template editor

* Add changelog

* Hide coming soon link when current theme is classic theme

* Remove line change

* Add type
2024-04-16 14:36:43 +12:00
Paul Sealock 6116f01dc7
[LYS] Allow login pages to work in Coming soon mode (#46569) 2024-04-16 12:46:11 +12:00
Paul Sealock f5a4cd05dd
[LYS] Remove Coming Soon page and id (#46561) 2024-04-16 12:02:18 +12:00
Wesley Rosa fed46ed1e7
Adding support for co-branded credit cards (#45903) 2024-04-15 22:59:05 +01:00
Michael Pretty aa52be1ee7
Only query order meta for orders that were successfully retrieved from the DB. (#45544)
* Only query order meta for orders that were successfully retrieved from the DB.

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

* Address linting issue

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-04-15 21:37:47 +01:00
Luigi Teschio a8e84d8c8b
CYS - fix use GPT 3.5 model (#46544)
* CYS - fix use GPT 3.5 model

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

* use constant

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-15 18:33:16 +02:00
nigeljamesstevenson 9f9d0268cd
Update stable tag to 8.7.0 (#46598)
woorelease: Update stable tag to 8.7.0
2024-04-15 16:37:29 +01:00
Gan Eng Chin 6caed10ba3
Fix code typo in Orders Analytics (#46487)
* Fix code typo in Orders Analytics.

* Add changelog.
2024-04-15 23:01:43 +08:00