Commit Graph

49629 Commits

Author SHA1 Message Date
Jorge A. Torres 45563f0c11
[COT] Initialize order date props during `read()` as GMT (#34474)
* Load order date props as timestamps in COT
2022-08-30 12:30:03 +02:00
Chi-Hsuan Huang f813153ac5
Fix country field is empty when navigating back to the store details tab (#34484)
* Add is_store_country_set to onboarding profile items

* Fix country field is empty when navigating back to store details tab

* Add changelog
2022-08-30 09:43:59 +08:00
Chi-Hsuan Huang 9d23439136
Refactor inbox notes to have get_note method (#34357)
* Refactor NewSalesRecord to have get_note method

* Refactor OrderMilestones to have get_note method

* Add unit tests for notes

* Fix wrong content data return type

* Add changelog
2022-08-30 09:43:27 +08:00
Chi-Hsuan Huang 72d8c791e6
Migrate @woocommerce/data notes store to TS (#34220)
* Migrate wc.data.notes to TS

* Add missing field "is_read" to notes item schema

* Add changelog

* Fix test_get_notes_schema test
2022-08-30 09:42:32 +08:00
Tomek Wytrębowicz eeb090ddf8
Update `jest-puppeteer@5.0.4` (from `4.4.0`) (#33827)
to be albe to run with jest 28.
2022-08-29 12:22:30 -06:00
Néstor Soriano 427b3fbdc2
Make Yoda conditions mandatory again (#34335)
* Make Yoda conditions mandatory again

* Add changelog file
2022-08-29 11:55:23 +02:00
Chi-Hsuan Huang 08344736db
Fix "1 of 2 steps" is shown for the first step in a 3 step tour (#34413)
* Fix "1 of 2 steps" is shown for the first step in a 3 step tour

* Add changelog

* Rename prop

* Update shipping tour
2022-08-29 17:25:24 +08:00
Ilyas Foo c7015da14e
Update product task experiment names to re-run (#34495)
* Update product task experiment names to re-run experiment

* Add spotlight parameter experimental product task menu

* Changelog

* Fix yoda
2022-08-29 14:19:59 +08:00
Tomek Wytrębowicz ea8b44115b
chore: Unify imports syntax in admin-e2e, add missing dependencies (#33901)
* Unify test spec helpers `export` syntax to ESM,

to make it possible to impor them locally.

* Unify import syntax to ESM

* Install missing dependencies of admin-e2e-tests

* Do not import `expect` from `@jest/globals` in admin-e2e-tests

Let typescript pick the puppeteer extension from global.
Address https://github.com/woocommerce/woocommerce/pull/33901#issuecomment-1221650234

* Map unknown types in `admin-e2e-tests` to make tsc happy.

* Add changelog entry

* Use the angle-bracket syntax instead of type assertions

Address https://github.com/woocommerce/woocommerce/pull/33901#discussion_r955591953

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

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-08-29 10:36:36 +08:00
Christopher Allford ad8f1de6d1
Fix "Orders" Plurality (#34491) 2022-08-26 14:34:40 -07:00
Gan Eng Chin 945a55adbc
Update Google logo icon (#34471)
* Update Google logo icon.

* Update Google logo icon to use img element with svg file.

* Simplify ProductIcon CSS with size prop.

This applies to svg and image icons, not just svg.

* Add changelog.

* Set style for Google logo icon.

We set white background to override the gray backgroun in ProductIcon.

Padding is used to make it look visually similar size with other icons.

* Update style for Google logo.
2022-08-26 19:24:19 +08:00
Rodrigue 0b772e31e3
Add back FB extension to Installed marketing extensions list. (#34259)
* Update FB icon component SVG to latest FB icon.
2022-08-26 19:36:44 +09:30
Chi-Hsuan Huang 51a794d743
Add `wp_version` prop to storeprofiler_store_business_details_continue track (#34439)
* Add wp_version prop to storeprofiler_store_business_details_continue_variant track

* Add changelog
2022-08-26 12:37:08 +08:00
Jamel Noel Reid ec3b10fe1f
Remove deprecation notice from e2e readmes (#34476)
* Remove deprecation notice

* Added changelog

* Update plugins/woocommerce/tests/e2e-pw/README.md

Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>

Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
2022-08-25 13:41:55 -06:00
Vedanshu Jain e8eb000733
Add inline file delivery to WC_Download_Handler (#31145)
Add inline file delivery to WC_Download_Handler

Create a new setting option for inline file delivery for downloadable
products. In the Download Handler create a new method for the new
setting as well as a method for returning the proper headers to deliver
files inline.

Resolves: #28410

* Update Content Type of inline delivered files

* Update Downloaded file name

* Change content-disposition to be a checkbox

Since inline-delivery works with multiple download methods

* Document  function

* Add new setting for test, see #31145.

* Better setting wording and remove typo comment.

* Address pr feedback.

* Add changelog.

* Rephrase the settings to make it more clear.

* More rephrasing.

Co-authored-by: Matthew Caldwell <caldwellysr@gmail.com>
2022-08-25 11:03:03 -07:00
Barry Hughes 91072c40e0
Order item meta/re-order fix (#34472)
Order-again item meta should store term slug instead of term value.

* Cleanup f26e62502c
* Remove extra tab
* Changelog.

Co-authored-by: Alexandre Froger <alex@froger.me>
2022-08-25 10:57:03 -07:00
Jorge A. Torres 2ce2b65959
[COT] Implement methods `get_order_count`, `get_unpaid_orders` and `get_order_id_by_order_key` in the COT datastore (#34324)
Implement `get_order_id_by_order_key()` and related methods in the COT datastore.

* Implement `get_order_count()` in the COT datastore

* Implement `get_unpaid_orders()` in the COT datastore

* Implement `get_orders()` in the COT datastore

* Add unit tests for misc. COT datastore methods

* Add changelog

* Apply suggestions from code review

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

* Rename var

* Update docblock

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-08-25 08:51:27 -07:00
Rommel Castro 0654c4a7c6
make `wccom` commands text translatable, add application-password section URL (#34363)
* make text translatable, add application-password section url

* fix URL

* add missing `translators:` comments, fix wront params order
2022-08-25 09:27:36 -05:00
Barry Hughes 4dcff8ccf1
Trashed coupons should not be usable (unless restored). (#33791)
Trashed coupons should not be usable (unless restored).
2022-08-25 05:26:01 -07:00
Moon 83e191be31
Revert skip button changes on the OBW pages (#34455)
* Revert skip button changes

* Revert skip button changes -- e2e tests

* Remove unexpected whitespace

* Update test snapshot

* Return early

* Remove test
2022-08-24 19:33:31 -07:00
Sam Seay 7f5f47247c
Code-analyzer: Perform build between checkouts to avoid failures (#34438)
Fixes #34196
2022-08-25 11:50:31 +12:00
Vedanshu Jain b2c3ef8f29
Add support for refunds and other order types in custom order tables (#34050)
* Add suppport for types and refund in migrations.

* Add changelog.

* Make CI happy.

* Add support for refunds save and read.

* Remove placeholder from order types eligible for migration.

* Link backfilling to migration process.

* Add changelog.

* Reduce batch size for backfilling since it is slower.

* Correct grammer.

* Link backfilling with data synchronizer and adopt with pending migration on both sides.

We already have backfilling implemented, however it was not linked. This would make switching data stores back to posts table not possible. This commit links datasynchronizer so that it can both migrate as well as backfill.

* Remove _recorded_sales from skipped check keys since its implemented.

* Share concrete instance of cot controller to share feature value.

* Revert adding concrete controller, object instance is already shared.

* remove yoda condition.

* Remove unintended change.

* Add types in unit test since we added it in schema.

* Remove unsetting type, its supported now.

* Add support for backfilling order types with different datastores.

* Use correct datastore while migrating.

* Support -1 for limit queries

* Order factory to support reading multiple order types.

* Add read_multiple to refunds data store.

* Return negative total for consistency with posts table implementation.

In custom tables, we can directly sum the value for total_amount since they are being stored in flat tables, instead of relying on _refund_amount meta.

* Remove type definations for back compat.

* Add test for get_orders

* Use persist_udpates method for consistency and DRY.

* Resolve conflict correctly.

* Removed duplicated methods.

* Use correct order in doc comment.

* Fix typo

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>

* Rename parameter for better clarity.

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-08-24 14:33:03 -05:00
github-actions[bot] 9c56c77951
Delete changelog files based on PR 34359 (#34453)
Delete changelog files for 34359

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-08-24 12:06:15 -07:00
Tarun Vijwani a0ba266e75
Update WooCommerce blocks package to 8.3.1 (#34359) 2022-08-24 11:41:37 -07:00
jonathansadowski 74f8d5f17a
Use syncpack to verify consistent versions for react and react-dom (#34397)
* Add GitHub action and pre-push hook for syncpack for react and react-dom

* Fix typo in pre-push script

* Don't execute suggested command to fix mismatches automatically.

* Update react and react-dom to 17.0.2

* Move changelog check to last, so that pre-push still fails if check isn't successful

* Add changelog files

* Correct issue with syncpack.yml referencing an internal action

* Add command to top-level package.json for fixing mismatches

* Update syncpack action to only run when package.json files are affected

* Update workflow to just run syncpack list-mismatches

* Add version pinning to syncpackrc
2022-08-24 10:15:22 -05:00
susameca b8177b82e0
Fix Bulgarian States for Sofia (#34381)
Update subdivisions for Bulgaria.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-08-23 18:40:05 -07:00
Chi-Hsuan Huang 467b5dbfd2
Hide finish setup button when task list is disabled (#34410)
* Hide finish setup button when task list is disabled

* Add changelog

* Update plugins/woocommerce-admin/client/activity-panel/activity-panel.js

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

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-08-24 09:39:01 +08:00
Joel Thiessen 668244b2d7
Adding DateTimePicker component (#34293)
* Rudimentary functional version of datetimepicker

* Adding changelog

* Adding package changelog

* Making component more than barely functional

* Removing unnecessary export

* Rename directory to date-time-picker

* Add initial story

* Pass datetime to onChange callback

* Localize error string

* Remove initial error prop

* Rename currentDate to initialDate

* Simplify state for selected date

* Add extra stories around component

* Trigger onChange whenever date is changed

* Add readme

* Allow currentDate to be changed via props

* Update readme

* Update name to DateTimePickerControl

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-08-23 15:19:46 -07:00
jonathansadowski dc2c7a4996
Add workflow to label community PRs and Issues. (#34309)
* Add workflow to label community PRs and Issues.

* Move most of the logic for the script to check for community contributors into a separate module
2022-08-23 14:01:12 -05:00
Barry Hughes 852dc0ca61
Integrates the COT admin list table and COT-based search. (#34421)
* Integrates the COT admin list table and COT-based search.

* A search should be regarded as a form of filtering.
2022-08-23 13:28:11 -05:00
Barry Hughes 1e3bf7aa66
[COT] Implement order search (#34405)
* Support searches as a direct feature of (COT) order queries.

* Always add `DISTINCT` to order queries.

* Add test (+fix order search logic for matching order IDs).

* Changelog.

* Clean-up search_orders() method, remove original roughed-out search code borrowed from CPT data-store.

* Tidy.
2022-08-23 12:15:39 -05:00
Chi-Hsuan Huang 9e891cf47b
Fix marketing task placeholder flash after a plugin is installed (#34414) 2022-08-23 12:07:30 +08:00
Chi-Hsuan Huang c612d04819
Fix store details fails to save store address after navigating back to the tab (#34426) 2022-08-23 11:44:51 +08:00
Sam Seay bec2336c1e
Remove the send-release-notification job, its no longer needed. (#34350)
Remove the send-notification job, its no longer needed.
2022-08-23 14:51:46 +12:00
Chi-Hsuan Huang b07029873b
Update remote inbox notifications readme (#34411)
* Update remote inbox notifications README.md

* Add changelog

* Update readme
2022-08-23 08:20:41 +08:00
Sam Seay 41a276c49b
Pass the version argument explicitly to code-analyzer, introduce a new command that determines latest major/minor (#34404)
This also adds a new command `major_minor` that contains some of the old logic of `getPluginData` to determine the latest major/minor version of WooCommerce
2022-08-22 16:29:59 +12:00
Paul Sealock e651a46fb6
Turbo: Avoid caching result of `build:feature-config` (#34296) 2022-08-22 16:28:57 +12:00
Chi-Hsuan Huang 4841595f2f
Fix texts in wp-admin-scripts not translated (#34371)
* Fix texts in wca client/wp-admin-scripts are not translated

* Add changelog

* Fix Navigation/Init.php

* Fix code sniff errors

* Fix param type

* Fix grammar
2022-08-22 07:12:52 +08:00
Christopher Allford d8ed0318ce
Bump WooCommerce 7.0.0 Versions (#34403) 2022-08-19 14:07:00 -07:00
github-actions[bot] 066affe669
Release: Remove 6.9 change files (#34379) 2022-08-19 13:13:21 -07:00
Jorge A. Torres dd070e63e4
[COT] `OrdersTableQuery`: ignore invalid elements in `meta_query` (#34347)
Handle invalid `meta_query` similarly to `WP_Query`

`meta_query` needs to be an array of arrays. Elements in `meta_query` that do not conform to the expected format will be ignored.

* Expose the SQL query in OrdersTableQuery for debugging purposes (similar to WP_Query)

* Add changelog

* Drop unnecessary `is_array()` check
2022-08-19 11:26:57 -07:00
Barry Hughes 87835e3af9
Feature/review table list (#34393)
* review table first adjustment

* fix format

* Update Reviews.php

* fix extra space

* Update plugins/woocommerce/src/Internal/Admin/ProductReviews/ReviewsListTable.php

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

* added docblock

* renamed filter, array syntax

* Add changelog.

* Adjust hooks per coding standards.

Co-authored-by: Christopher Hedqvist <christopher.hedqvist@redlight.se>
2022-08-19 11:10:12 -05:00
Daniel W. Robert 8ee227f8df
Update Information Notice for No Products Found (#34362)
* Add additional class to no-products-found banner.

By adding an additional class of `woocommerce-no-products-found`, we can
target the info banner contextually without running the risk of
impacting notifictaions in other areas of the active theme.

See https://github.com/woocommerce/storefront/pull/2027#issuecomment-1218083764

* Add changelog for update.
2022-08-19 10:42:17 -05:00
louwie17 78c28ae9f3
Add product link field (#34313)
* Add initial product field and modal for editing product link

* Create a product link modal for editing product link

* Only show permalink when product is published

* Add changelogs

* Add changelog for data package

* Change save button to primary

* Fix merge conflcts

* Add getPermalinkParts selector to products store

* Made use of getPermalinkParts to support draft products
2022-08-19 12:05:13 -03:00
Vedanshu Jain c27565f413
Link backfilling to migration process (#34167)
* Link backfilling to migration process.

* Add changelog.

* Reduce batch size for backfilling since it is slower.

* Correct grammer.

* Link backfilling with data synchronizer and adopt with pending migration on both sides.

We already have backfilling implemented, however it was not linked. This would make switching data stores back to posts table not possible. This commit links datasynchronizer so that it can both migrate as well as backfill.

* Remove _recorded_sales from skipped check keys since its implemented.

* Share concrete instance of cot controller to share feature value.

* Revert adding concrete controller, object instance is already shared.

* remove yoda condition.

* Remove unintended change.

* Revert from using gmdate.

* Remove hardcoding.

* Remove doc block for fake option support.

* Comment out option check for better testability.
2022-08-19 06:27:19 -05:00
Barry Hughes 77d5842642
Restore 'Contributing to WooCommerce' guidance (#34380) 2022-08-18 10:41:17 -07:00
Joshua T Flowers e73ffbe088
Add FormSection component (#34348)
* Add FormSection component

* Add changelog entry

* Move card styling outside component

* Add readme

* Allow JSX elements for title and description

* Fix lint errors
2022-08-18 10:36:43 -07:00
Joshua T Flowers 32de8bee6f
Add SearchControl component (#34159)
* Add initial SearchControl component

* Add async example

* Reorganize getItemPropsType type

* Create separate MenuItem component

* Update items to use value/label pairs

* Add fuzzy matching example

* Use MenuItem component in example

* Add callback method example and onSelect prop

* Add custom render example

* Add styling

* Simplify Menu component

* Add changelog entry

* Update SelectControl to DeprecatedSelectControl

* Rename SearchControl to SelectControl

* Add readme

* Add placeholder prop

* Add icon to combox box

* Rename deprecated SelectControl classes

* Add changelog entries

* Pass menu props to menu to fix ref issues

* Update lock file

* Rebase and update lock file

* Fix up IDs in e2e tests

* Make list structure more semantic

* Fix update conflict with pnpm-lock

* Move new SelectControl to experimental

* Change experimental class name to avoid style conflicts

* Fix up latest lock file from rebase

* Remove onboarding e2e changes

* Update changelogs

* Update lock file again

* Update pnpm-lock and fix lint error

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-08-18 10:36:20 -07:00
Chi-Hsuan Huang e9d27c8949
Update in-app marketplace to display localized strings (#34356)
* Update in-app marketplace to display localized strings

* Add changelog
2022-08-18 16:51:36 +08:00
Chi-Hsuan Huang 50d4d6774c
Update "Refund Returns" note to display localized strings (#34352)
* Update WC_Notes_Refund_Returns note to display localized strings

* Fix wrong get_action return type

* Add changelog

* Add locale check and unit tests for wc-notes-refund-returns

* Update plugins/woocommerce/includes/admin/notes/class-wc-notes-refund-returns.php

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

* Update plugins/woocommerce/includes/admin/notes/class-wc-notes-refund-returns.php

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

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-08-18 15:37:52 +08:00