Commit Graph

10571 Commits

Author SHA1 Message Date
Vedanshu Jain 5f4d7db463 Remove `modified` check when migrating existing orders for consistency.
We were checking whether an order is modified before migrating them. While on surface this looks good, the logic itself has following flaws:
1. We were only checking the columns in the core posts table, but none of the meta fields.
2. Our comparison logic was written in SQL, but given that we have a much better comparison logic already written in PHP, it does not makes sense to maintain two different versions.
3. We are alrady checking for modified records in the batch processor itself, so another check this close to migration logic is not really needed.
2023-06-14 15:03:27 +05:30
Vedanshu Jain 60e168c6ca Doc fixes. 2023-06-14 14:33:48 +05:30
Vedanshu Jain 0c2508a1f1 Add re-migrate support to HPOS CLI. 2023-06-14 14:33:48 +05:30
Samuele Mancuso 3e82a8771b
Update single-product.js for issue #38711
The href attribute will now be splitted by the hash to ensure that the script will work even in case of an absolute link in the tab anchor href.
2023-06-14 10:56:55 +02:00
Moon 604132391a
Visual changes for Intro, guided setup, and skipped guided setup pages (#38709)
* Change Skip this setup to Skip this step

* Visual changes on intro, user profile, and skip guided page

* Always check tracking agreement

* Change border to 2px

* Change Give yoru store a name font-size to 13

* Add Changelog

* Update test to reflect the text change

* Remove !important

* Update test snapshot

* Update test snapshot

* Remove test that is no longer necessary
2023-06-13 22:10:43 -07:00
Corey McKrill 9db19e4848
Tweak unit tests 2023-06-13 15:47:27 -07:00
Chris Runnells f89de27025 Added changelog entry 2023-06-13 12:04:43 -10:00
Moon 620ff93e5a
Additional changes for the core profiler plugins page (#38616)
* Add install-and-activate-plugins-async action to onboarding

* Add label and learn_more_link types

* Use label and learn_more_link

* Fix type

* Add changelog

* Add changelog

* Add install_priority -- this will be used in the core profiler

* Sort selected plugins by install_priority for installation

* Remove unused imports

* dev: refactor installAndActivatePlugins to xstate

* ts fixes

* Sort plugins by install_priority

* Make sure WooCommerce Shipping is always visible

* Update free extension list content

* Updated WC payment description
* Updated logo images

* Visual changes on the plugin page

* Change CTA font size from 13px to 14px
* Change spacing between the chebox and logo to 24px
* Change heading font-weight to 500

* Fix css lint error

* Fix gray-900 variable name

* Hide learn more link on mobile view

* Add back learn more link that was removed from rebase

* Send pluginsAvailable to pluginInstallermachine

* Use is_activated to determine plugin availability and install status

* Update packages/js/data/src/onboarding/types.ts

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

* Update plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php

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

* Add back recordTracksPluginsLearnMoreLinkClicked

* Use install-and-activate-plugins-async when timer is up

* Record plugin and link with learn more linked clicked event

* Fix failign tests

* Add comment for install_priority

---------

Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-13 15:03:03 -07:00
Chris Runnells 6e39164cea Update task list CSS to prevent text from overlapping the background image 2023-06-13 12:02:43 -10:00
Jorge A. Torres 05a4884188
Address possible PHP deprecation warning in `/wc-admin/options` endpoint (#38685)
* Address possible PHP warning in `/wc-admin/options` endpoint

* Add changelog

* phpcs fix

* Implement code review suggestion
2023-06-13 16:59:55 -03:00
Nathan Silveira bc3edb0ae1
Update style of Block product editor TourKit (#38640)
* Increment style of first step of block editor tour

* Changelog
2023-06-13 16:44:01 -03:00
Vedanshu Jain 59bb1f8365 Update status only when its changed. 2023-06-13 21:12:03 +05:30
Vedanshu Jain a718a59166
Add/order model trash untrash (#38670) 2023-06-13 18:52:26 +05:30
Corey McKrill 7cbebac61c
Ensure test mocks don't pollute other tests 2023-06-12 14:49:22 -07:00
Jorge A. Torres 02e71e8c4b Add changelog 2023-06-12 18:15:03 -03:00
Jorge A. Torres eb3082e835 Address possible PHP warning in report code 2023-06-12 18:15:03 -03:00
Jorge A. Torres 9a6005a355 Cast partial refund related data in report to float before operating on it 2023-06-12 18:15:03 -03:00
Ron Rennick 42261ed77f
Ensure order ordering in order filter unit test (#38680)
* Ensure order ordering in order filter unit test

* remove unused variable, fix spacing

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-06-12 17:59:32 -03:00
Ron Rennick 2ad276174e add HPOSToggleTrait.php to unit test loader 2023-06-12 17:23:55 -03:00
Nathan Silveira 0fc765beb3
Product Editor Onboarding: Add "tell me more" button to wc.com page (#38639)
* Copy Guide component from @wordpress/components and fix focus issue

* Add 'tell me more' button and behavior

* Move Guide component from components package to admin package
Implement assigning an href to the finish button, sending the current page and origin as a parameter on the onFinish callback

* Remove dependency

* Restore pnpm-lock.yaml

* Add changelog

* Add comment in Guide component

* Dismiss modal only when it's finished or X button is clicked

* Add 'rel' when opening link in a new tab
2023-06-12 14:54:29 -03:00
Ron Rennick 0e95435474
improve get_children transient validation (#38666)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-06-12 14:05:06 -03:00
Matt Sherman 2039d8915e
Show feedback bar after product editor tour/guide (#38669) 2023-06-12 12:43:19 -04:00
Nathan Silveira 18f2de2bc4
Always show pricing group fields, disable if not available for a product type (#38531)
* Always show General product tab

* Add info messages for variable and grouped products

* Add logic to disable/enable fields and labels based on product type

* Tweak CSS and fix links

* Add tracks events for links

* Add filters to pricing disabled message

* Tweak logic to only enable fields on certain product types instead of disabling in the opposite ones

Add fallback message when pricing is disabled but it's not Variable or Grouped product

* Add docblocks

* Fix more lint issues

* Fix last lint issues

* Update selector in e2e test

* Refactor PHP echo

* Attach to #woocommerce-product-data instead of attaching to body
2023-06-12 12:58:26 -03:00
nigeljamesstevenson 3efb6f488c
Fix flakiness in `can set variation defaults` test. (#38672) 2023-06-12 14:59:25 +01:00
github-actions[bot] f0156a24fc
Delete changelog files based on PR 38663 (#38665)
Delete changelog files for 38663

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-06-12 08:02:58 -05:00
Corey McKrill d2a9feda2a
phpcs cleanup 2023-06-09 17:26:38 -07:00
Corey McKrill 50f4e63ddb
Add unit tests 2023-06-09 17:14:48 -07:00
Rodel Calasagsag 77024a8da7 Add changelog 2023-06-10 06:17:07 +08:00
Rodel Calasagsag f807d5d65e Add step to wait for overlay to disappear. 2023-06-10 06:16:12 +08:00
Barry Hughes 902454a40c
Fix character encoding detection in CSV exporter for PHP 8.1 (#38648) 2023-06-09 14:32:09 -07:00
Barry Hughes 6db8a53918
Adjust functions in wc-formatting-functions.php to handle null argument deprecations in PHP 8.1 (#38635) 2023-06-09 14:31:11 -07:00
barryhughes 252d3bc32e Remove extraneous `@param` tag. 2023-06-09 14:07:41 -07:00
barryhughes 530a7f08d0 Always return a bool, in case the data store lacks the `untrash_order` method. 2023-06-09 13:52:21 -07:00
barryhughes 7f8747f478 Add methods to allow x-datastore untrashing. 2023-06-09 13:36:31 -07:00
barryhughes d30754b1cf Changelog entry. 2023-06-09 13:36:19 -07:00
barryhughes 4b7643cd6f Describe how untrashing should work in relation to orders. 2023-06-09 13:35:24 -07:00
Ron Rennick a172941031
Add Saint Kitts and Nevis localizations for address entry (#38621) 2023-06-09 17:07:45 -03:00
Ron Rennick 66f4e8c1bb update playwright country crud configuration 2023-06-09 16:31:01 -03:00
Ron Rennick f54686c639 update playwright stateOptions configuration 2023-06-09 15:39:34 -03:00
Corey McKrill 318a133e17
Rename feature_compat to feature_compatibility 2023-06-09 11:24:08 -07:00
Corey McKrill f0f586aa5e
phpcs cleanup 2023-06-09 11:24:08 -07:00
Corey McKrill 2a3b5bfe64
Add changelog file 2023-06-09 11:24:07 -07:00
Corey McKrill 71ead43c61
WC Tracker: Add enabled features, plugin feature compatibility
* Adds a data key with the list of WC features that are currently
  enabled on the site.
* Adds a `feature_compat` key to each plugin that shows its
  compatibility with each feature (compatibile, incompatible, uncertain)
  if the plugin is "woocommerce aware", otherwise just an empty array.
2023-06-09 11:23:53 -07:00
Barry Hughes 273527e380
Leave comment, remove `TODO`. 2023-06-09 08:49:48 -07:00
Barry Hughes 88697c5abd
Tidy TODO task comment. 2023-06-09 08:42:51 -07:00
Albert Juhé Lluveras 9725529e41
Update WooCommerce Blocks to 10.2.3 (#38663) 2023-06-09 17:31:58 +02:00
Maikel David Pérez Gómez 72f7e6ebbb
Publishing product in classic editor redirects back to new editor (#38551)
* Changes the feature given it's id and a toggle value as a query param

* Swap classic editor and new product block editor url when product_block_editor feature changes

* Turn off the product_block_editor feature when user choose to use the classic editor

* Add changelog files

* Fix linter errors

* Add nonce to each feature change request

* Change the hooks name for better readability

* Use get_current_screen function to better identify if the current screen is the product creation or edition

* Add wp_die if the nonce verification failed

* Change regex for explode/parse_url for better reading
2023-06-09 11:18:40 -04:00
Igor Radovanov fe8df401e7
Merge branch 'woocommerce:trunk' into trunk 2023-06-09 15:29:52 +02:00
Ron Rennick 55faf9dcda
Fix 'dynamic property declaration' warnings in wc-admin code (PHP 8.2+) (#38587) 2023-06-09 09:40:26 -03:00
Vedanshu Jain 079274d428
[COT] Allow to filter orders query (#36625) 2023-06-09 15:20:41 +05:30
RJ e68ff848b3
add: updated payment gateways for 2023 Q3 (#38646) 2023-06-09 17:15:53 +08:00
RJ 622711c48b
dev: refactor installAndActivatePlugins to xstate (#38577)
* dev: refactor installAndActivatePlugins to xstate

* ts fixes

* fixed first plugin install progress bar reset issue

* clean up todo comments

* fixed bug where errors were not reported if past 30s timeout

* fix lint
2023-06-09 15:08:45 +08:00
Vedanshu Jain b04376b501
Add HPOS compat queries for tracker. (#38293) 2023-06-09 10:19:01 +05:30
Matt Sherman dadc0eb777
Show feedback footer on product editor page (#38599) 2023-06-08 20:56:07 -04:00
Corey McKrill f16388007c
Allow extenders to add content to order details screen payment info box (#38443)
Adds new `woocommerce_admin_order_data_after_payment_info` hook to the Edit Order screen.
2023-06-08 16:45:08 -07:00
Rua Haszard e8f2d3f061 remove remnant comment about "contextual notice" (now gone):
- intending to use Gutenberg notice and/or proposed forthcoming InlineNotice variant
2023-06-09 10:26:28 +12:00
Joel Thiessen 8098c35588
Add initial release of WooAI plugin (#38610)
Co-authored-by: Joel Thiessen <444632+joelclimbsthings@users.noreply.github.com>
Co-authored-by: Nima Karimi <73110514+nima-karimi@users.noreply.github.com>
Co-authored-by: Thomas Shellberg <tommy.shellberg@automattic.com>
2023-06-08 13:20:05 -07:00
Jorge A. Torres 6672e9e199 Move $report_columns var to reports DataStore parent class 2023-06-08 15:48:50 -03:00
Nestor Soriano 76270ef8cb
Add changelog file 2023-06-08 12:11:51 +02:00
Nestor Soriano 6c2781eedf
Fix character encoding detection in CSV exporter for PHP 8.1
In PHP 8.1 the behavior of mb_detect_encoding has changed from
"return the first suitable encoding from the list" to
"return the most probable encoding from the list". The algorithm used
for "most probable" often fails, though, and detects valid UTF-8
strings as if they were ISO-8859-1. The fix is to use mb_check_encoding
instead.

Additionally, if conversion is needed, mb_convert_encoding is now used
since utf8_encode is deprecated.
2023-06-08 12:07:36 +02:00
Nestor Soriano d1bffaad9a
Add changelog file 2023-06-08 09:32:10 +02:00
Nestor Soriano 5ca67f418b
Adjust wc-formatting-functions.php null args deprecations in PHP 8.1
In PHP 8.1 several functions that accept a string as an argument
(e.g. str_replace) throw a deprecation notice when null is passed.
This commit changes the usages of these functions in
wc-formatting-functions.php so that null inputs are converted
to empty strings.
2023-06-08 09:31:45 +02:00
RJ 5c4746cefc
add: core profiler url routing (#38620)
* added url routing

* fixed tests and changelog
2023-06-08 12:52:22 +08:00
Corey McKrill ef3168abf4
Fix PHP notice when outside of orders screens (#38641)
Avoid the notice by returning early if we're not on an admin page with wc-orders in its slug.
2023-06-07 16:49:22 -07:00
Jorge A. Torres d21cd0b80e Replace x.x.x with correct version number in doing_it_wrong call 2023-06-07 19:13:32 -03:00
Jorge A. Torres 125fdb77c1 Remove files from versioning 2023-06-07 19:12:00 -03:00
Corey McKrill 4c62519144
Update class-wc-order.php comment text (#38630)
Fix a doc block typo.
2023-06-07 15:00:03 -07:00
Corey McKrill 76e84c6bce
Add changelog file 2023-06-07 14:10:46 -07:00
Jorge A. Torres 8c694cfd09 Add changelog 2023-06-07 16:15:14 -03:00
Jorge A. Torres 2cde03eea8 Do not execute orders page controller logic when outside of the orders
screen
2023-06-07 16:14:23 -03:00
Corey McKrill 016d9484dc
HPOS: Add descriptive document titles to HPOS order admin screens (#38617)
* Set the Orders admin page titles

* Tweak edit order title, translator messages

* Add changelog file

* phpcs cleanup
2023-06-07 13:28:10 -03:00
Gan Eng Chin 99dbdbe3f2
Fix WooCommerce name typo in Codisto extension description in test (#38302) 2023-06-07 23:45:52 +08:00
pwsonline 0458dafcb7
Update wc-page-functions.php (#38008)
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2023-06-07 11:08:36 +02:00
mdimai666 03db6d9684
Update class-wc-order.php comment text
Update class-wc-order.php comment text
2023-06-07 13:16:55 +09:00
RJ 1b1f86066f
dev: refactor core profiler pages (#38606)
* dev: refactor core-profiler - modularise each page

- wrapped each page's pre, post, and main states into their top level states for tidiness
- tagged them with id so that we can easily jump to them when doing routing
- generalised component finder code such that it recursively traverses the state meta object until it finds a component key
- fixed css label to use top level state key

* moved initializing into introOptIn so it's not a special case by itself
2023-06-07 11:39:38 +08:00
Igor Radovanov 81f976d2df Merge branch 'trunk' of https://github.com/igorradovanov/woocommerce into trunk 2023-06-06 21:20:46 +02:00
Igor Radovanov ed84b8319f label spacing alignment fixed 2023-06-06 21:19:01 +02:00
Nathan Silveira 52fe3c4a5a
Product Editor Onboarding: Show spotlight for first time visitors (#38590)
* Add placeholder TourKit in product-page

* Create component and configure it to show to the right of wp menu

* Finish TourKit and start creating features guide

* Implement CSS changes and background color

* Create Wrapper to facilitate showing the tour and guide without relying on the options in the future

* Refactor
Add tracks events

* Add changelog

* Fix lint problems

* Fix CSS

* Refactor styles

* General refactor and extract BlockEditorGuide component

* Add changelog

* Fix lint issues
2023-06-06 12:06:26 -03:00
Ron Rennick f608615d1b
Add changelog file 2023-06-06 11:56:11 -03:00
Ron Rennick 7137d60347
Fix various 'dynamic property declaration' warnings (PHP 8.2+) (#38589) 2023-06-06 11:01:54 -03:00
Igor Radovanov 218ad2e48a Add Saint Kitts and Nevis localizations for address entry #38280 2023-06-06 14:01:12 +02:00
RJ e1bdd2f73b
dev: refactor core profiler tracks actions (#38603)
* dev: refactor core-profiler - consolidate tracks

* dev: refactor core-profiler - moved tracks out

* dev: moved tracks up one level

* dev: fixed spawn warning

- caused by this xstate bug https://github.com/statelyai/xstate/issues/1429

* dev: standardised ctx -> context
2023-06-06 15:20:34 +08:00
Jorge A. Torres 4b0836c403 Add $args to docblock in filters 2023-06-05 19:39:59 -05:00
Jorge A. Torres 6257722232 PHPCS fixes 2023-06-05 19:39:59 -05:00
Jorge A. Torres 21d1172038 Add unit tests 2023-06-05 19:39:59 -05:00
Jorge A. Torres 914beaa234 'orderby' and 'groupby' clauses in filter shouldn't include SQL
statement
2023-06-05 19:39:59 -05:00
Jorge A. Torres 1e9c8bfe1d Add changelog 2023-06-05 19:39:59 -05:00
Jorge A. Torres f7f801cdba Rename orders table query filters 2023-06-05 19:39:59 -05:00
Grégory Viguier 6f569e934f Allowed to filter orders query clauses
This introduces 2 filters: `woocommerce_order_table_orders_clauses` and `woocommerce_order_table_orders_request`. They mimic the ones found in `WP_Query::get_posts()`.
They allow to modify the query's clauses, depending on the query args (available in the `OrdersTableQuery` object) for example.
2023-06-05 19:39:59 -05:00
Corey McKrill b63af49a83
Fix assertion in HPOS unit test (#38615)
This adjusts the asserted value of a test so it will continue to pass after a change in #38565.
2023-06-05 17:38:57 -07:00
github-actions[bot] c0ea0e2acf
Delete changelog files based on PR 38585 (#38597)
Delete changelog files for 38585

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-06-06 07:11:30 +07:00
Jorge A. Torres f11152c0bc Apply review suggestion 2023-06-05 18:48:41 -05:00
Jorge A. Torres 45025a9ad0 Fix assertion in HPOS unit test 2023-06-05 18:39:25 -05:00
Jorge A. Torres f6db2f92f4 Add changelog 2023-06-05 18:39:18 -05:00
Corey McKrill 8840e9e5e3
Add an admin notice about the upcoming change in PHP requirements (PHP 7.4 minimum) (#38604) 2023-06-05 14:36:24 -07:00
Chris Runnells a5bbe0ed7c
Add Core Profiler loading spinner (#38598) 2023-06-05 10:32:07 -10:00
Fernando Marichal f2aae0a71a
Fix editing Shipping methods auto-saving (#38431)
* Fix Shipping Methods auto save

* Add changelog

* Fix e2e tests

* Fix e2e tests

* Add `shipping_zone_remove_method`

* Fix `onDeleteRow`

* Fix lint

* Fix delete method

* Add confirmation prompt and error message

* Fix lint

* Fix js

* Add e2e test

* Fix tests
2023-06-05 13:07:21 -03:00
Ron Rennick d8e534410f
fix string + string for PHP 8.X (#38534) 2023-06-05 07:28:03 -03:00
Nestor Soriano 9e382be288
Add changelog file 2023-06-05 12:27:03 +02:00
Nestor Soriano 049d209e68
Add an admin notice about the upcoming change in PHP requirements
The minimum required PHP version will be 7.4 as of WooCommerce 8.2.
This adds a dismissable admin notice to PHP 7.3 users.
2023-06-05 12:25:27 +02:00