Commit Graph

10647 Commits

Author SHA1 Message Date
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
Corey McKrill 46f2beab29
Add changelog file 2023-06-06 16:36:29 -07:00
Corey McKrill d5c0fab66f
Stats: Add "all" searchby param to Customer report endpoints
Makes it possible to do a partial match search for customers across
name, username, and email, instead of having to choose one of those
fields.

Refs #33383
2023-06-06 16:29:49 -07: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
Tomek Wytrębowicz f569f333a1
Fix Layout Controller forwarding arrays from the URL query string. (#38593)
* Revert part of "Remove `qs` dependency from `woocommerce-admin` (#35128)"

This reverts Layout- and Filter-related changes from commit 00c151f9aa, reversing
changes made to eef417fe39.

Removes the fix (keeping the test) from https://github.com/woocommerce/woocommerce/pull/38542 as it's not needed for `qs`

Fixes https://github.com/woocommerce/woocommerce/issues/38582.

* Simplify the use of query params in `ProductTour`

* Add changelog entry
2023-06-05 04:55:20 -03:00
Chris Runnells 3ae3a0df8d Lint fixes 2023-06-02 15:08:33 -10:00
Chris Runnells 12a54f097f Add changelog entry 2023-06-02 14:28:43 -10:00
Chris Runnells 3082b21b1e Added ProfileSpinner component to display when Core Profiler assets are loading 2023-06-02 14:27:17 -10:00
Chris Runnells ac85cc2c59
Fix The Task Header Width in 2-Col Layout (#38585) 2023-06-02 14:09:10 -10:00
Jorge A. Torres 0e669470ef Add changelog 2023-06-02 12:47:03 -05:00
Jorge A. Torres 0c2809d970 Fix dynamic prop declaration warning in Tracks event code 2023-06-02 12:42:55 -05:00
Jorge A. Torres a338f50642 Fix dynamic prop declaration warning in admin menu code 2023-06-02 12:42:55 -05:00
Jorge A. Torres 1505c40bd8 Fix dynamic prop declaration warning in `WC_Order` 2023-06-02 12:42:55 -05:00
Jorge A. Torres 68b703cc9c Fix dynamic prop declaration warning in cart code 2023-06-02 12:42:55 -05:00
Ron Rennick 39dad76b08
Fix dynamic property declaration warnings in shipping code (PHP 8.2+) (#38569) 2023-06-02 14:36:14 -03:00
Jorge A. Torres 491aa8216c Fix dynamic prop declaration warning in `WC_Email` 2023-06-02 12:28:51 -05:00
Ron Rennick 2068738300
Fix dynamic property declaration warnings in gateway code (PHP 8.2+) (#38566) 2023-06-02 14:25:42 -03:00
Jorge A. Torres 1abb0874c3
Fix dynamic property declaration warnings in HPOS code (PHP 8.2+) (#38565)
* Fix typo in variable name

* Remove unnecessary instance var from CustomOrderTable migration files

* Add changelog
2023-06-02 12:24:01 -05:00
Ron Rennick a4bb76a573
Support values written in exponential notation for HPOS migrations. (#38561) 2023-06-02 13:21:33 -03:00
Jorge A. Torres 48385351b1 Add changelog 2023-06-02 11:03:15 -05:00
Jorge A. Torres 345d99e1c1 WCAdmin fixes 2023-06-02 11:03:07 -05:00
Jorge A. Torres 22e8217220 PHPCS fixes 2023-06-02 09:24:07 -05:00
Jorge A. Torres c3f2ff0714 Add changelog 2023-06-02 09:24:07 -05:00
Jorge A. Torres 59ea67768c Fix ‘dynamic property declaration’ warning in `WC_Countries` 2023-06-02 09:24:07 -05:00
Jorge A. Torres 88618ca07a Fix ‘creation of dynamic property’ warnings for shipping methods code 2023-06-02 09:24:07 -05:00
Adrian Duffell c477fe852b Add changelog 2023-06-02 21:59:56 +08:00
Adrian Duffell bb2fcce173 Update task header max width
Fixes a bug where on 2-col layouts, text was overlapping the image because the overall container size is less than 500px.

75% is the equivelent of 500px for single-col layout.
2023-06-02 21:51:32 +08:00
Rua Haszard 61324ccd4f correct @since version and clarify changelog 2023-06-02 15:17:42 +12:00
Rua Haszard 8fbfa57798 remove `contextual notice` experiment, can use inline notice Gutenberg component 2023-06-02 15:11:45 +12:00
Maikel David Pérez Gómez abcedbefe0
[MVP QA #1] Visual: spacings (#38325)
* Update the margin-left on the buttons in the top bar from 16px to 8px

* On mobile, the left and right body margins should be 32 px

* The inner padding in the tab in the top bar should be 12px, not 16px

* In the edit product link modal, let's set this modal’s width to 650 px and remove the line separating the header from the contents

* All modals should now have 8 px window radius

* In the feedback form, can we fix the buttons at the bottom

* The help icon in checkboxes small, detached from the item label, and vertically misaligned. Left margin of 4 px, no vertical adjustment; somehow it has a -2px set for the top margin)

* Fix block-editor-block-contextual-toolbar top position

* When the product is in a draft state, the button in the top bar should say Add, not Save. It should change into Update once it's published on the store

* Fix layout margin top

* Add ection support for blockGap and set title and description to optional

* Remove non needed control field margin bottom

* Fix schedule sale block spacing

* Remove non needed control field help text margin bottom

* Remove the sub section outer spacing

* Move pricing fields into a sub section block

* Fix collapsible-contet margin top

* Remove invalid inner block layout spacing

* Wrap sku, stock toogle and quantity within a sub section

* Group inventory advance section inner blocks into a sub section

* Fix linter error

* Add changelog files

* Fix php lint error

* Change unit names to fit GB definitions
see: b2c16f3c68/packages/base-styles/_variables.scss\#L31-L41
2023-06-01 13:56:31 -04:00
Jorge A. Torres e14bfd46d7 Add changelog 2023-06-01 11:55:04 -05:00
Jorge A. Torres d8b6add2a3 Fix dynamic property declaration warnings in gateway code 2023-06-01 11:55:04 -05:00
github-actions[bot] 49383a5be2
Delete changelog files based on PR 38433 (#38554)
Delete changelog files for 38433

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-06-01 08:28:12 -05:00
Vedanshu Jain 01368cef58 Add changelog. 2023-06-01 18:08:26 +05:30
Vedanshu Jain ab9630b43a Coding standard fixes. 2023-06-01 18:07:33 +05:30
Vedanshu Jain cece0a5bf5 Fix for migrating orders where values are in exponential notation. 2023-06-01 18:04:06 +05:30
Albert Juhé Lluveras 76af1aa551
Update WooCommerce Blocks to 10.2.2 (#38545) 2023-06-01 10:33:59 +02:00
Vedanshu Jain 25843a9baf
[HPOS] Add properties and methods for detecting order admin screens more easily (#38417) 2023-06-01 12:07:16 +05:30
Vedanshu Jain 404ea4dc4d
fix Unsupported operand string * float (#38532) 2023-06-01 11:21:55 +05:30
Barry Hughes 356afd3388
Add endpoint to get SSR (#38433) 2023-05-31 16:46:40 -07:00
Sam Seay 664468f51a
Add a new plugin to the monorepo for the docs project (#38406) 2023-06-01 10:21:33 +12:00
Ron Rennick ffc58145f0
Hide HPOS plugin incompatibility warning from users with no 'activate_plugins' perm (#38535) 2023-05-31 15:53:31 -03:00
Ron Rennick ba57d8da29
ensure parameter datatype for array_slice (#38529)
* ensure parameter datatype for array_slice

* add phpdocs to existing filters

* fix spacing

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-05-31 13:18:57 -05:00
Matt Sherman f0e6802f2a
Load custom editor-only blocks in the block-based product editor (#38495) 2023-05-31 13:14:00 -04:00
github-actions[bot] a80c68fb4b
Delete changelog files based on PR 38449 (#38454)
Delete changelog files for 38449

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-05-31 10:06:17 -05:00
github-actions[bot] c7b16f1acc
Release: Remove 7.8 change files (#38404)
Delete changelog files from 7.8 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-05-31 10:05:03 -05:00
jonathansadowski 14a53c2dd4
Remove change file from 38441 (#38464)
Delete add-core-profiler-business-location copy
2023-05-31 10:04:27 -05:00
github-actions[bot] 91095db43a
Delete changelog files based on PR 38542 (#38544)
Delete changelog files for 38542

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-05-31 10:04:14 -05:00
Denis Dvali 07f662ecf8 - Logic to submit SSR data to WooCommerce.com.
- Allow request SSR  only if user has permissions to manage WooCommerce.
2023-05-31 17:01:11 +04:00
louwie17 7d4f65b8c7
Fix save settings error within Analytics (#38542)
* Filter out undefined query params

* Add changelog
2023-05-31 09:35:54 -03:00
Ron Rennick 84a62ced27
cast url to string for str_replace (#38530)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-05-31 12:25:21 +02:00
Sam Seay b076a7b521
Fix linter issues and update Syncpack (#38523) 2023-05-31 11:45:10 +12:00
Jorge A. Torres 8d02566d9c Add changelog 2023-05-30 15:10:36 -05:00
Jorge A. Torres 700a3114cd Do not show HPOS incompatibility warning to users with no access to the plugins screen 2023-05-30 15:10:32 -05:00
Ron Rennick 8c9ff70c33 fix string + string for PHP 8.X 2023-05-30 16:35:56 -03:00
Ron Rennick dd04184dd5 fix Unsupported operand string * float 2023-05-30 15:25:28 -03:00
Tomek Wytrębowicz 1c7c99636e
Reduce code duplication in Report Controllers (#38048) 2023-05-30 12:53:30 +02:00
Ilyas Foo edf95bf3f4
Update shipping partner suggestions to use data from API (#38457)
* Added shipping partner suggestions data handling in JS

* Add woocommerce services real info

* Add dynamic layout components, remove unused JS, added images to proper asset paths

* Changelog

* Update changelog and removed unused variable

* Remove console.log

* Lint fix

* Add shipping methods module in woocommerce/data

* Update data usage

* Revert "Added shipping partner suggestions data handling in JS"

This reverts commit 6a87ef2658.

* Lint fix
2023-05-30 15:56:32 +08:00
RJ ab18828e84
add: core profiler business info page (#38412)
* add: core profiler business info page
2023-05-30 15:05:38 +08:00
Chi-Hsuan Huang 953a8f5c30
Make option API fail when using a disallowed option name in non-produciton environments (#38388)
* Make option API fail when using a disallowed option name in non-produciton environments and update permission list

* Add changelog

* Change Option API deprecated notice version to WC 6.3
2023-05-30 09:07:29 +08:00
Maikel David Pérez Gómez b0ac1607b9
View should scroll to the top when navigating between tabs (#38484)
Override the interface skeleton container so it can be scrollable
2023-05-29 15:28:50 -04:00
Ron Rennick 98a1ba3174
Maybe default the selected state as the first one when it's "*" (#38469) 2023-05-29 16:02:41 -03:00
Moon 6946ef384a
Core Profiler - Add extensions page (#38405)
* Initial design impl. without the full functionality

* Delete unused icons

* Add is_installed and plugins_page_skipped

* Add plugin-card component to render an installable plugin

* Implement plugins page

* Add loaders for plugins

* Add changelog

* Remove unused type

* Add changelog

* Remove unnecessary return statement

* Add obw/core-profiler

* Replace extensions with plugins

* Temp -- use window.location.href for Woo Home redirection

* Minor: code refactor

* Refactor isntallAndActivatedPlugins

* Skip plugins page when there is no available plugin

* Apply mobile styles

* Update plugins/woocommerce-admin/client/core-profiler/components/plugin-card/plugin-card.scss

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

* Update plugins/woocommerce-admin/client/core-profiler/components/plugin-card/plugin-card.scss

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

* Update plugins/woocommerce-admin/client/core-profiler/style.scss

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

* Bold errored plugin name

* Fix checkbox alignment

* Update changelog

* Fix object type for formatToParts function

* Fix lint issues

* Fix CSS lint issues

* Fallback to en-US when locale is not available

* Fix error with siteLocale

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-05-29 07:45:30 -07:00
Fernando Marichal 5e3fe64598
Fix RIM rules processor (#38312)
* Fix url comparison.

* Add changelog

* Fix lint

* Fix `process` function

* Fix `contains` switch

* Create class "PrepareUrl"

* Fix "PrepareUrl"

* Fix "compare" and "process"

* Fix "process"

* Add readme and changelog

* Refactor OptionRuleProcessor

* Fix lint

* Fix conditional

* Add unit tests

* Fix lint
2023-05-29 09:29:02 -03:00
Chi-Hsuan Huang 340d74cdba
Update woocommerce_suggest_jetpack filter description (#38501)
* Update woocommerce_suggest_jetpack filter description

* Add changelog

* Update filter description
2023-05-29 15:21:24 +08:00
Christopher Allford 230bc04050
Updated `wp-env` To 8.0.0 (#38440) 2023-05-26 15:48:48 -07:00
Moon f3a515889c
Core Profiler - replace install-async with install-activate-async (#38434)
* Change install-async to install-activate-async

* Add changelog

* Add comment for activated function

* Fix tests and rename install-activate-async to install-and-activate-async

* Rename callback function to static
2023-05-26 13:34:54 -07:00
ajayghaghretiya-multidots 0780386610
Fixed import and visibility tax values to lowercase (#33820)
* Fixed import and visibility tax values to lowercase

* Minor fixes

---------

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-05-26 13:23:35 -05:00
Scott Kingsley Clark 7feda5e4dd
Bring in code suggestions from Ron
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
2023-05-26 12:53:00 -05:00
Ron Rennick bf77b4c022
[Fix] Undefined array key 1, 2, 3 when using list to extract cookie values. (#38294) 2023-05-26 13:28:34 -03:00
Ron Rennick 73c8b91b6f
Add changelog file 2023-05-26 12:33:41 -03:00
Nathan Silveira c44ee9649f
Filter by date_paid and date_completed on list table orders (#38428)
* Filter by date_paid and date_completed on list table orders based on configuration

* Use separate query param 'order_date_type' to filter orders

* Add clarifying comment

* Add missing phpcs ignore

* Refactor to use 'm' and 'order_date_type' query parameters
2023-05-26 05:19:01 -03:00
Rua Haszard bb79e28cf6 make all params optional (except body text) and conditonally render button 2023-05-26 11:02:43 +12:00
Rua Haszard ff89bfda40 tidy / polish new order metabox hook:
- rename for consistency with related hooks
- add `$order` param as will likely be useful to clients
- document in docblock
- remove wrapper div
2023-05-26 10:49:34 +12:00
Rua Haszard 4c9df162ce fix parameter order – consistent with docblock, group soon-tobe-optionall button params 2023-05-26 10:40:20 +12:00
Moon 2f6ff0f3e6
Core Profiler - Add obw/core-profiler to the extensions endpoint (#38418)
* Add obw/core-profilers

* Added name fields to all plugins

* Added icons for jetpack and woocommercer-services

* Add changelog

* Fix lint issues
2023-05-25 13:20:39 -07:00
Scott Kingsley Clark 4eea158c82
Rename changelog/fix-default-selected-state-for-country to plugins/woocommerce/changelog/fix-default-selected-state-for-country 2023-05-25 15:17:27 -05:00
Scott Kingsley Clark c32c133235
Remove extra tabs 2023-05-25 14:32:49 -05:00
Scott Kingsley Clark 839bc0ea18
Maybe default the selected state as the first one when it's "*"
When WC is provided only the country for the option `woocommerce_default_country` then it will fail to select a default state within the listed states.

Try this by manually setting `woocommerce_default_country` to "US" and you will see it selects the first country in the list instead of the first state within that country.

This only happens for countries that have states like US and CA for instance.
2023-05-25 14:28:05 -05:00
Ron Rennick c045584248
Revert "Add REST API Products featured image" 2023-05-25 14:44:49 -03:00
Albert Juhé Lluveras 94d8b54de6
Update WooCommerce Blocks package to 10.2.1 (#38449) 2023-05-25 16:02:58 +02:00
RJ 80f6d0a6a6
add: wccom migrate link in nux (#38441)
* add: wccom migrate link in nux

* Update plugins/woocommerce-admin/client/profile-wizard/steps/business-details/flows/selective-bundle/style.scss
2023-05-25 20:25:03 +10:00
louwie17 4db856db05
Add declare compatibility functions to beta tester (#38393)
* Add declare compatibility for custom order table and product block editor features

* Add changelog

* Fix PHP lint errors
2023-05-25 05:06:06 -03:00
Fitim Vata 00b96fb940
Merge branch 'woocommerce:trunk' into trunk 2023-05-25 09:46:16 +02:00
Chi-Hsuan Huang af26209886
Update "Set up additional payment options" task view & complete logic (#38273)
* Cache WooCommercePayments task is_complete() result

* Update Set up additional payment task view logic

* Add changelog

* Update additional payment task view & complete logic

* Add changelog

* Fix lint and view logic

* Fix lint

* Fix lint

* Update payment task section heading logic
2023-05-25 12:24:15 +08:00
Rua Haszard 27e2f7b334 prototype contextual notice component – php func, template, and css 2023-05-25 16:01:44 +12:00
Rua Haszard 43c7212f53 Add fake but informative changelog to appease the pre-commit hooks. 2023-05-25 14:36:09 +12:00
Corey McKrill d6eab3615c
Add unit tests 2023-05-24 16:27:04 -07:00
Corey McKrill ed2013d933
Add changelog file 2023-05-24 16:23:45 -07:00
Corey McKrill 1e40699ed2
Add OrderUtil methods to check for specific order admin screens 2023-05-24 16:23:44 -07:00
Corey McKrill 83f3dae429
Use container class to retrieve orders page controller
This ensures that the instance of the page controller class that
is used to set up the HPOS order admin screens is accessible and has
all its properties set correctly for use with the new is_order_screen
method.
2023-05-24 16:23:44 -07:00
Corey McKrill 498c08592a
Add method is_order_screen to HPOS PageController class 2023-05-24 16:23:44 -07:00
Corey McKrill 1f42f3f17b
Add missing post_type value to WP_Screen for HPOS order screens 2023-05-24 16:23:44 -07:00
github-actions[bot] 8bd49ad2ae
Prep trunk for 7.9 cycle (#38402)
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2023-05-24 17:34:49 -05:00
Denis Dvali a946d4ec2a Merge branch 'trunk' into add/ssr-report-endpoint
# Conflicts:
#	plugins/woocommerce/includes/wccom-site/class-wc-wccom-site.php
#	plugins/woocommerce/includes/wccom-site/rest-api/endpoints/class-wc-rest-wccom-site-installer-controller.php
2023-05-24 21:54:09 +04:00
Matt Sherman 014644895e
Don't show confirmation message when removing a non-variation attribute from a product (#38386) 2023-05-24 12:41:45 -04:00
Joshua T Flowers 353e01eb65
Tweak typography and element spacing in product editor (#38351)
* Update header font size

* Remove icons from sections

* Update radio block label and spacing

* Make checkbox tooltips larger and vertically align

* Update description colors

* Update h4 font sizes in editor

* Add changelog entry

* Add core changelog entry

* Handle initial design feedback

* Remove copy of assets in client webpack config
2023-05-24 10:11:00 -04:00
Rua Haszard 928783be8b add a hook to allow extenders to add notices or content after payment details on order edit screen 2023-05-24 14:57:56 +12:00
Ethan Clevenger d6931f316e
Update deprecated jQuery ready calls (#37320)
* Make `ready` call jQuery 3 valid

* Another call during setup.

* Add changelog.

* Trigger CI

---------

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2023-05-23 17:40:11 -05:00
Corey McKrill 684baa698a
Enable running phpcs-changed locally against a branch (#38085)
* Add lint-branch.sh

* Add doc block and make var name more explicit

* Add changelog file

* Update composer's lint and lint-staged scripts

It turns out that using single brackets for a test doesn't work
sometimes when the variable contains spaces or multiple items.
Double brackets handles this better, so should make the scripts more
robust.

* Use double brackets in lint-branch script

Using double brackets for a test is more robust and may be able to
handle some cases that single brackets can't, such as a variable that
contains spaces or multiple items.

Note that this also required updating the shebang at the top of the
script file from `sh` to `bash` since double brackets is a syntax
introduced in Bash.
2023-05-23 08:29:16 -05:00
Matt Sherman 87a8f45b5d
Fix spelling errors in Remote Inbox Notifications Transformers documentation (#38387) 2023-05-22 06:07:32 -04:00
Chi-Hsuan Huang 4547922f3f
Add core profiler user profile page (#38328) 2023-05-22 11:21:16 +08:00
Moon 6d4014042b
Add woocommerce_suggest_jetpack filter to exlude Jetpack suggestion in OBW (#38286)
* Add filter for free extensions endpoint

* Add changelog

* Add filter doc

* Support woocommerce_suggest_jetpack filter to exlude Jetpack

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

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

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-05-21 16:07:01 -07:00
nigeljamesstevenson ff50a69256
Remove the unnecessary `daily.playwright.config` (#38336) 2023-05-20 00:49:07 +01:00
Matt Sherman 08d7c24298
Fix race condition when rendering product attributes tab empty state (#38354) 2023-05-19 19:15:06 -04:00
Corey McKrill 4791f03b47
Implement admin-side order edit lock for HPOS orders (#38230)
This PR adds support to HPOS for order edit locking in the admin (similar to what posts and custom post types get by default). Specifically, the following is implemented:

* The lock is stored in order meta for interoperability with WP's implementation.
* Orders that are being edited by a user other than the current one will appear with a lock icon next to them in the list table. This lock icon/status is updated live via heartbeat with no page refresh necessary.
* When opening an order that is being edited by another user, a warning will be displayed, with the ability to take over the order:
* When someone has taken over an order you're editing, you'll get a warning about it automatically via heartbeat (no page refresh involved)

Fixes #37108
2023-05-19 15:50:08 -07:00
Nathan Silveira 5723f436cd
Add `wcadmin_settings_change` tracks event to shipping fields (#38305)
* Call update_option and update_options in shipping_zone_add_method

* Add new hook 'woocommerce_update_shipping_setting' to settings tracking

* Add tracking for shipping_zone_add_method

* Add tracking to shipping_zone_methods_save_changes

* Add changelog

* Update hook name and track modified option

* Prevent options from being added twice to array
start fixing php sniff issues

* Add docblocks

* Remove empty space

* Add docblock for parameter

* Fix lint issue

* Fix code introduced by mistake
2023-05-19 16:05:07 -03:00
Nathan Silveira ef0a32ff48
Reload page when toggling new-product-management-experience (#38348)
* Add callback to reload page when togglint new-product-management-experience

* Add changelog

* Implement reload for product-block-editor and code review suggestions
2023-05-19 14:57:51 -03:00
Maikel David Pérez Gómez ebf0b92960
Use feature the new feature flags engine to guard the access to the new product blocks experience (#37122)
Unregister the product-block-editor feature flag from WC Admin Test Helper, and enable product block editor feature.
2023-05-19 12:53:55 -04:00
Nathan Silveira 869b897ddd
Rename tracks event `product_attributes_add` to `product_attributes_save` on the product page and update attributes (#38278)
* Change attributes of tracks event product_attributes_add

* Don't send used_for_variations_count if it's not variable product type

* Explicitly add null values in product_attributes_add when the attribute is sent on the other call

* Rename product_attributes_add on the product page to product_attributes_save
Fix inverted local and global attributes count
Remove unnecessary parameters
Refactor code

* Update changelog
2023-05-19 12:44:54 -03:00
nigeljamesstevenson 67a583d9a8
Remove wp-env workaround (#38326) 2023-05-19 16:14:55 +01:00
Vedanshu Jain 048778a72b
Support strict SQL modes in HPOS migration that dont allow zero date (#38332) 2023-05-19 16:57:50 +02:00
nigeljamesstevenson f903feb741
Break down `create-variable-product` spec into smaller files (#38335) 2023-05-19 15:38:41 +01:00
Mike Jolley 28c72e81c4
Remove the global wc-cart-fragments enqueue (#35530) 2023-05-19 13:53:41 +01:00
Matt Sherman ab770510c1
Always show product variations empty state with message when there are no "used for variations" attributes (#38358) 2023-05-19 08:37:22 -04:00
Matt Sherman 2992e22507
Show correct confirmation message when removing an attribute from a product (#38355) 2023-05-19 08:27:47 -04:00
nigeljamesstevenson c99d60647e
E2e/gutenberg latest nightly 0 (#38287) 2023-05-19 12:24:08 +01:00
Chi-Hsuan Huang fc493c41ef
Remove sample data from product templates (#38343)
* Remove sample data from product templates for product task

* Add changelog

* Update product templates

* Remove unused columns from product templates and set Published to -1
2023-05-19 19:04:15 +08:00
Peter Fabian 862a947d7c
Install/update: Make the DELETE in 2 queries instead of 60+ (#37472) 2023-05-19 12:35:37 +02:00
Ashwin Parthasarathi ee31067f8f
Dev/37219 add hook to remove order items (#37822) 2023-05-19 12:10:11 +02:00
Jorge A. Torres f94ef3aa0a Add tests 2023-05-18 17:33:24 -05:00
Jorge A. Torres 0d4fd536b8 Move EditLock to correct folder 2023-05-18 17:33:24 -05:00
Jorge A. Torres 7b2afeb381 Improve styles for edit lock icon 2023-05-18 17:33:24 -05:00
Jorge A. Torres 4025c07097 Add changelog 2023-05-18 17:33:23 -05:00
Jorge A. Torres 5dd84a5fe6 Integrate edit lock into edit order screen 2023-05-18 17:33:23 -05:00
Jorge A. Torres ead99659e8 Integrates edit locking into the orders list table 2023-05-18 17:33:23 -05:00
Jorge A. Torres 4a11c03083 Remove ‘_edit_lock’ from internal datastore keys 2023-05-18 17:33:23 -05:00
Jorge A. Torres cc385bf16d fixes to css list table 2023-05-18 17:33:23 -05:00