Commit Graph

9084 Commits

Author SHA1 Message Date
Gan Eng Chin 6c127d70c8
Add dummy data for testing. 2022-12-14 20:11:40 +08:00
timur987 4ac1d822ac
Update In-App Marketplace tour wording (#35929) 2022-12-14 10:59:42 +03:00
Chi-Hsuan Huang 5786da4030
Disable TikTok in OBW (#35924)
* Disable TikTok in the OBW

* Add changelog
2022-12-14 15:40:51 +08:00
Chi-Hsuan Huang 679e875bd2
Fix ellipsis dropdown is hidden in task list (#35949)
* Fix the ellipsis dropdown menu is mostly hidden within the task list

* Add changelog
2022-12-14 13:53:52 +08:00
Chi-Hsuan Huang 9070cff9c5
Fix wrong query param in onboarding product api call (#35926)
* Fix wrong query param in onboarding product api call

* Add changelog

* Fix lint
2022-12-14 13:34:37 +08:00
Paul Sealock 884d3f4237
Revert "Delete changelog files based on PR 35669" (#35960)
Revert "Delete changelog files based on PR 35669 (#35945)"

This reverts commit 97784693ab.
2022-12-14 12:36:00 +13:00
Joshua T Flowers e1aabf2d9d
Add product variations list to new product management experience (#35889)
* Add product variations section

* Add variations list

* Add util to get product stock status

* Add variation specific attribute type

* Add currency code to header column

* Fix up variations header width

* Add variations loading state

* Add changelog entries

* Convert spaces to tabs

* Fix status typo

* Fix up return type for stock status
2022-12-13 15:29:05 -08:00
Gan Eng Chin 6b80109754
Code refactor with RecommendedChannelsList. 2022-12-14 02:07:35 +08:00
Gan Eng Chin 4a2205bcd1
Display recommended channels in a collapsible list in Channels card. 2022-12-14 01:13:00 +08:00
github-actions[bot] 51c33fa351
Delete changelog files based on PR 35780 (#35794)
Delete changelog files for 35780

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-12-13 10:25:16 -06:00
Joshua T Flowers 4eacc67501
Add product tabs to product layout (#35862)
* Add product form tabs to layout

* Move product sections to respective tabs

* Add tab styling

* Add changelog entry

* Scroll to top on tab change

* Update font weight on active or inactive tabs

* Add blank EOL
2022-12-13 08:13:12 -08:00
Gan Eng Chin 9963fd07ab
Display description and button based on channel setup status in Channels card. 2022-12-13 23:23:13 +08:00
Gan Eng Chin f713c01f56
Add more properties into InstalledChannel type. 2022-12-13 23:22:27 +08:00
Gan Eng Chin e6e6dc19ef
Display issue status in Channels card. 2022-12-13 22:47:16 +08:00
Jorge A. Torres 4f692a51d2
[HPOS] Improve handling of "visible" statuses in orders list (#35370) 2022-12-13 15:39:05 +01:00
Gan Eng Chin 437ebb20a8
Display sync status in Channels card. 2022-12-13 21:36:09 +08:00
Gan Eng Chin 02ce7cccc5
Modify PluginCardBody to accept className, and change description type. 2022-12-13 21:35:01 +08:00
Fernando Marichal e4f6c468cb
Automatically show attributes in Variations (#35807)
* Automatically show attributes in Variations

# Conflicts:
#	plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js

* Add changelog

* Use `attribute_taxonomy` instead of `wc-attribute-search`.

# Conflicts:
#	plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js

* Rename `add-attribute-used-for-variations`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-12-13 08:03:45 -03:00
Moon 131183597f
Fix RegExp used to filter the country list dropdown on the store details step (#35942)
* Add custom regexp for the country dropdown search

* Add changelog
2022-12-12 18:48:22 -08:00
github-actions[bot] 7f000f453c
Delete changelog files based on PR 35767 (#35812)
Delete changelog files for 35767

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-12-12 18:25:59 -06:00
github-actions[bot] 5f9fb16d66
Delete changelog files based on PR 35866 (#35870)
Delete changelog files for 35866

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-12-12 18:25:47 -06:00
github-actions[bot] 317e2dc164
Delete changelog files based on PR 35805 (#35879)
Delete changelog files for 35805

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-12-12 18:25:33 -06:00
Nico Mollet f4032654a3
Product import: Remove line breaks in keys (#35880)
* Product import: Remove line breaks in keys

Remove line breaks in keys, to avoid mismatch mapping of keys.

* Fix syntax

* PHPCS

* Changelog.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-12-12 16:21:13 -08:00
Luigi Teschio 6fe4afad14
Move CSS about notice outside of .woocommerce class scope (#35912) 2022-12-12 16:17:35 -08:00
github-actions[bot] 97784693ab
Delete changelog files based on PR 35669 (#35945)
Delete changelog files for 35669

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-12-12 17:54:51 -06:00
louwie17 613e58c061
CES exit prompt for product editing screens (#35728)
* Add exit page tracker logic and implement it for product pages

* Add changelog

* Fix lint errors and add comments

* Add ces_location prop

* Add mock to fix broken test

* Add CES exit page survey tests

* Fix a bug with React pages redirects and update actions

* Fix test

* Fix lint

* Add default inside location prop

* Remove exit prefix within action

* Address PR feedback and make sure its not triggered on save

* Update copy of exit feedback notice

* Add changelog

* Update name of param

* Fix lint error

* Use hasFinishedResolution vs isResolved in customerEffortScoreTracks
2022-12-12 09:56:28 -04:00
louwie17 d406eeb299
Fix react chunk build warnings (#35930)
* Reorganize imports to fix build warnings and remove overlapping css import

* Add changelog

* Update changelog
2022-12-12 09:43:34 -04:00
Vedanshu Jain 7187c8dff0
Split CALC_FOUND_ROW query into seperate count query for better performance (#35468)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2022-12-12 09:09:44 +01:00
James Allan e66d335542
Make set_order_props_from_data() protected rather than private (#35829)
* Make set_order_props_from_data() protected

This enables 3rd parties that extend the order datastore and need to set their own data. For example, Subscriptions

* Add changelog entry

* return set_order_props_from_data to private visibility

* Make init_order_record and get_order_data_for_ids protected

Following feedback here: https://github.com/woocommerce/woocommerce/pull/35829#issuecomment-1340528244

* Update changelog entry

Co-authored-by: mattallan <matt.allan@automattic.com>
2022-12-12 12:53:31 +05:30
Gan Eng Chin 36cdf7fed5
Add changelog. 2022-12-10 02:41:24 +08:00
Gan Eng Chin be621df8da
Add more data for testing. 2022-12-10 02:29:58 +08:00
Gan Eng Chin a9010ffd68
Add InstalledChannelCardBody to Channels. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 92112e27a1
Add InstalledChannel type. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 7852448a7a
Use SmartPluginCardBody in Channels component. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 5da2385d41
Add SmartPluginCardBody component. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 542b26e346
Move and rename type Plugin to RecommendedPlugin. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 0229354da0
Rename file Plugin to InstalledPlugin. 2022-12-10 02:29:58 +08:00
Gan Eng Chin 56dbf53a35
Rename type Plugin to InstalledPlugin. 2022-12-10 02:29:57 +08:00
Gan Eng Chin 5cd1d0fe3f
Add CardHeaderDescription in Channels card. 2022-12-10 02:29:57 +08:00
Gan Eng Chin 995fb7e02d
Code refactor with CardHeaderTitle component.
This component will be used in other components later.
2022-12-10 02:29:57 +08:00
Gan Eng Chin a8c8be7c26
Use CenteredSpinner in Channels. 2022-12-10 02:29:57 +08:00
Gan Eng Chin 5216643465
Code refactor with CenteredSpinner. 2022-12-10 02:29:57 +08:00
Gan Eng Chin dc7a233cb1
Add Channels card into Marketing page. 2022-12-10 02:29:57 +08:00
Néstor Soriano 2cd799e76a
Add a states migrator helper method and migrate states for New Zealand and Ukraine (#35669) 2022-12-09 09:20:33 +01:00
Melebius 02fec371f4
Fix payment instruction location in on-hold email (#31880) (#31886)
* Fix payment instruction location in on-hold email
* Update template version tags.
* Changelog.
* Update version tag to 7.3.0.
* Update version tag to 7.3.0.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-12-08 09:17:50 -08:00
Néstor Soriano 0b4811d83e
Make HPOS feature and "Delete custom order tables" tool work nicely together (#35357)
* Make linter happy by (very painfully) introducing Yoda conditions.

* Change how the COT related tools work combined with the COT feature.

- Enabling the feature will now automatically create the tables
  if they don't exist already.
- In fact, enabling the feature is now the only way to create the tables.
- The "Delete tables" tool will be shown as disabled in the feature
  is enabled.

* Add changelog file

* Fix code sniffer issues
2022-12-08 07:12:16 -08:00
jonathansadowski be73733be4
Update stable tag and readme for 7.1.1 (#35883)
* Update changelog.txt

* Update stable tag in readme.txt
2022-12-08 08:31:15 -06:00
Peter Fabian fc4e28b33e
array_key_exists shall not be called on non array (#35598) 2022-12-08 09:40:12 +01:00
Barry Hughes 084abd9908
[HPOS] Avoid error noise during plugin activation (#35820)
Do not try to query for orders by type, if no order types are registered.

If DataSynchronizer::get_current_orders_pending_sync_count() is called very early in the request then order types may not yet have been registered. This can for example happen during plugin activation/installation.
2022-12-07 11:59:07 -08:00
Luigi Teschio 0a039a1f13
Update WooCommerce blocks package to 8.9.2 (#35805) 2022-12-07 17:01:27 +01:00
Nathan Silveira 493faac544
Add help tip for Product Image and Product Gallery meta boxes (#35834)
* Add help tip to Product galery meta box

* Changelog

* Remove admin_post_thumbnail_html filter from product screen

* Add jQuery to append a tooltip after 'Set product image'

* Add dynamic upload size

* Add guard in case setPostThumbnail doesn't exist
Refactor jQuery code for simplicity

* Run phpcbf

* Fix php linting

* Run lint again

* Make both tooltips with jQuery
Refactor DOM manipulation code
Remove PHP implementation

* Change span tabIndex to 0 to allow focus on screen readers

* Move code to meta-boxes-product

* Add descriptive comment on jQuery code that adds tooltips
2022-12-07 11:38:30 -03:00
Chi-Hsuan Huang 1fbe5d330d
Add @babel/plugin-proposal-class-properties to run storybook (#35867)
* Add @babel/plugin-proposal-class-properties to run storybook

* Add @babel/plugin-proposal-class-properties to webpack config and remove storybook env from babel config

* Add changelog
2022-12-07 22:26:02 +08:00
Adrian Duffell 0b3a0516d0
Fix installation error in Onboarding Wizard when plugin generates unexpected output (#35866)
* Update plugin activation check

This is refactored to test the plugin state instead of checking the API call result.

This is because WordPress can return an error despite the plugin activating correctly. The `unexpected_output` error, in one such case, when WordPress detects stray output upon activation. To workaround this, the plugin is checked for its active status directly.

* Add tests

* Add changelog

* Fix lint issues
2022-12-07 17:31:37 +08:00
Sam Seay ef746eae1e
WC Beta Tester - Don't run WC code if WC is not installed (#35742)
* Always check if wc_get_logger is available before calling it.
* Guard against other WooCommerce specific code.
2022-12-07 07:18:52 +13:00
rodelgc 93b6d358f4
Migrate merchant daily smoke tests to Playwright (#35492)
* Checkout files

* Remove reverted permalinks code

* Enable cron

* More accurate job names

* More accurate test summary title
2022-12-06 11:22:49 +08:00
Nathan Silveira 31773d4b06
Create ProductForm component to merge duplicated UI (#35783)
* Extract new component 'ProductForm', to reduce duplicated code between add-product-page and edit-product-page

* Add changelog

* Try to merge add-product-page and edit-product-page into a single product-page: running into some issues probably with the controller

* Revert "Try to merge add-product-page and edit-product-page into a single product-page: running into some issues probably with the controller"

This reverts commit bc30b67ef2.
2022-12-05 17:46:21 -03:00
Néstor Soriano 206b77b5be
Fix REST API orders query when HPOS is used (#35818)
* Fix REST API orders query when HPOS is used

The query wasn't working properly when 'search' or 'parent'
query string arguments were used and HPOS was enabled.

* Add changelog file

* PHPCS fixes.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-12-02 10:01:22 -08:00
louwie17 e7dd1a0be9
Add/35300 ces feedback product mvp (#35690)
* Add ability to show CES modal through share Feedback button

* Make use of showCesModal in footer

* Update CES action for share feedback

* Update changes to support second CES question

* Add changelog

* Address some PR feedback
2022-12-02 11:59:42 -04:00
louwie17 0e8fbe083d
Add/35129 product mvp ces (#35652)
* Add product mvp ces footer

* Add changelog

* Reset action option name after CES action

* Make sure we make use of cesAction

* Add close button

* Fix formatting

* Fix css styling issues

* Add icon to success notice

* Add product mvp CES hook and modify logic a little bit

* Update the CES product action name

* Address PR feedback and fix styling for smaller screens

* Add second question to CES product footer and update options

* Add changelog

* Fix lint error

* Fix tests
2022-12-02 05:35:47 -04:00
Néstor Soriano b7c5519b41
Fix product attributes lookup data and filter by attribute widget with non-ASCII named attributes (#34432)
This only fixes the classic widget, not the equivalent block.
2022-12-02 09:54:38 +01:00
Barry Hughes fee3e10445
Always output the min and max attributes for the quantity selector. (#35767)
Even if these are set to the same value (and so the quantity cannot be changed--which results in a readonly quantity selector) we must output them for compatibility with code (example: Composite Products) that expects them to always be present.
2022-12-01 11:08:10 -08:00
RJ 14ab611008
fix: woocommerce admin cart modal header clips header text (#35780)
fix: increased woocommerce cart modal margin
2022-12-01 08:03:58 +08:00
Philip e0450ebd1a
Update wc-account-functions.php (#32026)
* Update wc-account-functions.php

Correct order of single/plural translation strings to prevent confusion with translations and translators.

* Changelog.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-30 12:21:56 -08:00
Andrew 930532c2da
Fix Protected Directory Detection and Admin Notice (#33544)
* Fix Protected Directory Admin Notice

- make notice actually close when clicking "Dismiss"
- make unprotected directory detection smarter: not every /woocommerce_uploads/ page with content is a directory listing

* Unwind the change made to method `is_uploads_directory_protected()`.

Discussion here https://github.com/woocommerce/woocommerce/pull/33544/files#r910253861 relates. In essence, we felt it better to have more warnings prompting the user to evaluate if the directory is protected, than fewer warnings with an increased change of not flagging actual problems.

* Add changelog.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-30 12:21:12 -08:00
justasdobrovolskis d4f2212c8a
check if post_type exists (#34501)
* check if post_type exists

* Changelog.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-30 10:13:31 -08:00
Gan Eng Chin ec5092bd5a
Update logo icon for Google Listings and Ads in onboarding marketing task (#35732) 2022-12-01 01:35:19 +08:00
Maikel David Pérez Gómez 25a7c35cf4
Improve element stacking in modals on tablet and mobile (#35733)
* Add updated versions of sr-only and not-sr-only mixins

* Improve element stacking in modals on tablet and mobile

* Add comment suggestion

* Change sr-only for screen-reader-only which is more descriptive
2022-11-30 13:28:00 -03:00
Fernando Marichal 1e9fff35c0
Allow the user to select multiple images in the Media Library (#35722)
* Add multiple selection to MediaUploader

# Conflicts:
#	packages/js/components/src/media-uploader/media-uploader.tsx

* Fix README.md

* Add multiple select to image section

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/images-section.tsx

* Add changelogs

* Fix repeated images addition

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-30 10:40:41 -03:00
Fernando Marichal 716d5ab322
Move file picker by clicking card into the MediaUploader component (#35738)
* Fix `MediaUploader` component

* Fix storybook

* Fix image section

* Add changelogs

* Fix code comment

* Fix text

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-30 09:00:14 -03:00
louwie17 f16cfbc9d6
Add open on focus to attribute fields (#35758)
* Add experimental open menu on focus to attribute input fields

* Add changelog
2022-11-30 04:05:11 -04:00
Sam Seay 978604d0f1
Introduce live branches UI page to WooCommerce Beta Tester (#35643)
* Add basic classes to register the Live Branches page
* Add API endpoint to load live branch manifest
* TS/JS tooling, prettier tooling
2022-11-30 14:17:27 +13:00
Stefano Iachetta 4b07384574
Fix wrong version typo (#35473)
* Fix wrong version typo

* Fix "since" tag in docblock

* Add changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-11-29 11:32:27 -08:00
Maikel David Pérez Gómez 79566d7e6b
Add a bottom padding to the whole form (#35721) 2022-11-29 15:11:57 -03:00
Joel Thiessen 4db5c0d8cd
Add additional question to CES modal (#35680) 2022-11-29 08:15:58 -08:00
nigeljamesstevenson cfffb27c45
Update README.md (#35759)
* Update README.md

Updating readme to reference the correct directory location for the .env file

* add changelog file
2022-11-29 09:05:09 -07:00
Nathan Silveira 121bfe3a29
Add tracks event for "View product" and dismiss action after update (#35582)
* Record an event 'product_view_product_click' when the 'View Product' link is clicked after creating or updating a product

* Add product_view_product_dismiss tracks events (WIP, not currently working)

* Add changelog

* Fix whitespace in addEventListener and remove console.logs

* Change link tag id to be more specific and comply with CSS guidelines
Move HTML code out of translation function

* Run phpcs in class-wc-admin-post-types

* Add tinyMCE types to add global tinymce variable in typescript code

* Add additional data in getProductData

TODO: I'm not sure if it's possible, or if it makes sense, to include stock_quantity_update in the object

* Add code review suggestions, including:

* Create isElementVisible function to backfill jQuery implementation
* Fix wrong value for is_downloadable, is_virtual, manage_stock
* Fix wrong radix
* Update menu_order implementation
* Add missing ? to weight

* Add stock_quantity_update implementation which is not working as intended

Since the page reloads after product update, the initialStockValue is updated as well

* Remove stock_quantity_update property and adjust is_downloadable, is_virtual, and manage_stock for consistency
2022-11-28 22:01:10 -03:00
Chi-Hsuan Huang 1339586ab0
Surface Amazon Pay as "Additional Payment Options" for UK/EU/JP (#35726)
* Update payment rules to surface amazon pay as "Additional Payment Options" for UK/EU/JP

* Add changelog
2022-11-29 06:30:10 +08:00
Roy Ho 59a17b1b56
Deb/assets cleanup (#35748)
* Add assets clean up to build:zip

* Add changelog file
2022-11-28 12:18:10 -08:00
Mostafa Soufi 487e7d0031
Fix deprecated error in PageController (#35648)
* Fix deprecated error in PageController

* Add changelog

* Update plugins/woocommerce/changelog/2022-11-24-08-07-11-448089

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

* Update plugins/woocommerce/src/Admin/PageController.php

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

* Update plugins/woocommerce/changelog/2022-11-24-08-07-11-448089

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

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-11-28 11:12:25 -08:00
Kathy 185d3337ca
Introduce woocommerce_order_applied_coupon hook (#35616)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Closes https://github.com/woocommerce/woocommerce/issues/34473
2022-11-28 16:19:33 +01:00
Jamsheer 9fabda744a
Modified get_wp_plugin_id() (#35727)
* Modified get_wp_plugin_id()

* Changelog.

* Use strict comparison per project coding standards.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-25 16:22:11 -08:00
Maikel David Pérez Gómez 3857b51f30
Fix price field currency symbol position (#35718)
* Currency symbol is fixed on the left side of the price input field

* Currency symbol has a different color from the input field value (Gutenberg-700)

* Input value is aligned right

* On focus, we highlight the field's content so the user can quickly clear or overwrite the placeholder text

* On focus, the user can press the up and down arrow keys to increase or decrease the value by 1

* Add changelog

* Remove unnecesary stepUp function
2022-11-25 11:48:18 -03:00
Maikel David Pérez Gómez 410f06b8c8
Add a blank space between the emoji and the message within a notice popup (#35698)
* Add a blank space between the emoji and the message within a notice popup

* Apply comment suggestions

* Remove duplicated text in the snackbar message after publishing a product
2022-11-25 10:21:22 -03:00
Fernando Marichal 12121a40ee
Open file picker by clicking card (#35358)
* Add FormFileUpload component

* Add styles

* Add changelog

* Fix lint

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-25 09:07:54 -03:00
Shelmuk Vladimir 8cdacf3017
Add Denmark postcode validation (#35653) 2022-11-25 10:39:25 +01:00
Alba Rincón 6b8f03c047
Add support for the `Product by attribute` template (#35617)
* Add support for product attribute taxonomy template

* Add tests

* Add changelog

* Fix format

* Improve changelog

* Add current version to the template

* Add tests for product attribute

* Fix template version

* Fix linting errors

* Refactor tests

* Fix linting errors

* Improve test

* Add comments and fix test

* Fix linting errors

* Fix tests by creating product attribute

* Improve formatting and add return type

* Bump template version to the correct release
2022-11-25 08:42:34 +01:00
AnnaMag 49aa5e03fd
Update the summary placeholder text in the product management form. (#35717)
* Product management: change the product summary placeholder text.

* Add changelog

* Correct formatting
2022-11-24 17:11:04 -03:00
piinthecloud ee0a21e580
updated the FAQ expander to link to the new feature req board on woocommerce.com (#35696)
* updated the FAQ Feature Request expander to link to the new feature request board on woocommerce.com

* added campaign tags

* add changelog
2022-11-24 07:40:47 -08:00
Fernando Marichal 28f5616973
Fix the gap in the featured product checkbox (#35710)
* Fix style

* Add changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-24 12:15:15 -03:00
Barry Hughes f6edcbc024
Add tracking support for key HPOS options. (#35446) 2022-11-24 15:26:44 +01:00
Joshua T Flowers db737f2190
Add responsiveness to product form header (#35623)
* Update product title in smaller viewports

* Move secondary product actions to menu group on mobile

* Hide settings menu on smaller viewports

* Add changelog entry
2022-11-24 11:00:20 -03:00
Gan Eng Chin a811009a06
Add one-click installation for recommended extensions in multichannel Marketing page (#35542) 2022-11-24 21:46:08 +08:00
Jorge A. Torres 44ce3bd0c3
Make sure the `woocommerce` page hook name remains untranslated (#35695)
* Make sure the WooCommerce page hook is untranslated

This works around a WP core bug, and addresses compatibility issues where WC core or 3rd party code expect the pagename or screen ID for one of our submenu pages to remain fixed despite translations.

* Add changelog

* Make PHPCS happy
2022-11-24 04:16:56 -08:00
Kevin Brent f7f3f01be0
Fix attribute taxonomy sort order meta key (#34645)
Fix attribute taxonomy sort order meta key for improved consistency.

* whoops - close array for order meta key update

* Changelog.

* Update phpcs annotation.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-23 12:50:25 -08:00
Marco Almeida 085149ad82
Add $formatted_destination as an argument to the woocommerce_cart_no_shipping_available_html filter (#30723)
Add $formatted_destination as an argument to the woocommerce_cart_no_shipping_available_html filter.

Developers should be able to access the $formatted_destination variable directly in order to return a new string to the filter including that address.

* Add docblock and changelog for woocommerce_cart_no_shipping_available_html tweak.

* Bump version tag for cart-shipping template.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-23 11:22:51 -08:00
Joshua T Flowers 527249f754
Fix unread notes count in inbox panel (#35396)
* Mark note as read when viewing

* Show unread note count

* Add ability to fetch read or unread notes

* Count unread notes on server side to avoid pagination limits

* Add changelog entry

* Add data changelog entry

* Add check for note actions before checking length

* Add changelog entry

* Mark note as read after 3s delay
2022-11-23 08:52:46 -08:00
nigeljamesstevenson c35d62461e
Update/a2p Consolidate country data in api-core-tests (#35557)
* Consolidate country data

* update test data

* remove upper case files

* remove upper case files

* remove upper case files

* update country data tests

* countries states updates for local

* revert settings-crud.test
2022-11-23 08:04:37 -07:00
Roy Ho fd7c728689
Revert "Add pre build script to delete assets" (#35693)
Revert "Add pre build script to delete assets (#35627)"

This reverts commit 4770123fa3.
2022-11-23 06:38:28 -08:00
Kaushik Somaiya 102fabbee0
Fix missing tooltip in admin orders table. Fixes #33228 (#35638)
Co-authored-by: Kaushik Somaiya <kaushiksomaiya@Kaushiks-MacBook-Pro.local>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2022-11-23 12:06:27 +01:00
Jonathan Lane fd7fc355fa
Fix/e2e environment test failures (#35679) 2022-11-22 16:16:42 -07:00
Maikel David Pérez Gómez 29b9c691cd
Fix/unsaved prompt (#35657)
* Set initial values prop from reset form function as optional

* Fix unsaved modal propmt to not be shown during form submission

* Reset form on save draft and before navigation starts

* Add comments ssuggestions
2022-11-22 11:56:27 -03:00
Fernando Marichal 6ac092e498
Add tracks events to a few sections (#35262)
* Add tracks events

* Add changelog

* Add more tracks events

# Conflicts:
#	plugins/woocommerce-admin/client/products/fields/attribute-field/add-attribute-modal.tsx
#	plugins/woocommerce-admin/client/products/sections/product-shipping-section.tsx

* Fix name

* Fix duplicated event

* Add select as cover event

* Add cancel shipping class creation

* Rename tracks events

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/product-shipping-section.tsx

* Add const for tracks event name

* Rename event

* Rename events

* Remove `product_modal_new_shipping_class_cancel_button` trancks event

* Rename `product_add_first_attribute_button_click` event

* Fix method

* Fix confirmation modal events

* Rename `product_add_attributes_modal_add_button_click` event

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-22 11:30:44 -03:00
Sam Seay 03dbab0edd
Fix some bugs in syncpack configuration (#35651)
* Fix syncpack config

* Loosen the matched version for typescript eslint

* Add changelog entries

* Update lockfile
2022-11-22 12:06:47 +13:00
Roy Ho 4770123fa3
Add pre build script to delete assets (#35627)
* Add pre build script to delete assets

* Chain the script instead

* Add the cleanup dependency to turbo config

* Add assets cleanup for build zip command
2022-11-21 12:05:26 -08:00
louwie17 7ec3210b8b
Create attribute within the new product MVP (#35100)
* Add initial add new option

* Hook in create attribute modal to add attribute field

* Add unit tests for the create attribute modal

* Add extra test to attribute input field

* Add changelog

* Add custom attribute term input field and support for custom attributes

* Fix tets

* Add track for custom attribute creation

* Fix changes after merge conflict

* Revert one change

* Fix lint error

* Seperate out some logic and make use of null as empty object versus id: undefined

* Add isNewAttributeListItem helper function

* Make use of helper function for create new markup
2022-11-21 10:56:46 -04:00
github-actions[bot] 9c83a07145
Prep trunk for 7.3 cycle (#35621)
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-11-19 08:21:49 +13:00
github-actions[bot] fc187fbafe
Release: Remove 7.2 change files (#35632)
Delete changelog files from 7.2 release.

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-11-19 08:01:15 +13:00
Joshua T Flowers 6f7cc707c7
Remove welcome to woocommerce for store users note (#35342)
* Remove welcome to woocommerce store note

* Add changelog entry
2022-11-18 09:51:35 -08:00
Joshua T Flowers b2f66e3cf4
Add breadcrumbs to new product management experience (#35596)
* Add product breadcrumbs component

* Add breadcrumb styling

* Truncate breadcrumbs when more than 3

* Add tests around product breadcrumbs

* Add changelog entry

* Convert indentation to tabs

* Add key to mapped breadcrumb items
2022-11-18 09:51:01 -08:00
Nathan Silveira 6d4c1b3b8a
Adapt the width of the pricing fields (#35545)
* Add css class to change the input width based on the screen's width

* Changelog

* Move class from pricing-section.scss to product-page.scss and use breakpoint 960px mixin

* Move className from currencyInputProps to InputControl

* Improve changelog

* Move 'half-width-field' class to currencyInputProps instead of adding it manually for the two currency fields

* Add 'half-width-field' class to SKU and Shipping Class

Sent as a parameter to getInputProps and getSelectControlProps to avoid overwriting any additional className

* Update changelog
2022-11-18 13:03:10 -03:00
Maikel David Pérez Gómez dba6d337f7
Add a confirmation modal when the user tries to navigate away with unsaved changes (#35625)
* Add a confirmation modal when the user tries to navigate away with unsaved changes

* Add support for react router navigation

* Fix unit tests
2022-11-18 11:54:59 -03:00
Roy Ho 0f6942849f
Dev/add back asset sources (#35624)
* Copy scss files to build

* Add changelog
2022-11-18 06:14:25 -08:00
Joshua T Flowers ba91c94ca9
Check if blocks have been added to rich text editors before updating value (#35626)
* Check if blocks have been added to rich text editors before updating value

* Add changelog entry
2022-11-17 10:06:10 -08:00
Maikel David Pérez Gómez fc56dcf6e9
Add/35173 category field improvements (#35606)
* Add experimental open menu when user click the select control input element

* Open categories menu list when the user click the category field

* Fix linter error

* Move open menu from click to focus event

* Fix linter errors
2022-11-17 15:04:40 -03:00
Joshua T Flowers 233e23704f
Add product settings menu to new product management experience (#35592)
* Add icons

* Add classic editor url

* Remove welcome guide link and icon

* Add initial settings menu

* Fix up button styling

* Move product settings to its own folder

* Remove unnecessary registerPlugin call

* Use number type control for menu order field

* Add tests around product settings component

* Allow reviews by default on all new products

* Alphabetize product properties

* Add changelog entry

* Add data changelog entry

* Convert indentation to tabs

* Fix up scss linting errors

* Remove whitespace
2022-11-17 09:59:51 -08:00
Matt Sherman 19058ed17c
Fix the `wcadmin_product_update` Tracks event `menu_order` custom property value (#35605) 2022-11-17 10:32:27 -05:00
Adrian Duffell ba0994fda5
Deploy the stacked layout in the Products Task experiment (#35611)
* Deploy stacked layout in product task experiment

* Add changelog

* Remove unused import
2022-11-17 22:48:14 +08:00
Alex Pantechovskis baa1c120bc
Do not use $_POST directly in validate_checkout (#35329)
Avoid direct use of $_POST from within the validate_checkout() method.

* Changelog.

* Address some of the undocumented hook errors flagged by our linting check.

This does not address all of the undocumented hooks (there are many in this file), just the ones flagged by the GitHub Actions code sniff check. This is an effort to unblock the PR, which we otherwise cannot merge at present.

* Add missing `@since` tags (satisfy linter).

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-17 04:39:31 -08:00
Yehuda Hassine 9337b3b5a6
fix get customer tokens limit (#29850)
Make it easier to support many payment methods (within My Account > Payment Methods page).

* Update includes/class-wc-payment-tokens.php

Better backward-compatible by @jonathansadowski

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Add docblock for new filter `woocommerce_get_customer_payment_tokens_limit`.

* Add changelog.

Co-authored-by: Yehuda Hassine <yehuda@myinbox.in>
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-17 03:55:12 -08:00
SamirMahmudzade abcd2a799a
Update the Azerbaijani manat symbol AZN (#30605)
Update the Azerbaijani manat symbol AZN

* Rebase, update currecy symbol (from mathematical pitchfork to manat).
* Add changelog.
* Use Azerbaijani manat symbol instead of similar mathematical character.
* Update data crud test for the AZN currency symbol.
* Update currency settings for API tests.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-16 23:07:15 -08:00
louwie17 1550806efc
Add/34 create new category field modal (#35132)
* Add initial category field component with new typeahead

Move search logic to useCategorySearch hook

Add initial add new category logic

Add parent category field to add new category modal

Adding some debug changes

Update category control to make use of internal selectItem function of select control

Add changelogs

Update pagesize back to 100

Add placeholder

Empty placeholder

Fix input and icon sizes

Fix input underline

Add max height and scroll to category dropdown

Add sorting of category items

Auto open parents when traversing up the tree using arrow keys

Add several comments

Add some initial unit tests for the category field component

Add tests for useCategorySearch hook and fixed minor bug

Update styling and autoselect parent if child is selected

Fix styling issues for the select control dropdown inside a modal

Fix issue with creating new category with parent

Add function comment and fixed border styling

* Fix up some issues after the rebase

* Some small fixes for the Category creation

* Fix up some styling issues around the add-new-item

* Add changelogs

* Remove unneeded export of toggle button props

* Fix create category error and tests in attribute field

* Fix some minor bugs and styling changes that came up during PR feedback

* Fix tests

* Make use of $gap variable for css
2022-11-16 12:30:42 -04:00
Joshua T Flowers 7bff5cbb6b
Add product status badge to product form header (#35460)
* Add product status badge

* Update status method to return keys

* Add tests around product status

* Add styling to badge

* Add changelog entry

* Change product status keys to enum

* Add enum return type to product status function

* Fix up lint errors

* Convert indentation to tabs
2022-11-16 08:03:39 -08:00
Joshua T Flowers 2297787a4f
Add contextual product more menu (#35447)
* Add icons

* Add product more menu

* Add classic editor url

* Update header and more menu styles

* Update dropdown menu label

* Add changelog entry

* Remove welcome guide link and icon

* Remove errant import

* Remove unnecessary plugin registration
2022-11-16 07:02:45 -08:00
Maikel David Pérez Gómez 0482860c74
Fix bg color that was not covering the full page (#35476) 2022-11-16 10:39:56 -03:00
Daniel Mallory ad80ff7134
WCPay Experiment: Create an Inbox Note if user wants more info on WCPay (#35581) 2022-11-16 13:22:16 +00:00
Néstor Soriano 42d2260ca6
Fix custom_orders_table_usage_is_enabled returning true when HPOS feature is disabled (#35597)
* custom_orders_table_usage_is_enabled returns now false if feature is disabled

* Add changelog file
2022-11-16 01:03:45 -08:00
Joshua T Flowers 23ca8d6297
Add product title to header when available (#35431)
* Move shared product header components to separate file

* Fill header title with product name

* Create method to get product title

* Add tests around title

* Add changelog entry

* Remove unnecessary plugin registration
2022-11-15 11:19:58 -08:00
timur987 8dc954d54b
Feature: Add the In-App Marketplace Tour (#35278)
Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
2022-11-15 11:12:17 +01:00
Daniel Dudzic f9dacb78a6
FSE: Fix icon fonts not being loaded in the Site Editor (#35532)
* Site Editor: Fix WooCommerce icons in the Site Editor

* Site Editor: Fix WooCommerce icons not loading in the site editor.

* Add additional FSE theme check
2022-11-15 00:58:40 -08:00
Sam Seay 63242cfa62
Remove duplicated API code folder in woocommerce-beta-tester (#35549) 2022-11-15 13:58:45 +13:00
Matt Sherman 5b06618a6f
Add scheduled sale fields (#34538)
* Add scheduled sale fields to product form
* Close DateTimePickerControl's dropdown when blurring from input.
* Log when onChange is called for Controlled stories
* Handle when input changes occur but the end date is the same
* Fix DateTimePickerControl usage when uncontrolled
* Fix handling when blur happens before debounced onChange
2022-11-14 21:03:13 +00:00
Timstreep beb2871b8d
Update readme.txt (#35573)
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
2022-11-14 21:04:19 +01:00
Herman dda14302fa
Add/source param to get subscriptions call (#35051)
* Add source param for subscription endpoint calls

- Adds an optional $source argument to the WC_Helper_API::url() method
- Get URL of page making WC_Helper::get-subscripitonts() request and add a
  source arg to the WC_Helper_API::get() request made by that method
- Pass that source arg to the WC_Helper_API::url() methd from
  WC_Helper_API::get()

* Add changelog file

* Use sripos instead of preg_match in WC_Helper::get_subscriptions()

- Update "source" argument name across methods to "query_string" to be
  more generic
- Use separate variables to make it clear the URI of the requesting
  page, and the value passed as the source query string are different

* Add @param declaration to function comment

* Address PHPCS issues

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-11-14 05:52:35 -08:00
Alba Rincón efcbe197ea
Update woocommerce-blocks to 8.9.1 (#35564) 2022-11-14 11:33:10 +01:00
Jorge A. Torres bddb65699b
[HPOS] Implement "Empty Trash" functionality in list table (#35489) 2022-11-14 09:34:59 +01:00
nigeljamesstevenson 736593ef15
update/a2p update `api-core-tests` to run against both CI test env and JN (#35522)
* updates to allow tests to run against both CI test env and JN

* update customer data file

* comment uddates

* baseURL update

* update settings data

* Update plugins/woocommerce/tests/api-core-tests/playwright.config.js

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

* Update plugins/woocommerce/tests/api-core-tests/tests/customers/customers-crud.test.js

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

* Update plugins/woocommerce/tests/api-core-tests/playwright.config.js

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

* updates from code review

* remove erroneous space

* remove comments

* updates for Localhost, LocalWP and JN

Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
2022-11-10 16:23:28 -07:00
jonathansadowski 63f639b2b1
Post-7.1 / release prep for 7.2 (#35547)
* Update class-woocommerce.php for 7.2

* Update stable tag in readme.txt

* Update version in woocommerce.php

* Update version in composer.json

* Update version in package.json
2022-11-10 17:07:07 -06:00
jonathansadowski 57a5dd4b4e
Revert "Update php version to 7.4" (#35546)
Revert "Update php version to 7.4 (#35528)"

This reverts commit 0b52411ff7.
2022-11-10 16:47:19 -06:00
Panos (Panagiotis Synetos) 7cd1a03043
[HPOS] Move hook `woocommerce_before_delete_order` before `woocommerce_before_delete_order` (#35517)
🧑‍💻 Move hook woocommerce_before_delete_order before deleting order
2022-11-10 09:39:26 -08:00
jonathansadowski 0b52411ff7
Update php version to 7.4 (#35528)
* Update php version in woocommerce.php

* Update php version in readme.txt

* Create update-php-7.4
2022-11-09 10:53:08 -06:00
Nima ab8eca2733 Merge branch 'trunk' into feature/34548-multichannel-marketing-backend 2022-11-09 10:43:11 +00:00
Nima Karimi 6acd69e404
Multichannel Marketing - Core Library (#35099)
* Create channel interface and campaign value class

* Create MarketingChannels class

* Register MarketingChannels class in DI container

* Use the new MarketingChannels class to get the installed marketing extensions' data

* Use DI container to access InstalledExtensions class

* Add InstalledExtensions to the $provides array

* Hint that campaign cost should also indicate the currency

* Initialize the channels array

* Add unit tests for MarketingCampaign

* Add unit tests for MarketingChannels

* Add Price class to represent a price with currency

* Use Price class for marketing campaign's cost

* Define a constant to indicate the MCM classes exist

This constant will be checked by third-party extensions before utilizing any of the classes/interfaces defined for this feature.

* Create MarketingSpecs class to include WC.com API calls

* Remove WC.com API calls from Marketing class

And replace them with calls from MarketingSpecs class.

* Use the const from MarketingSpecs

* Fix MarketingChannels unit tests

* Add missing settings URL to the channel data

Co-authored-by: Nima <nima.karimi@automattic.com>
2022-11-09 13:41:18 +03:00
Alba Rincón 91da0a15df
Update WooCommerce blocks package to 8.9.0 (#35521) 2022-11-09 09:59:08 +01:00
Jorge A. Torres 082f318da4
[HPOS] Add order data store info to SSR (#35487)
Add info on order datastore (and sync) to SSR

* Add changelog

* Make PHPCS happy

* Update plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php

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

* Remove unnecessary import

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-11-04 11:35:19 -07:00
Peter Fabian 076f6f2839
Add missing Ukrainian Subdivisions to States.php (#35493)
Co-authored-by: Corey Gehrke <corey.gehrke@automattic.com>
2022-11-04 15:29:25 +01:00
Joshua T Flowers c62f9843b9
Remove the first downloadable product note (#35318)
* Remove first downloadable product note

* Add changelog entry

* Remove obsolete note
2022-11-03 13:13:01 -07:00
Joshua T Flowers ad1c49f9e4
Remove manage store activity from home screen note (#35320)
* Remove manage store activity note

* Add changelog entry

* Remove obsolete note
2022-11-03 12:27:09 -07:00
Joshua T Flowers a38a7df76c
Remove adding and managing products note (#35319)
* Remove adding and managing products note

* Add changelog entry

* Remove obsolete note
2022-11-03 12:25:42 -07:00
Joshua T Flowers e8db853ceb
Remove insight on first sale note (#35341)
* Remove insight on first sale note

* Add changelog entry
2022-11-03 09:48:20 -07:00
Joshua T Flowers a6ed0a0e36
Remove update store details note (#35322)
* Remove update store details note

* Remove deprecated tests

* Remove changelog entry

* Remove obsolete note
2022-11-03 09:47:50 -07:00
Joel Thiessen 5b1296fe45
Adding attribute edit modal for products MVP (#35269) 2022-11-03 08:20:29 -07:00
github-actions[bot] 1b0d8c077c
Delete changelog files based on PR 35480 (#35484)
Delete changelog files for 35480

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-11-03 09:25:02 -05:00
Vedanshu Jain dcafc4b5a5
Display correct order pending sync count on feature enabled screen. (#35480)
* Display correct order pending sync count on feature enabled screen.

* Add changelog.
2022-11-03 18:12:50 +05:30
Basti 8ef8a380e5
Fix version typo in form-login.php (#35479)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2022-11-03 12:25:29 +01:00
Barry Hughes 925432aebe
Admin redirects for HPOS URLs (#35463)
* Redirect COT/HPOS admin requests to the corresponding CPT screen, if COT is not authoritative.

* Tidy handling of query parameters.

* Linting fixes.
2022-11-03 15:59:15 +05:30
kkmuffme c561d7941d
Fix wrong return type get shipping tax (#35453)
Was documented as returning array, now it's documented as returning float (and the ourput is converted to float).
2022-11-03 11:08:14 +01:00
Chi-Hsuan Huang 76f99a482f
Cleanup and deprecate task properties and methods (#35450)
* Remove unused sectioned task code

* Remove section task type and update getVisibleTasks logic

* Clean up task list and deprecate methods/properties

* Add changelog

* Fix lint

* Remove snooze tests

* Remove snooze JS tests
2022-11-03 09:22:36 +08:00
Saif H. Hassan 3df6dcd6be
Libyan Dinar not formatted correctly (#35395)
Update and correct the symbol for Libyan Dinars.

* Update wc-core-functions.php

* Update settings.js

* Add changelog.

* Update API test `can view all currencies` re Libyan Dinar.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-11-02 17:28:47 -07:00
github-actions[bot] e92f95903b
Delete changelog files based on PR 35448 (#35475)
Delete changelog files for 35448

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-11-02 13:56:40 -05:00
Chi-Hsuan Huang 3fc0ee338e
Fix business details step fails to display when Gutenberg plugin is active (#35448)
* Fix business details tabs when Gutenberg is active

Fix business details tabs when Gutenberg is active

Fix business details tabs when Gutenberg is active

* Add changelog
2022-11-02 13:40:02 -05:00
Vedanshu Jain 1b5bc44c60 Add changelog. 2022-11-02 20:14:55 +05:30
Vedanshu Jain ed03beb173 Merge branch 'trunk' into pr/35107 2022-11-02 20:13:59 +05:30
nigeljamesstevenson 649c439ec4
Update/a2p array checks in api-core-tests (#35462)
* Update array checks

* add changelog file
2022-11-02 08:00:17 -06:00
Fernando Marichal d77f8fc5cd
Product creation experience: shortcut to add variation price (#34948)
* Add modal

* Add modal style

* Open modal

* Add validations

* Add button

* Add changelog

* Fix variations price setting

* Fix warning for variations without price

* Fix styles

* Change row actions

* Fix actions styles

* Fix error text

* Remove console.logs

* Add save after setting prices

* Modify modal copy

* Change modal button text

* Fix text

* Fix text

* Fix styles

* Fix button

* Fix code sniff errors

* Fix more code sniff errors

* Fix code sniff errors

* Fix comments

* Fix comment

* Fix lint

* Fix lint

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-02 09:31:52 -03:00
Chi-Hsuan Huang e60be03951
Fix invalid `wcadmin_install_plugin_error` event props (#35411)
* Fix invalid wcadmin_install_plugin_error props

* Add changelog

* Update docblock comments to fix lint

* Fix lint

* Update prop name
2022-11-02 15:55:41 +08:00
kkmuffme 84660ccf6f
Fix class name for class FirstDownlaodableProduct (#35383)
Spelling

Fix https://github.com/woocommerce/woocommerce/issues/35307
2022-11-02 10:21:50 +08:00
kkmuffme dc94b9b512
Fix missing use FQCN for WP_Error (#35305)
* add use WP_Error

phpdoc was not using FQCN for WP_Error, however use is preferred to FQCN anyway
Fix: https://github.com/woocommerce/woocommerce/issues/35304

* Revert "add use WP_Error"

This reverts commit ff62deb10020689f96722e10c5c86669a1454125.

* use FQCN in PHPDoc when using FQCN in code

* add changelog
2022-11-02 10:19:29 +08:00
Barry Hughes 2fcb28b5df
Add filter hook `handle_bulk_actions-woocommerce_page_wc-orders` (#35442)
Add filter hook `handle_bulk_actions-woocommerce_page_wc-orders` to the HPOS admin list table.

This is a duplicate of core WP hook `handle_bulk_actions-<SCREEN_ID>` and allows for custom bulk actions to be handled in the context of the admin list table for HPOS orders.
2022-11-01 15:36:11 -07:00
Joshua T Flowers c2473da79b
Remove insight first product and payment note (#35309)
* Remove InsightFirstProductAndPayment note

* Add changelog entry

* Remove obsolete note

* Fix yoda condition
2022-11-01 11:46:36 -07:00
nigeljamesstevenson c7282de4ee
update/a2p update shipping api-core-tests (#35332)
* update shipping api-core-tests

* merge in trunk to see if this resolves changelog issue

* comments updates
2022-11-01 08:04:20 -06:00
nigeljamesstevenson 9a7a75fdea
add/a2p product variations api-core-tests (#35355)
* add product variations api-core-tests

* add product variations api-core-tests

* comments updates
2022-11-01 07:55:29 -06:00
louwie17 ff2b06c9af
Add create attribute term modal (#35131)
* Add create attribute term modal

* Add back filter missed during rebase

* Add changelog

* Fix lint error

* Address some feedback from PR review

* Prevent first modal from closing if closing the second modal when clicking outside
2022-11-01 09:05:46 -03:00
jonathansadowski 24f6acdc9c
Remove change file for 35349 (#35443) 2022-10-31 17:46:29 -05:00
github-actions[bot] a7a7b5187f
Delete changelog files based on PR 35333 (#35439)
Delete changelog files for 35333

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-31 17:20:05 -05:00
github-actions[bot] f6f359e1cd
Delete changelog files based on PR 35402 (#35437)
Delete changelog files for 35402

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-31 17:18:44 -05:00
github-actions[bot] 1f0d4df8ed
Delete changelog files based on PR 35366 (#35435)
Delete changelog files for 35366

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-31 17:17:19 -05:00
github-actions[bot] 6b770820e9
Delete changelog files based on PR 35118 (#35433)
Delete changelog files for 35118

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-31 17:14:47 -05:00
github-actions[bot] 8bc69e755e
Delete changelog files based on PR 35428 (#35430)
Delete changelog files for 35428

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-31 17:09:20 -05:00
Joshua T Flowers e1ebabba29
Fix up rich text editor initial selection and add blocks (#35286)
* Fix double click toolbar behavior

* Fix initial block selection on editor load

* Add placeholder option to RichTextEditor

* Add image and video blocks

* Set toolbar height

* Allow inserter to be shown

* Allow media uploads in rich text editor

* Add changelog entries

* Fix media upload

* Check for existence of selected blocks before checking length

* Pass blocks to avoid race in detecting initially empty blocks
2022-10-31 14:36:54 -07:00
Joshua T Flowers 66370c823f
Add inventory advanced section (#35164)
* Add sold individually inventory option

* Add backorder purchase options

* Add margin around collapsible content areas

* Add changelog entry

* Add tests around inventory section

* Fix up checkbox props after rebase

* Check for disabled track quantity toggle

* Update manage stock test

* Fix nested radio control label margin
2022-10-31 14:36:33 -07:00
Barry Hughes 2355822ec5
Ensure the HPOS/COT order status correctly tracks the CPT order status (#35402)
Ensure the HPOS/COT order status correctly tracks the CPT order status (during manual order creation).

* Linting.
* Address coding standards (no need to prepare the query when there are no placeholders).
* Woops! Restore use of `$wpdb->prepare()`, add phpcs:ignore rule.
2022-10-31 14:12:14 -07:00
nigeljamesstevenson 1b2a94b030
add/a2p reports api-core-tests (#35388)
add reports api-core-tests
2022-10-31 14:01:21 -06:00
nigeljamesstevenson 613be5a990
add/a2p data api-core-tests (#35347)
* add data api-core-tests

* add newline to see if this resolves changelog issue

* add newline to see if this resolves changelog issue
2022-10-31 13:23:10 -06:00
jonathansadowski edb59aef4d
Update/blocks 8.7.5 (#35428)
* Update blocks to 8.7.5

* Add changelog file
2022-10-31 14:22:15 -05:00
Paul Sealock 19f0410bc1
PHPCS: Lint only changes (#35407)
Add `sirbrillig/phpcs-changed` to run PHPCS only on changes, not entire files
2022-11-01 07:53:01 +13:00
Néstor Soriano 11e22063ca
Exclude inactive plugins from the incompatible plugins view (#35333)
* Changes in the plugin-feature compatibility warnings:

- Show only active plugins in the "Incompatible with..." plugins view
- Show an empty page when the view is loaded and no Incompatible
  plugins are active (instead of listing all the existing plugins)

* Add changelog file
2022-10-31 17:11:06 +05:30
Vedanshu Jain 6c551b0cd6
Also support syncing for HPOS with stats table. (#35118)
* Also support syncing for HPOS with stats table.

* Add changelog.

* Fixup.

* More fixup.

* test commit by disabling importing admin test orders.

* Update get_items to work with HPOS.

* Modify tests to assert against invalid result.

* test commit for ci.

* Remove seperate test as its quite slow.

* Applied coding standards.

* Coding standards, part 2.
2022-10-31 14:33:18 +05:30
Vedanshu Jain 2c5d3d2acc
Check order type is set before returning to prevent notice. (#35349)
* Check order type is set before returning to prevent notice.

* Applied code standards.

* Remove type declaration since its not consistent with CPT datastore.

* Switch to a yoda condition (satisfy required linting check).

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-10-31 14:26:28 +05:30
github-actions[bot] fa1ecf6e8b
Delete changelog files based on PR 35371 (#35400)
Delete changelog files for 35371

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-28 16:39:54 -05:00
louwie17 8740a8a970
Update shipping label banner add meta boxes function (#35212)
* Add check to see if we are on a shop_order page.

* Update deprecated function call

* Add changelog

* Fix yoda condition
2022-10-28 17:08:13 -03:00
github-actions[bot] 3123f82b7e
Delete changelog files based on PR 35306 (#35391)
Delete changelog files for 35306

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-28 11:04:50 -07:00
louwie17 6b6a33282a
Add product description title in old product editor (#35154)
* Add product description title to classic product editor

* Remove bottom margin as its already added by the parent element

* Add changelog

* Update css and name, also fix some lint errors

* Fix spacing
2022-10-28 14:18:10 -03:00
Barry Hughes d9f6ecaa87
Guard against cases where `get_current_screen()` is undefined. (#35371)
This may happen if code invokes the `all_plugins` filter during non-admin requests, for example.
2022-10-28 09:31:35 -07:00
Jorge A. Torres aaef7f7a65
[HPOS] Allow line breaks in order notes (admin-side) (#35366)
Allow line breaks in order notes (admin-side).

* Fix code violations
2022-10-28 09:28:32 -07:00
Peter Fabian 0f204dbb57
TT3 compatibility (#35306) 2022-10-28 18:01:40 +02:00
Vedanshu Jain ec9ef7458e
Remove address indexes from list of internal keys. (#35192)
* Override filter_meta_data method, since it should be a no-op anyway.

* Add changelog.

* Not include address indexes from filtered data.

* Applied coding standards.
2022-10-27 11:36:50 -07:00
louwie17 04d6e8849c
Add name to select control popover slots (#35353)
* Add name to SelectControlMenuSlot

* Add changelogs

* Update changelog

* Fix typo in changelog
2022-10-27 12:52:29 -03:00
Jamel Noel Reid bfe0e958b8
Revert setting up permalinks in PW global setup (#35337)
* Revert permalinks setup

* Add changelog

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2022-10-26 12:36:44 -07:00
Jonathan Lane c72122ab5d
Skip flakey settings API test. (#35338)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2022-10-26 13:07:57 -06:00
Joshua T Flowers 89961fe067
Add summary field to new product experience (#35201)
* Add summary to new product page experience

* Add changelog entry
2022-10-26 11:20:11 -07:00
Alejandro López Ariza 4cb9bc45c4
Updated COT plugin used to set up the local environment with COT enabled. (#34990)
* Updated COT plugin used to set up the local environment with COT enabled.

* Enable HPOS in the e2e environment using env var (#35057)

* Updated COT plugin used to set up the local environment with COT enabled.

* Used env var to enable HPOS

* Disable HPOS for performance tests

* Updated permissions

* Set ENABLE_HPOS to 1

Co-authored-by: Alex López <alex.lopez@automattic.com>

Co-authored-by: Jamel Noel Reid <MrJnrman@users.noreply.github.com>
2022-10-26 09:29:41 -07:00
jonathansadowski afe3b4af01
Fix line endings in change file from 34292 (#35334)
* Fix line endings in change file from 34292

* Correctly update change file
2022-10-26 11:14:38 -05:00
nigeljamesstevenson 3d15a401b1
Add/a2 p create settings crud api core tests (#35253)
* api-core-tests settings tests

* api-core-tests settings tests

* api-core-tests settings tests

* update settings test to ensure concurrent tests do not fail
2022-10-26 08:24:57 -06:00
Ilja Zaglov 332204723b
Cat dashboard loading time (#34292)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2022-10-26 10:12:42 +02:00
Dharmesh Patel c6c2828f60
Fixed "Unsupported operand types" error. (#34327) 2022-10-26 10:12:06 +02:00
Alexandre Faustino c4564372f6
Uniform order customer search and display code (#35244)
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2022-10-26 10:10:56 +02:00
Maikel David Pérez Gómez 47439ec241
Fix the display of letter descenders in the shipping class dropdown menu (#35258)
* Fix the display of letter descenders in the shipping class dropdown menu

* Add comment suggestions
2022-10-25 17:28:37 -03:00
Maikel David Pérez Gómez 78f659b702
Increase the spacing between the shipping box illustration and the dimensions fields (#35259) 2022-10-25 17:17:30 -03:00
Maikel David Pérez Gómez c1e5098ff2
Change the product info section title to Product Details (#35255)
* Change the product info section title to Product Details

* Add comment suggestions
2022-10-25 16:49:48 -03:00
Maikel David Pérez Gómez 1bca35c360
Improve the communication around required and optional (#35266)
* Improve the communication around required and optional

* Add comments suggestions
2022-10-25 16:49:02 -03:00
Jonathan Lane 433357c3e3
Merge branch 'trunk' into e2e/update-command-for-e2e 2022-10-25 11:18:37 -07:00
Peter Fabian 4cde06e151
Update states.php -> added Senegal Regions (#35199)
* Update states.php -> added Senegal Regions

* Update to CLDR.

* Changelog.

Co-authored-by: Papa Amadou Korka Sow <32936698+Sowgenius@users.noreply.github.com>
2022-10-25 10:51:34 -07:00
Greg ec40d85de9
Update Playwright API Core Tests readme (#35303)
* Update api core tests readme

* Added changelog

* Minor spacing tweak
2022-10-25 10:42:39 -06:00
nigeljamesstevenson a7264fa6d7
add webhooks api-core-tests (#35292) 2022-10-25 08:23:49 -06:00
Maikel David Pérez Gómez 69e52c2fa0
Remove some placeholder values (#35267) 2022-10-25 10:17:43 -03:00
Greg 43eeb0c997
Add an NPM script to run the Playwright API Core Tests (#35283)
* Added script for running Playwright API Core Tests

* Added changelog
2022-10-25 11:07:13 +01:00
Md Mehedi Hasan a5e3215f23
Fix: Typo Mistake (#35111)
* Fix: Typo Mistake

* changelog added

Co-authored-by: HeyMehedi <mehedi.sovware@gmail.com>
2022-10-25 14:38:39 +13:00
rodelgc 39b472be7a
Set paths for `allure-results`, `test-results.json`, and save state files to be inside their respective E2E or API folders (#35206)
* Set paths to e2e-pw

* Delete and untrack storage state files

* Add changelog

* Checkout updated version of smoke test daily workflow

* Allow setting allure output paths to e2e-pw folder using environment variables

* Set allure output paths to be inside api-core-tests/api-test-report folder

* Remove unnecessary TODO comment
2022-10-24 16:53:46 -07:00
Jamel Noel Reid ed23996808
Update permalink structure using Playwright global setup (#35282)
Setup permalink in global-setup.js
2022-10-24 16:24:28 -07:00
Jon Lane 807ed2821f Add changelog 2022-10-24 15:52:51 -07:00
Jon Lane e916ac3fca README update 2022-10-24 15:51:13 -07:00
Jon Lane 7daf26ce39 Update e2e test command for consistency 2022-10-24 15:44:13 -07:00
Joshua T Flowers 2aa4ce0d9f
Disable product inventory toggle when inventory management is disabled (#35059)
* Disable product inventory toggle when inventory management is disabled

* Export conditional wrapper as experimental component

* Conditionally show the tooltip

* Add comment explaining the tooltip overlay

* Add components changelog entry

* Display tooltip on hover any portion of toggle or label

* Add changelog entry

* Fix scss lint error

* Center tooltip over label and toggle

* Fix up input props after rebase

* Add wrapper around field to maintain block item formatting
2022-10-24 09:08:27 -07:00
nigeljamesstevenson 87942e776c
add payment gateway api-core-tests (#35279) 2022-10-24 08:26:18 -06:00
Maikel David Pérez Gómez 64ee20ff0f
Show a dismissible snackbar if the server responds an error (#35160)
* Show a dismissible snackbar if the server responds an error

* Removed the default value New shipping class from the Name field and replaced it with a placeholder: e.g. Fragile products

* Only used the category's name when the user creates a new shipping class for the first time

* Fix linter errors

* Update grammar error

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Add empty initial values to form field to prevent controlled/uncontrolled react error

* Tune error handling

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-10-22 10:47:17 -03:00
Tam Mullen 0c5f93bb39
k6: add baseline scenario and additional account requests (#35252)
Add additional my account k6 requests and updated test scenarios
2022-10-21 22:58:36 +01:00
Jonathan Lane a94eecc910
Playwright 1.27.1 (#35106)
* Update Playwright to 1.27.1

* Add changelog

* Try adding retry action to github actions workflow

* Revert "Try adding retry action to github actions workflow"

This reverts commit 6196a5dd21.

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2022-10-21 15:16:00 -06:00
github-actions[bot] da2c81b8b1
Delete changelog files based on PR 35257 (#35261)
Delete changelog files for 35257

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-21 12:47:24 -05:00
Thomas Roberts a32966a2da
Update WooCommerce Blocks package to 8.7.4 (#35257) 2022-10-21 12:45:10 -05:00
nigeljamesstevenson 569043ecda
add api-core-tests for system status (#35254)
* add api-core-tests for system status

* add api-core-tests for system status

* add system status api-core-tests

* add system status api-core-tests formatting updates
2022-10-21 11:32:55 -06:00
rodelgc 64320a2c5c
Migrate Daily smoke tests to Playwright (#35114)
* Checkout updated files

* Checkout more files

* Remove invalid php-version input

* Add changelog

* Update pnpm-lock.yaml

* Re-add accidentally deleted filter value

* Remove unnecessary TODO comment
2022-10-21 09:07:53 -07:00
louwie17 ccae9ac72f
Revert change that auto collapses the short description field (#35213) 2022-10-21 12:34:27 -03:00
Joshua T Flowers 28f8e7f996
Enhance getInputProps to allow passing of non-overridden props (#35034)
* Allow additional props to be passed to the Form getInputProps method

* Remove getTextControlProps

* Pass additional shared props through getInputProps in shipping

* Simplify checkbox props

* Unwrap currency props

* Use onBlur event to sanitize prices

* Add changelog entry

* Add option to get checkbox props to form context helpers

* Update checkbox tracks handler naming and typing

* Fix up usage of getInputProps

* Add helper sanitize method

* Use sanitize helper method for product input fields

* Fix inventory input props after rebase

* Fix shipping typo

* Fix up form types after rebase

* Align all checkboxes on product page

* Rename new checkbox helper to getCheckboxControlProps

* Add helper method to get select control props

* Add data changelog entry

* Check for product name length on blur

* Add initial value for name to prevent uncontrolled value

* Add initial value for sku
2022-10-21 07:03:49 -07:00
github-actions[bot] be6c26b671
Delete changelog files based on PR 35125 (#35246)
Delete changelog files for 35125

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-21 08:42:49 -05:00
Néstor Soriano fa20d434f3
[COT/HPOS] Fix trashing/untrashing of orders (#35125)
* Fix trashing/untrashing orders when using COT:

- Trashing wasn't changing the update date on the orders table record.
- Trashing wasn't applying trash on the corresponding post.
- Untrashing wasn't actually deleting _wp_trash_meta_status in metadata.

* Fix: maybe_sync_order was syncing even with identical update dates.

* PHPCS is happy now.

* WP_DIE when attempting to load a trashed order in Admin
(same behavior as when using the posts table)

* Add changelog file

* Revert change in order records date comparison

Data comparison is needed too when the dates are equal, since data in the metadata table could have been modified as well.

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

* Fix handling of order status and trash meta when untrashing.

Untrashing an order was setting it to the default status of "pending"
instead of the previous status. This is what was happening:

1. Order is trashed, order meta table gets the value (e.g.) "on-hold"
   for the _wp_trash_meta_status key
2. Post is trashed, post meta table gets "wc-on-hold"
3. Order is re-read, but then so is posts, and the order meta value is
   updated to "wc-on-hold"
4. On untrash the previous order status from order meta table is
   prefixed with "wc-", thus it becomes "wc-wc-on-hold", which is not
   a valid status
5. Not having a valid status, the order is restored as the default
   status of "pending payment"

To fix this, the previous status is stored in order meta table
with "wc-", and it doesn't get prefixed on untrash.

Also, wp_untrash_post is called on order untrash, otherwise the
trash metadata keeps dangling and being synced back and forth.

* Add unit tetst for the trash-untrash cycle

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-10-21 15:18:54 +05:30
Peter Fabian 97773025c0
Improve unit test install script for db connection over socket (#35152) 2022-10-21 11:31:01 +02:00
Miguel Gasca c20f58e16a
Fix 'Invalid payment method' error upon double click 'Delete' #30862 (#30884)
* Fix 'Invalid payment method' error upon double click 'Delete' #30862

An 'Invalid payment method' error shows when a user double clicks the
'Delete' button in the 'Add Payment method screen'. Every time the user clicks
the button, there is a GET request to delete the payment method. First request is
handled correctly, but subsequent requests throw an error, because the payment
method cannot be found since it was already deleted.

This adds an event handler to disable the button on the first
click.

* Add changelog entry
2022-10-21 12:26:46 +05:30
Joshua T Flowers 3a2a22905b
Add manual stock management section to product management experience (#35047)
* Add manual stock management section to product management experience

* Add changelog entry

* Add default value for stock status

* Fix up lint issues

* Handle PR feedback
2022-10-20 14:14:54 -07:00
Maikel David Pérez Gómez 114be56f63
Move product action buttons to header menu (#35214)
* Move product action buttons to header menu

* Fix unit tests

* Add comment suggestions
2022-10-20 17:15:44 -03:00
Thomas Roberts d0278f4801
Update WooCommerce Blocks package to 8.7.3 (#35219)
* Update WooCommerce Blocks package to 8.7.3

* Updated composer.lock

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2022-10-20 14:34:59 -05:00
github-actions[bot] c50f69e229
Delete changelog files based on PR 35087 (#35230)
Delete changelog files for 35087

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-20 13:23:11 -05:00
github-actions[bot] 17cf0055b5
Delete changelog files based on PR 35207 (#35228)
Delete changelog files for 35207

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-20 13:19:39 -05:00
github-actions[bot] 23072411f3
Delete changelog files based on PR 35121 (#35226)
Delete changelog files for 35121

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-20 13:16:11 -05:00
github-actions[bot] 4831292bb5
Delete changelog files based on PR 35176 (#35224)
Delete changelog files for 35176

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-20 13:12:54 -05:00
github-actions[bot] dda264cc6d
Delete changelog files based on PR 35198 (#35222)
Delete changelog files for 35198

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-20 13:10:10 -05:00
Barry Hughes c2be5a6253
Add untrash order hook (COT/HPOS). (#35087) 2022-10-20 13:23:29 -03:00
Peter Fabian bf61c6bf19
Added default additional content to 'woocommerce_email_additional_content_' filter (#35195)
* Added default additional content to 'woocommerce_email_additional_content_' . $this->id filter

* Changelog.

Co-authored-by: Mattia Lerda <mattia.lerda@delitestudio.com>
2022-10-20 10:08:53 -03:00
Néstor Soriano cc0c4ef447
Improve the warnings about incompatibilites between plugins and features (#35198)
* Use AccessiblePrivateMethods in DataSynchronizer.

Also fix some code styling stuff.

* Introduce the woocommerce_feature_description_tip filter.

...and use it to display a warning for the COT feature
if there are orders pending sync.

* Display the plugin-feature incompatibility warning in all admin pages.

...except in the plugins list when we are already showing the
"You are viewing plugins with incompatibilities" page.

Also change the styling from warning to error.

* Add changelog file

* Revert accidental change.

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-10-20 15:34:37 +05:30
Vedanshu Jain 8848e4aa47
Check before getting order classname to see if it exists. (#35207) 2022-10-20 14:47:58 +05:30
Vedanshu Jain 80cbb9dcdc
Use correct datastore when backfilling orders. (#35176)
* Use correct datastore when backfilling orders.

* Fix some unit tests and simplify calls.
2022-10-20 13:22:22 +05:30
louwie17 5f2c656e6b
Add/34331 add attributes modal (#34999)
* Add initial add attribute modal

* Add async select control component and add attribute terms

* Make use of AsyncSelectControl for attributes

* Rearranged the add attribute form to make removing easier

* Make sure add button is disabled if fields are empty

* Remove the use of AsyncSelectControl for now

* Add disabled option and fix merge conflict

* Add attribute modal tests

* Remove unused trigger drag

* Add popover slot

* Small update to select control and fix multi selection in term field

* Add tests for attribute and attribute term fields

* Add changelogs

* Small fix after merge conflict

* Fix some styling and issue with select control when clearing item

* Fix lint error

* Fix up some styling issues after rebase

* Fix formatting, some styling issues, and address some PR feedback

* And confirmation dialog for closing the modal.
2022-10-19 16:28:29 -03:00
Vedanshu Jain 5b6ddf0b88
Update biling and shipping address indexes. (#35121)
* Update biling and shipping address indexes.

* Add changelog.

* Code standard fixes.

* Add unit test for search after update.

* PHPCS fixes.
2022-10-19 16:21:42 +05:30
Jonathan Lane a2076f59a5
Update PR template to provide guidance for testing (#34597)
* Update PR template to provide guidance for testing

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2022-10-19 14:00:09 +08:00
Joshua T Flowers c72e00d85c
Add Tooltip component and remove EnrichedLabel (#35024)
* Add experimental tooltip component

* Add tooltip stories

* Update EnrichedLabel component

* Remove EnrichedLabel

* Add changelog entries

* Fix up linting issues

* Handle PR feedback
2022-10-18 16:08:49 -07:00
nigeljamesstevenson bb42e7892a
api-core-tests add product reviews crud tests (#35163) 2022-10-18 16:33:11 -06:00
Maikel David Pérez Gómez c79af1acc5
Replace the trash can icon in the attribute list (#35133) 2022-10-18 16:05:01 -03:00
Maikel David Pérez Gómez a0b27a4966
Select the current new added shipping class (#35123)
* Select the current new added shipping class

* Extracting constants into the right file

* Add unit tests

* Use setValue instead onChange to select the shipping class of the product
2022-10-18 15:40:56 -03:00
Moon 4775defb1f
Update WooCommerce beta tester README (#35090)
* Update readme

* Add changelog

* Add Installation section

* Fix typo

* Update WC Admin Test Helper dev commands

* Move back Development section to README.md
2022-10-18 09:22:51 -07:00
Joshua T Flowers 3c6681054a
Add product management description (#34961)
* Add label prop to rich text editor

* Create feature class and enqueue styles

* Add description editor and parsing

* Fix up incorrect context for product data

* Add styling to rich text editors in product form

* Fix editor initialization on new product

* Add changelog entries

* Use trunk lock file

* Add component changelog entry

* Update lock file

* Register block store provider in tests

* Fix up phpcs errors in product feature file
2022-10-18 08:55:31 -07:00
Paulo Arromba 00368924df
Update WooCommerce Blocks package to 8.7.2 (#35101)
* Update WooCommerce Blocks package to 8.7.2

Co-authored-by: Niels Lange <info@nielslange.de>
2022-10-18 10:36:05 +01:00
Moon 13a5ba2f1d
Optimize query usage in the Onboarding tasks (#35065)
* Optimize is_complete() method

* Replaed WC_Product_Query with wp_count_posts, which has more optimized query

* Optimize TaskList::is_complete -- return early when false instead of running through all the tasks

* Cache is_complete() method for the tasks with db query

* Add changelog
2022-10-17 11:23:55 -07:00
Phill 2a034c0df4
Update tooltip text
The tooltip for the Header Image field currently reads: "URL to an image you want to show in the email header. Upload images using the media uploader (Admin > Media)." 

I believe my small edit to the description text makes it more clearer for how the user should do this.
2022-10-15 15:43:52 +07:00
jonathansadowski 8747ea2995
Remove latest stable version from README (#35056)
* Remove latest stable version from README

* Add change file
2022-10-14 15:22:27 -05:00
Moon 0f58f2efbd
Fix JS errors when the OBW business step is accessed directly via URL (#35045)
* Set default value for product types

* Add changelog
2022-10-14 11:43:36 -07:00
louwie17 c55c91d7e0
Add category field dropdown field (#34400)
* Add initial category field component with new typeahead

Move search logic to useCategorySearch hook

Add initial add new category logic

Add parent category field to add new category modal

Adding some debug changes

Update category control to make use of internal selectItem function of select control

Add changelogs

Update pagesize back to 100

Add placeholder

Empty placeholder

Fix input and icon sizes

Fix input underline

Add max height and scroll to category dropdown

Add sorting of category items

Auto open parents when traversing up the tree using arrow keys

Add several comments

Add some initial unit tests for the category field component

Add tests for useCategorySearch hook and fixed minor bug

Update styling and autoselect parent if child is selected

Fix styling issues for the select control dropdown inside a modal

Fix issue with creating new category with parent

Add function comment and fixed border styling

Prune out create new category logic

Fix minor css issue with border

Revert some of the select control changes and make use of the custom type

Fix up some styling changes

* Fix type conflict

* Revert change in state reducer

* Add cursor pointer

* Fix styling errors

* Fix broken category tests

* Fix merge conflict
2022-10-14 09:05:39 -03:00
Sam Seay 9b9abd1eae
Replace outdated readme examples of using pnpm (#35064) 2022-10-14 16:14:45 +13:00
github-actions[bot] 4055797bf0
Release: Remove 7.1 change files (#35080)
Delete changelog files from 7.1 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-13 13:57:26 -05:00
Kirtan Gajjar a5814f1bc7
Make qty input box visible when min_qty = max_qty (#34282)
Make the quantity input visible, even if the min and max allowed values are identical.

* Add changelog

* Update plugins/woocommerce/changelog/fix-GH-34280

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

* Update plugins/woocommerce/templates/global/quantity-input.php

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

* Fix `@since` tag

* Use a single readonly input (when quanity cannot be changed) instead of two inputs (hidden and disabled).

* Introduce consistent formatting when a product is sold individually and when the min/max is identical.

* Update `@version` tags to 7.1.0.

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-10-13 09:48:08 -07:00
Bartosz Budzanowski cfe8f76be9
Add order origin tracking. (#35069)
Track order origins ( _created_via )

* Add changelog.

* Fix formatting.

* Use one-liner array.

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

* Add missing whitespace.

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

* Fix foreach format.

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

* No trailing spaces in description.

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

* Don't use hardcoded table prefix.

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

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-10-13 08:59:24 -07:00
Vedanshu Jain 21419e4a2c
Fix missing changelog. (#35072) 2022-10-13 18:39:51 +05:30
Peter Fabian 638af2f04e
[HPOS] Improve plugin matching for compatibility check (#35070) 2022-10-13 14:42:53 +02:00
Vedanshu Jain 4ccbcc1b2e
Set correct timezone when backfilling data. (#35033)
* Set correct timezone when backfilling data.

* Add changelog.

* Apply code standards.

* Address further flakiness and more comprehensive test.

* More fixes for timezone backfil.

* Remove unnecessary comments.

* Revert test change since we are not changing systems timezone.

* Minor alignment fix.

* Minor language fix.

Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>

Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
2022-10-13 17:48:24 +05:30
Vedanshu Jain 0a9434605e
Also read from posts when reading from COT to check for direct write (#34465)
* Add and use ON_DUPLICATE_KEY update function to perform update/insert without additional query.

* Fix typo

* Add more tests for save related functions.

* Update post directly to update correct post_modified value.

If we use wp's update_post function, then it will set the post-modified date to current time(). This is not desirable when backfilling order data where we want post data to be exactly the same as orders.

* Add changelog.

* Add support to sync from posts table when reading order table.

When sync is enabled, we also read from posts table when an order is read from COT. Mismatch in this case implies a direct write and therefore we update the COT record with data from posts. This provides an additional layer of backwards compatibility.

* Add more tests for different tables.

* Modify sync logic to account for metadata that has been changed.

* Fetch post only when data sync is enabled.

* Made test case comparison more strict to prevent flakiness.

* WIP

* WIP

* Added protections and code standard fixes.

* WIP

* Change order data store internal key to props for better representation.

* Add changelog

* Add legacy datastore prop for WC_Data object to support COT.

* Also support passing in `get_stock_reduced` method.

* Add internal meta keys to order table data store.

* Add tests for CPT datastore for orders.

* Change return type to prevent implicit type conversion.

* Use correct conversion.

* Revert "Use correct conversion."

This reverts commit 97ead11f71.

* Add conversions to test as needed.

* Add internal keys for order table data store for consistency.

* Apply code standards.

* Merge conflict fixes.

* Add more tests.

* Add more fixes and unit test for sync logic.

* Remove $save param for consistency with parent class.

Earlier, we added the $save parameter for performance reason, but now that we are storing the props in the WC_Order object, this isn't needed anymore (as the object can hold the updated props).

* Return bool instead of string as described.

* Fix test by transforming bool values before confirming.

* Fix test by not needing to converting to string, since we now bool value.

* Store internal props as bool instead of string.

* Remove unused method.

* Only select props for refunds that are actually needed.

* Store bool as yes/no to maintain compatibility with how were storing prev.

* Fix unit test to extpect yes.

* Add tests and set special metadata migrated from data store correctly.

* Add tests for legacy prop get/set in ordertabledatastore.

* Update email class to use data store method instead of get_meta.

* Update exisiting tests to account for changes in legacy prop setting.

* Read from CPT store directly, and cache the pending value.

* Fixup in unit test.

* Add test for refund creation.

* Add test for refund creation.

* Remove strict WC_Order typecasting.

* Address code standard voilation.

* Call correct parent method for updating meta.

* Use WC_Absract instead of WC_Order to provide more compatibility.

* Record order ids we are syncing for to prevent any infinite loop.

* Add test for fixing infinite loop with read on sync.

* Address PR feedback.

* Fix formatting.

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

* Fix formatting.

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

* Use correct type hints.

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

* Fix formatting.

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

* Yoda, use.

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

* Remove space between minus and numeral for readability.

* Fix ut, and use assertTrue instead of native for consistency.

* Port a fix for edit date save.

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-10-13 17:13:37 +05:30
Joel Thiessen 315e163b29
Only show five inbox messages and add "Show more" button (#35003)
* Basic paging functionality

* Adding changelog

* Inserting placeholder at end of list, working dismissal

* Fixing issues with dismissed notes not updating UI

* Fixing odd display when removing last note

* Renaming page variable

* Adding tracks event

* Addressing issues caused by .map within useSelect, and getting rid of hash

* Fixing nested ternary linting issue

* Removing console logs

* Updating test
2022-10-13 08:36:02 -03:00
Paulo Arromba 1c0925a905
Update WooCommerce Blocks package to 8.7.1 (#35040)
* Update WooCommerce Blocks package to 8.7.0

* Update WooCommerce Blocks package to 8.7.1
2022-10-13 12:21:20 +02:00
Jorge A. Torres 3e3b413d17
Some improvements to plugin feature incompatibility UI (#35063)
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2022-10-13 12:06:57 +02:00
Vedanshu Jain b6439c6ed1
Implement missing refund tax methods for HPOS (#34805)
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2022-10-13 10:57:22 +02:00
RJ 1991347234
fix: handle error loading and error states for magic link button (#35068) 2022-10-13 16:12:40 +08:00
Jorge A. Torres d2dd772ede
Fix admin settings checkbox disabled (#35067)
* Fix ‘disabled’ state for admin settings

* Add changelog
2022-10-13 11:51:30 +05:30
Ismael Martín Alabarce 3d1f8c36e0
Update WCPay promo requirements and ensure dismiss (#35030)
* Ensure Payments menu is dismissed after choosing no

Now it gets also dismissed on modal close

* Add a new requirement

Check if the store has another payment gateway installed to be eligible for the promotion.

* Add changelog entry

* Fix not using strict comparison for in_array

* Update is_another_payment_gateway_installed

To use a static list instead of PaymentGatewaySuggestions
2022-10-13 08:14:01 +02:00
RJ edbb3ea793
Fix: mismatching jetpack user should not see mobile app task list item (#35052)
* fix: mismatched user shouldn't see task item to get mobile app
2022-10-13 10:27:42 +08:00
Joshua T Flowers 8fbdbaf354
Add product page inventory quantity management (#34984)
* Add manage stock section to product inventory section

* Fix up h4 styles in form sections

* Check if stock management is enabled in store settings

* Fix up more styles in form

* Extract inventory validation and add new validation rules

* Add changelog entry

* Add changelog entry

* Remove sku related validation
2022-10-12 14:30:02 -07:00
Joshua T Flowers 0ca3f6d589
Add product management SKU (#34978)
* Add product inventory section and sku control

* Add validation and errors

* Add changelog entry

* Add dependencies comment block

* Call input props onBlur for product name field

* Remove slug validation

* Watch product name value change in inventory section

* Fix up usePrevious hook TS

* Revert watching changes by previous touched status
2022-10-12 13:11:05 -07:00
Fernando Marichal 98162b9d42
Images Product management MVP 1.0 (#34769)
* Add image section

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx

* Add `keepSpaceWhenDragging` to sortable

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/sortable/sortable.tsx

* Export ImageGalleryItem

* Add props to `image-gallery`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery-item.tsx
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Changed `media-uploader` label

* Add changelogs

* Fix image-gallery and sortable components

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx
#	packages/js/components/src/sortable/sortable.tsx

* Set gallery min-height

* Add onOrderChange

* Show images section edit-product

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

* Fix styles

* Fix styles

* Fix image alt

* Fix TS any

* Add prop `onDragOver`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Fix styles

* Fix padding

* Fix image area min-height

* Fix subtitle copy

* Fix image margin

* Change `draggedImageId`

* Fix `setDraggedImageId` reset

* Rename `isRemoveZoneVisible`

* Add `CardBody` and remove redundant `setValue`

* Fix card styles

* Remove `getUniqueImages`

* Use url as a key when there is no image id

* Fix `orderedImages`

* Add hover to gallery images

* Fix gallery arrows and set cover problems

* Altering blur handler to prevent toolbar closure on media modal

* Fix toolbar drag and drop

* Add replace fn

* Restoring modal class for blur function

* Fix storybook

* Ensuring onBlur doesn't happen while dragging, resolving issue in Firefox

* Adding expected event object to drag callbacks

* Fix image size

* Fix lint

* Another fix lint

* Update plugins/woocommerce-admin/client/products/sections/images-section.tsx

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Fix `draggedImageId` default value

* Fix toolbar icon style

* Rename consts

* Update pnpm-lock.yaml

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joel <dygerati@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-10-12 15:16:22 -03:00
Barry Hughes 1d187b70ca
[HPOS/COT] Ensure date_creation_gmt is correctly populated with a GMT datetime (#34875)
* (HPOS/COT) Ensure date_creation_gmt is correctly populated with a datetime in GMT timezone.

* Update the way we test the value of the persisted order creation date.
2022-10-12 20:10:28 +02:00
Néstor Soriano edc1c6c98a
Add handling for plugin-feature incompatibilities (#34879)
* Extend FeaturesController to handle WooCommerce-aware plugins

The methods that return compatibility info now have an extra
'uncertain' part with information regarding plugins that are
WooCommerce-aware but haven't declared compatibility.

* Add a warning about incompatible plugins in the features page.

Includes a link to the list of incompatible plugins.

* Add handling of incompatible plugins in the plugins page.

Plugins that are incompatible with at least one enabled feature
will show a warning in the WooCommerce plugins page, and will
have their "Activate" link disabled.

* - Hook on 'views_plugins' to display two views in plugins page,
  "All" and "Incompatible with feature X"

- Exclude the legacy Analytics features from the feature and plugins
  activation restrictions

- Allow disabling a feature from the settings pages if it's enabled
  and is incompatible with at least one plugin (it won't be possible
  to re-enable it once the settings page reloads)

* Fix FeaturesController::declare_compatibility not working in Windows
(which uses \ instead of / as directory separator)

* - Add two methods to bypass the feature/plugin activation protection.

- Fix: the incompatible plugins count in the feature settings page
  now only counts active plugins.

* Add changelog file

* Fix unit tests

* - Rename "custom orders table" feature to "high performance order tables"

- Add an extra parameter to FeaturesController::get_compatible_plugins_for_feature
  to retrieve all matching plugins or only active plugins.

* Minor wording fixes

* Address PR feedback.

* Allow enabling plugins when WP_DEBUG is true.

* Return if plugin_status is not set.

* Dont change the Activate button.

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-10-12 11:08:46 -03:00
Oleksandr Aratovskyi a9dbb6d64e
Change copy of the payments welcome modal (#35031)
* Change copy in Payments Welcome modal

* Change copy in Payments Welcome modal
2022-10-12 16:18:13 +03:00
Sam Seay 55b49cb50a
Fix and consolidate linting across the monorepo (#35012) 2022-10-12 15:05:01 +13:00
peterbialkowski 7aca607899
Update New Zealand subdivisions in states.php (#35011)
Update states.php (New Zealand/CLDR R41)

* Add changelog

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-10-11 15:33:28 -07:00
Vedanshu Jain 75721ed9de
Support fetching order types in bulk. (#34976)
Support fetching order types in bulk.

* Add changelog.

* PHPCS and unit test fixups.

* Add return type and param checking for has_callable.
2022-10-11 11:44:50 -07:00
Roy Ho 1ca5388eed
Prep trunk post 7.0 release (#35038) 2022-10-11 11:38:53 -07:00
Maikel David Pérez Gómez e95bb3768e
Add new shipping class modal to a shipping class section in product page (#34937)
Add new shippping class modal to a shipping class section in product page
2022-10-11 12:00:35 -03:00
Vedanshu Jain 1d4888768f
Serialize value before sending to meta display form. (#34952) 2022-10-11 16:06:30 +02:00
nigeljamesstevenson 13c34ad295
api-core-tests product properties tests (#34998)
* api-core-tests product properties tests

* api-core-tests products tests

* api-core-tests products tests
2022-10-11 07:54:48 -06:00
github-actions[bot] 1af32829e8
Delete changelog files based on PR 35025 (#35028)
Delete changelog files for 35025

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-10 12:23:20 -07:00
Wojciech Zięba 322f7e8fc7
[7.0] Only show mobile messaging on Merchant New Order emails (#35025)
Adds a check to the mobile messaging callback to ensure it only gets inserted into the email footer for the New Order notification for merchants, and not for emails sent to customers.

Fixes #35016
2022-10-10 12:09:50 -07:00
Roy Ho 84a74b5edb
Remove unneeded files from distribution package (#35000) 2022-10-10 07:36:20 -07:00
Jorge A. Torres c9c2bfbf92
[COT] `query()` method: add support for field queries (#34533)
* Bring Yoda back.

* Add method to OrdersTableQuery to obtain table info for a given order field

* First pass at field_query

* Add tests

* Add changelog

* Use backticks for table names and aliases

* Improve validation in field_query

* Add some more tests
2022-10-10 13:31:00 +05:30
Sam Seay aec442139f
Update pnpm once again to fix issues with auto-install-peers (#35007) 2022-10-10 16:59:51 +13:00
Dion Hulse 29c9dfce16
Get the first array item for the alt_text.
Props galbaras
2022-10-10 09:45:50 +10:00
Jamel Noel Reid 91e1347aab
Fix order email receiving test (#34972)
* Added JS data file

* Moved onboarding logic into utils folder

* Used new onboarding methods and data file

* Added changelog

* Moved utils directory

* Added api utils

* Added customer details data

* Used new api utils and data

* Updated path

* Added comment and removed log

* Removed log

* Added changelog
2022-10-07 13:11:49 -07:00
Jonathan Lane aa438e5741
Fix/update playwright and test fixes (#34790)
* Update Playwright 1.22.1 -> 1.26.0

* Update page title locator

* Wait for View cart link after adding to cart

* Add a wait when applying second coupon

* Fix flakey coupon test

* Ensure Store is in US

* Add changelog

* Revert lock file commit

This reverts commit b75192f53c.

* Updated lock file

* Added command for Playwright test execution

* Resolve merge conflict

* Resolve merge conflict

* Fixed pnpm-lock.json

* Update PW Selectors (#34959)

* Updated PW selectors

* Updated selector

* Removed extra command

* Ensure Billing country is set

* Fix failing payment setup test

* Old test is still running in actions

* Adds colour output for Playwright in GH Actions

* Fix payment test

* Lock file update

* Skipping a test for now

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: jamelreid <jnoelreid@gmail.com>
Co-authored-by: Jamel Noel Reid <MrJnrman@users.noreply.github.com>
2022-10-07 12:39:39 -06:00
Roy Ho c32eb268cf
Dev/beta tester (#34993)
* Add documentation as to where to find the settings/features

* Fix version picker not working

* Bump versions and normalize changelog section

* Remove old changelog files

* Ensure WR can bump the version

* Add minified version of version-picker

Co-authored-by: Jonathan Sadowski <sadowski@automattic.com>
2022-10-07 10:29:02 -07:00
Tam Mullen 7cb84e5b2d
k6: add additional merchant and API order tests (#34707)
* Expanded k6 merchant order tests

* Adding additional k6 merchant and api order requests

* Added changelog

* Added Changelog

* Update k6 search filter test to use customer ID

* Update k6 README for update to config

* Removed Order Filters from k6 daily external tests until the workflow can be updated

* Updated k6 requests for HPOS

* Add k6 completed orders merchant request
2022-10-07 09:47:40 -07:00
Vedanshu Jain 0b5d7ab9ad
Revert "[COT] Add the orders cache" (#34992)
Revert "[COT] Add the orders cache (#34396)"

This reverts commit 3f155c9a63.
2022-10-07 20:09:09 +05:30
nigeljamesstevenson 1eb02b4742
api-core-tests order notes tests (#34979)
* api-core-tests order notes tests

* changelog file
2022-10-07 08:25:02 -06:00
Néstor Soriano 3f155c9a63
[COT] Add the orders cache (#34396)
* Reverse the order of "$id" and "$object" in ObjectCache::set

* Add the ObjectCache::update_if_cached method

* Modify ObjectCache:set to validate object before invoking get_id

* Add a temporary TransientsEngine class.

This is temporary! Must be removed before merging to trunk.

* Add the OrderCache class.

This class uses a TransientsEngine instance as the caching engine.
This is temporary and must be undone (get_cache_engine_instance method
must be removed) before merging to trunk!

* Use the new OrdersCache class

- When an order is retrieved, cache it
- When an order is saved, update it if it was cached already
- When an order is trashed or deleted, remove it from cache
- When the authoritative table for orders changes, flush the cache

* Remove the hardcoded usage of TransientEngine in OrderCache

It will make things easier later before merging. The transients engine
can still be used via the wc_object_cache_get_engine hook.

* Add changelog file

* Fix failing unit test

The test was failing because the order is cached by reference when
being saved in the test, and then when being deleted by the REST API
code it gets its id set to 0.

* Add a setting to enable/disable the orders cache

Also added a mechanism to temporarily disable the orders cache while
syncrhonization is in progress.

* Adjustments in the mechanism to temporarily disable the orders cache usage

* OrderCacheController: backup enable option is now stored in memory.

* Convert conditions to Yoda :-(

* Add missing $

* Use the new features engine to declare the cache as an experimental feature

Also decouple the orders cache mechanism from the COT feature,
it can be now used indepently of the COT feature and independently
of whether the new orders table is in use or not.

* Removed unused import and transient class.

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-10-07 12:46:24 +05:30
RJ c67a0fbe27
Add Tiktok to OBW grow list (#34953) 2022-10-07 13:50:35 +08:00
Jamel Noel Reid 7d710dfe7a
Move onboarding test steps into utils folder (#34970)
* Added JS data file

* Moved onboarding logic into utils folder

* Used new onboarding methods and data file

* Added changelog

* Moved utils directory

* Fixed import
2022-10-06 11:43:45 -07:00
louwie17 f28a467919
Add/34000 attribute select control (#34744)
* Replace preloaded attribute and term dropdowns with async typeahead dropdowns

* Revert accidenatal change.

* Add condition to show the old dropdown in certain situations

* Add changelog

* Use ternary condition

* Move mininumInputLength down to follow the same format as the other filters

* Fix the minimum input length

* Update the select all to work with the async terms field

* Make sure empty attributes are shown and suppress query filter

* Fix code sniff error
2022-10-06 14:27:48 -03:00
github-actions[bot] 5bad53d854
Delete changelog files based on PR 34966 (#34969)
Delete changelog files for 34966

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-06 06:19:45 -07:00
Corey McKrill 9f8ae8b46f
REST API: Ensure meta_data prop contains an array (#34966)
REST API: Ensure meta_data prop contains an array

When filtering the meta_data array of a response with include_meta or
exclude_meta, the array indexes were getting preserved so that it was
possible for the array to not contain a 0 index, but still have some
subsequent numbers. When such an array was converted to JSON, it was
interpreted as an object rather than an array.

This ensures the meta_data array indexes are reset after filtering, and
adds unit tests to check that meta_data always contains an array, and
not an object.
2022-10-05 14:39:33 -07:00
nigeljamesstevenson 32e21bbb1f
Add/a2 p create tax rates crud api core tests (#34960)
* Add Tax api-core-tests

* api-core-tests tax tests

* api-core-tests taxes

* api-core-tests taxes
2022-10-05 13:59:35 -06:00
nigeljamesstevenson a0233d2d62
Add/a2p create customers crud api core tests (#34945)
* add customer crud api-core-tests

* add changelog file

* Update plugins/woocommerce/tests/api-core-tests/tests/customers/customers-crud.test.js

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

* Update plugins/woocommerce/tests/api-core-tests/tests/customers/customers-crud.test.js

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

* Update plugins/woocommerce/tests/api-core-tests/tests/customers/customers-crud.test.js

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

* PR review updates

* Update plugins/woocommerce/tests/api-core-tests/tests/customers/customers-crud.test.js

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

Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
2022-10-05 12:45:26 -06:00
rodelgc f8ea46b086
Implement `maxFailures` and warning messages (#33977)
* Add `maxFailures`

* Intentionally fail a test for testing the failure limit

* Add changelog

* Add step to get total number of E2E tests

* Increase max failures

* Add warnings to the test summary.
Also moved some stuff around.

* Update changelog

* Use env var to set `maxFailures` value instead of hard-coding it

* Make sure env var is converted to a number

* Allow maxFailures even if not on CI

* Show incomplete e2e run warning only when E2E_MAX_FAILURES is set

* Safely escape new lines in comment body

* Fix returned stringified summary

* Remove unnecessary newline escaping

* Fix incorrect reference to E2E_MAX_FAILURES

* Minor formatting change

* Shorten warning messages

* Minor change in warning message

* Intentionally fail only 1 test

* Remove intentional failures

* Removed duplicate env declaration

* Correct pnpm command and playwright config file location

* Simplify reference to CI variable

* Remove unnecessary if condition

* Remove references to the old E2E_PLAYWRIGHT flag

* Remove references to the old E2E_PPTR_SUMMARY_PATH variable

* Test for 2 warnings

* Revert to correct locator

* Test for only 1 warning

* Pass all tests
2022-10-05 10:44:20 -07:00
louwie17 6af1695f34
Add/34333 attribute list (#34841)
* Add initial attribute list with dragging and removing functionality

* Fix sortable styling and remove the default selected logic

* Fix css formatting

* Add changelogs

* Add missing question mark

* Add tests

* Some minor CSS updates and move some logic to a util function

* Fix lint issues and add extra test
2022-10-05 13:04:20 -03:00
github-actions[bot] 1d56b84d17
Delete changelog files based on PR 34936 (#34958)
Delete changelog files for 34936

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-05 07:23:17 -07:00
Barry Hughes bb898595b8
Correct the textarea name in the Product Short Description template. (#34936) 2022-10-05 16:05:32 +02:00
Vedanshu Jain 82153ea567
Support `wc_customer_bought_product` for hpos. (#34931)
* Support `wc_customer_bought_product` for hpos.

* Apply code standards.
2022-10-04 15:52:02 -03:00
Matt Sherman 196623c004
Update Remote Inbox Notifications Total Payments Value documentation (#34792)
Fix typo in Total Payments Value section of README
2022-10-03 14:26:22 -04:00
Maikel David Pérez Gómez d3c19642b0
Add shipping dimensions image (#34857)
* Remove custom styles from FormSection component and use Card and CardBody instead

* Add dimension fields formating using the woo number global settings

* Load size units to show it as a suffix of shipping dimensions fields

* Fix card styles according the disign and pass props manually to BaseControl

* Add shipping dimensions image

* Apply comment suggestions
2022-10-03 15:06:17 -03:00
nigeljamesstevenson 456dd02352
update workflows to use the playwright api-core-tests instead of the … (#34935)
* update workflows to use the playwright api-core-tests instead of the equivalent supertest versions

* add changelog file
2022-10-03 10:49:42 -06:00
github-actions[bot] ffe7d4dc1b
Delete changelog files based on PR 34920 (#34924)
Delete changelog files for 34920

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-03 08:24:30 -07:00
github-actions[bot] 2ec971412b
Delete changelog files based on PR 34892 (#34922)
Delete changelog files for 34892

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-10-03 08:21:04 -07:00
nigeljamesstevenson 75c91ccdc0
E2e pw/migrate api core tests to use playwright 34126 (#34835)
* playwright api-core-tests

* playwright api-core-tests

* playwright api-core-tests

* Workflow updates

* Workflow test updates

* workflow test update

* Workflow testing

* Workflow testing

* workflow test updates

* workflow test updates

* Workflow update test

* Workflow update test restore

* add gitignore for api core tests output dir

* Workflow test with playwright api tests

* Workflow restore to original

* update readme and playwright config
2022-10-03 07:41:27 -06:00
Adam Heckler 4b44189e1d
Change "WCPay" to "WooCommerce Payments" (#34666) 2022-10-03 15:42:04 +05:30
Néstor Soriano 2e9ed0e035
Fix: can't place orders for Saint Martin (#34920) 2022-10-03 11:26:48 +02:00
Chi-Hsuan Huang 5f2aa49579
Deploy spotlight product tour (#34859)
* Remove product tour experiment code

* Remove experimental-product-tour flags

* Replace old product tour

* Add changelog

* Remove spotlight query string
2022-10-03 16:34:49 +08:00
Chi-Hsuan Huang c4befcde2b
Fix wrong payment tasks display logic (#34892)
* Fix the wc pay view logic so that we don't display it even when payment task is completed

* Add changelog
2022-10-03 16:34:38 +08:00
Chi-Hsuan Huang 08848d46ca
Fix onboarding wizard popover padding (#34896)
* Fix onboarding wizard popover padding for WP6.1

* Add changelog
2022-10-03 16:34:20 +08:00
Chi-Hsuan Huang 4a39091961
Add "aria-disabled" prop to truly disable OBW continue buttons (#34895)
* Add aria-disabled prop to truly disable OBW continue buttons

* Add changelog
2022-10-03 16:32:23 +08:00
Sam Seay 59e0c80f3c
Update the pnpm constraint to 7.12.2+ now auto-install is fixed. (#34872) 2022-10-03 10:52:42 +13:00
github-actions[bot] 666e5913f9
Delete changelog files based on PR 34712 (#34891)
Delete changelog files for 34712

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-30 09:43:01 -07:00
Vedanshu Jain 045c5850b6
Render columns via action so that they can be hooked into (#34900)
Render columns via action so that they can be hooked into.
2022-09-30 08:15:15 -07:00
Barry Hughes 5cb5be8e9a
[HPOS] Add hooks that fire before an order is trashed/deleted. (#34858)
New hooks are:

1. `woocommerce_before_delete_order`
2. `woocommerce_before_trash_order`
2022-09-30 09:11:46 -03:00
Barry Hughes d5bf2feeb1
Immediately propagate changes to orders (from CPT → COT). (#34863)
Add callback to update COT when CPT is authoritative and individual orders are updated.
2022-09-30 13:26:25 +05:30
Peter Fabian ab23314f56
Fix/json order > line_items > image schema (#34852)
* Removed the type spec for properties.

* Changelog.

* Removed double propoerties.
2022-09-30 13:23:48 +05:30
Joshua T Flowers 3fd736c72f
Update plugins installer component to TS, Fix TS bugs and Syncpack TypeScript (#34787) 2022-09-30 10:59:07 +13:00
Jonathan Lane 4ccb2b478a
Fix/test env setup set customer registered datetime (#34888) 2022-09-29 12:44:06 -07:00
Maikel David Pérez Gómez 7fe05d65f3
Load size units to show them as a suffix of shipping dimensions fields (#34856)
* Add dimensions to shipping section
Change the FormComponent to support input name with dot notation like dimensions.width
Add the dimension controls to the product form

* Remove custom styles from FormSection component and use Card and CardBody instead

* Add dimension fields formating using the woo number global settings

* Add dimension fields validations

* Solve conflics from rebase

* Add changelogs

* Fix resetForm function to consider the passed params and the initialValues

* Load size units to show it as a suffix of shipping dimensions fields

* Fix card styles according the disign and pass props manually to BaseControl
2022-09-29 14:54:04 -03:00
Jorge A. Torres 23e237dc2a
Honor query args when redirecting from posts to HPOS list table (#34868) 2022-09-29 10:22:42 -07:00
Jorge A. Torres a1f5b71e27
Allow features to declare a default 'enabled' state (#34867)
Allow features to have a default state via `enabled_by_default`.

* Remove unnecessary import

* Allow features to have a default state via `enabled_by_default`

* Add changelog
2022-09-28 13:17:08 -07:00
Vedanshu Jain 019b0b4df8
Move props from datastore to order object and implement $save params for DataStore (#34627)
* Change order data store internal key to props for better representation.

* Add changelog

* Add legacy datastore prop for WC_Data object to support COT.

* Also support passing in `get_stock_reduced` method.

* Add internal meta keys to order table data store.

* Add tests for CPT datastore for orders.

* Change return type to prevent implicit type conversion.

* Use correct conversion.

* Revert "Use correct conversion."

This reverts commit 97ead11f71.

* Add conversions to test as needed.

* Add internal keys for order table data store for consistency.

* Apply code standards.

* Remove $save param for consistency with parent class.

Earlier, we added the $save parameter for performance reason, but now that we are storing the props in the WC_Order object, this isn't needed anymore (as the object can hold the updated props).

* Return bool instead of string as described.

* Fix test by transforming bool values before confirming.

* Fix test by not needing to converting to string, since we now bool value.

* Store internal props as bool instead of string.

* Remove unused method.

* Only select props for refunds that are actually needed.

* Store bool as yes/no to maintain compatibility with how were storing prev.

* Fix unit test to extpect yes.

* Add tests and set special metadata migrated from data store correctly.

* Add tests for legacy prop get/set in ordertabledatastore.

* Update email class to use data store method instead of get_meta.

* Update exisiting tests to account for changes in legacy prop setting.

* Add support for order IDs to prop getters in `OrdersTableDatastore`

* `OrdersTableDatastore::get_download_permissions_granted()` should no longer rely on metadata

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-09-28 14:07:41 -03:00
github-actions[bot] 814cd39e3c
Delete changelog files based on PR 34832 (#34846)
Delete changelog files for 34832

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-27 11:49:58 -07:00
Gan Eng Chin 9e697cdf0a
Add tests for UI Revamp on Marketing page (#34840) 2022-09-27 22:25:48 +08:00
Chi-Hsuan Huang c31f8b0aa5
Fix industry options not populate after reloading page (#34847)
* Add a spinner loader to ensure Industry loaded after data fetched

* Add changelog

Fix style
2022-09-27 16:26:22 +08:00
Chi-Hsuan Huang 84641b1c41
Fix enable guided mode button not trigger when its text is translated (#34843)
* Fix enable guided mode button not trigger when its text is translated

* Add changelog
2022-09-27 16:12:01 +08:00
Chi-Hsuan Huang fdbb6be37f
Fix Tour Kit stories loading error (#34831)
* Exclude debug module from webpack transpile to load tour kit stories

We originally added debug module in https://github.com/woocommerce/woocommerce-admin/pull/5987 to fix a IE11 issue.
Since we've drop IE11 support, it should be fine to remove it.

* Add changelog
2022-09-27 15:38:08 +08:00
Néstor Soriano 6e66de75cd
Add the WooCommerce features engine, take 2 (#34727)
Includes adapting the existing Admin features (enable analytics, enable the new navigation) to use the new engine.
2022-09-27 09:26:09 +02:00
Chi-Hsuan Huang ab484e579b
Fix failing to update onboarding profile data for PHP 8 (#34832)
* Fix failing to update industries

* Add changelog

* Update changelog

* Update onboarding profile unit tests to test all schema fields
2022-09-27 13:50:16 +08:00
Sam Seay c0fe3ec18f
Fix pnpm version to 7.11.0 in engines and in CI (#34773) 2022-09-27 11:30:52 +13:00
louwie17 c01c48c8c3
Add initial attributes section for empty state (#34751)
* Add new attributes section and attributes field with just an empty state

* ADd changelogs

* Add check to not render the blank section when attributes exist

* Fix misspelling
2022-09-26 14:44:06 -03:00
Jorge A. Torres daf00f7f13
[COT] Do not set order prop to NULL while reading order data (#34822)
Do not set order prop to NULL while reading order (HPOS)
2022-09-26 09:10:27 -07:00
Roy Ho 96cdef649a
Add changelog and bump version (#34838) 2022-09-26 07:02:12 -07:00
Greg 3089e3e969
Update e2e-pw link in README (#34768)
Update the link in the README for `e2e-pw` to point to the correct location
2022-09-26 07:51:15 -06:00
louwie17 1dc50326b7
Disable product management experience in dev env (#34836)
* Set product management experience to false in development

* Disable new-product-management-experience feature flag in development
2022-09-26 10:07:44 -03:00
Chris Lilitsas 63aa382ffb
Add a header for the "Add store details" task in woocommerce admin (#34712)
* Add store-details task header and ensure the aid is disabled when task is completed

* Add an illustration

* Update the texts

* Add changelog

* Revisit progress header styles

* Bring back ellipsis menu

* Align the ellipsis menu on the baseline

* Give some room to the badge in the sidebar

* Update progress bar color with variable
2022-09-26 15:19:47 +03:00
Chris Lilitsas 20b561f2f6
Enhance "Add store details" task onboarding experience (#34697)
* Change the visibility condition of the store details onboarding tour

* Add changelog

* Rename handler variable

* Modify aid description

* Cleanup
2022-09-26 14:52:23 +03:00
Barry Hughes 2098bdce0f
(HPOS/COT) Orders Admin List > Prevent user from paging out-of-bounds (#34793)
(HPOS/COT) prevent user from paging beyond available range (admin list table for orders).
2022-09-23 13:50:36 -03:00
github-actions[bot] 6e862af9ee
Delete changelog files based on PR 34807 (#34809)
Delete changelog files for 34807

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-23 06:35:22 -07:00
Luigi Teschio 510a7074bb
Update to WC Blocks 8.5.1 (#34807) 2022-09-23 15:26:51 +02:00
Maikel David Pérez Gómez 2eda531d46
Add shipping class section and dropdown (#34684)
* Add shipping class section and dropdown

* Add comment suggestions

* Add a Spinner during shipping classes resolution
2022-09-23 09:54:52 -03:00
Oleksandr Aratovskyi 013a5f25ec
Show APMs on the new Payments menu (#34581)
* Initial commit

* Implement APMs toggle button
- Add valid links to each APM
- Add valid link to the marketplace

* Implement APMs toggle button
- Add valid links to each APM
- Add valid link to the marketplace

* Refactor the code to be more explicit

* Delete the apm on toggle off if it's local state

* Implement FAQ simple block
- Style a notice about APM is enabled
- Add noreferrer and target=_blank to external links

* Add todo comments

* FAQ simple styling fix (improve padding)

* Fixes after inner review

* Add changelog item

* Address PR review comments

* Remove Affirm as it's not in the store

* Style fixes, proper internationalization and put valid link

* Styling fixes, translators comment, rename ApmsProps component to ApmListProps

* Two more styling fixes

* Styling fix

* Styling fix

* Remove text-decoration: none to match the design
2022-09-23 20:36:12 +08:00
Florian DANIEL aka Facyla 33b2bdc0cd
Error message in logs on CSV export error
Provide a useful feedback message when CSV export fails due to wrong permissions on wp-content/upload/ folder (or any other folder set by WC CSV Exporter module). 

This helps understand why CSV export fails under some conditions, by providing a hint on the error cause, instead of silently failing.
2022-09-23 12:47:44 +02:00
Vedanshu Jain b9f1f57e43
Fix failing WP nightly test (#34743)
* Fix failing by initializing properties.

1. wc_core_dir was earlier being initialized in by WC_Admin bootstrap file, after the monorepo merge, this is no longer needed and can be replaced by WC_ABSPATH directly. (Since WooCommerce core is not being mounted in a different folder).
2. $user was usually unintialized, but it still worked since when passing null it will autoset to 1. This is modified to either not handle this explicitly, and/or not pass any value when default is fine.

* Add changelog.
2022-09-23 13:27:59 +05:30
Jorge A. Torres f826c4bf55
[COT] Restore refund removal functionality when COT is active (#34785)
Change `get_post_type()` call in refund removal code to use COT APIs
2022-09-22 15:00:20 -07:00
Maikel David Pérez Gómez 7b55c334ad
Disable action buttons when product form is invalid (#34658)
* Disable action buttons when product form is invalid

* Move to trash action should be enabled when editing a product even when the form is invalid

* Hide Move to trash action button in the Add new product page

* Hide product link when the name field has any error

* Disable Publish options menu button when all menu items are disabled

* Test menu items by text instead of index
2022-09-22 17:47:44 -03:00
Roy Ho 6257d3f3a4
Delete cherry picked changelogs and some irrelevant entries (#34762) 2022-09-22 05:45:12 -07:00
Jorge A. Torres 1c5b9c54f9
[COT] Implement order preview functionality and edit by clicking order row (#34770)
Enable support for the Preview Modal within the COT/HPOS admin list table.

* Add `@since` to dobclock

* Update wc-orders JS script to work with COT

* Move order preview template to `Internal\Admin\Orders\ListTable`

* Add changelog
2022-09-21 13:52:44 -07:00
github-actions[bot] 56c790c8da
Delete changelog files based on PR 34717 (#34720)
Delete changelog files for 34717

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-21 05:46:34 -07:00
Paul Sealock a0c13abd83
pnpm 7 update: Remove unused dashes (#34754)
* remove unused dashes in pnpm scripts calling other pnpm commands

* changelog
2022-09-21 15:34:24 +12:00
Roy Ho d2b20dc993
Add changelogs and version bump for 6.9.3 release (#34752) 2022-09-20 12:35:06 -07:00
Vedanshu Jain 9400402f83
Enable backfill for orders from custom tables to wp_posts via CLI (#34676)
Introduce `wc cot sync` WP CLI command, replacing `wc cot migrate`.

* Use sync command instead of migrate.

* Add changelog.

* Docblock fixes.

* Update plugins/woocommerce/changelog/implement-wp-cli-backfill

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

* Update plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php

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

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-09-20 07:57:51 -07:00
Matt Sherman 9d96419520
Only show the product image upload tip once, and on all product edit pages (#34739)
* Only show the product image upload tip once, and on all product edit pages.
* Use max upload size in message.
2022-09-20 08:09:31 -04:00
Néstor Soriano e3a9ddee6d
Fix fatal error produced by the init_theorder_object method (#34730)
* Fix: init_theorder_object throwing an error

The error was thrown due to the return type of the method being
WC_Order (but can also be "false" or other type of object)

* Add changelog file
2022-09-20 16:54:42 +05:30
Vedanshu Jain c08551cd13
Remove typecasting to prevent fatal when $screen_id is null. (#34734) 2022-09-20 12:22:29 +02:00
Roy Ho 651c67eec8
Update pnpm command to run makepot (#34733) 2022-09-19 07:38:40 -07:00
Wojciech Zięba 6efae68b77
Update tracking parameters for mobile messaging (#34717)
Adds required tracking parameters to mobile messaging deep links.

Fixes #34716
2022-09-16 16:32:18 -07:00
Tam Mullen ffb27091f0
Skip Store owner can go through setup Task List test (#34715)
* Skip Store owner can go through setup Task List test

* Added changelog

* Explicitly change currency in before hooks to resolve dependency

* Update assertion for product import test

* Set currency on product import test

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2022-09-16 14:50:46 -07:00
Joel Thiessen 09bfa0b737
Allowing generic item type in new experimental SelectControl (#34547)
Co-authored-by: Joel <joel.thiessen@a8c.com>
2022-09-16 13:35:14 -07:00
Vedanshu Jain 7cec9b40a9
Revert "Add the WooCommerce features engine" (#34714)
Revert "Add the WooCommerce features engine (#34616)"

This reverts commit f65c775da3.
2022-09-16 11:06:39 -07:00
Tam Mullen 1b7554247c
Change the e2e selector for unchecking all business features (#34685)
* Change the e2e selector for unchecking all business features
* Update e2e uncheck business features in test setup
* Add theme selection to before hook for shipping task
2022-09-16 07:48:05 -07:00
Nima Karimi df42264740
Remove marketing transient on upgrade to 7.0 (#34679)
* Remove marketing transient on upgrade to 7.0

The recommended marketing extensions are stored in a transient (`wc_marketing_recommended_plugins`). When WooCommerce is upgraded, we need to remove that cached data from the transient so it can be repopulated using the new API.

Co-authored-by: Nima <nima.karimi@automattic.com>
2022-09-16 17:25:37 +03:00
Néstor Soriano f65c775da3
Add the WooCommerce features engine (#34616)
Includes adapting the existing Admin features (enable analytics, enable the new navigation) to use the new engine.
2022-09-16 09:17:22 +02:00
Sam Seay 04b74c1053
Upgrade to pnpm 7 (#34661)
* Remove -- -- from scripts that fixed issue in pnpm 6, fix a couple TS issues in sep packages
* Minor fixes to analyzer scripts and doco based on pnpm 7
* Add dompurify types to data package to avoid TS errors
* Remove pnpx in favor of pnpm exec
* Modify the code analyzer to respect pnpm version if present.
* Update instructions for running recursive lint, add comments to explain
2022-09-16 09:21:42 +12:00
Barry Hughes cd31ec0dd5
Stock checks not required if stock levels have already been reduced. (#33575)
* Stock checks not required if stock levels have already been reduced.

* Changelog.
2022-09-15 17:57:22 -03:00
Roy Ho 45559775c9
Prep/code freeze 7.0 (#34704)
* Delete changelog files from 7.0 release

* Remove merged changelog
2022-09-15 13:05:06 -07:00
Roy Ho 8de1d67d7b
Version bump and add changelog entry post 6.9.2 release (#34701) 2022-09-15 11:47:46 -07:00
Fernando Marichal dadb1d6a87
Price section - Small refactor and style fix (#34558)
* Fix modal

* Add method sanitizePrice to `useProductHelper`

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/pricing-section.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/pricing-section.tsx

* Add changelog

* Add sales validation

* Add sale price validation

* Fix regularPriceProps

* Set list price when it's empty

* Fix Sale price validation

* Check empty regular_price

* Small refactor to use-product-helper

* Remove method `maybeSetRegularPrice`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-09-15 10:56:33 -03:00
Luigi Teschio b50f651129
Update WooCommerce blocks package to 8.5.0 (#34654) 2022-09-15 05:37:19 -07:00
Kathy c7fc3c51c2
Filter is_purchasable when getting cart item from session (#26179)
* Add filter woocommerce_cart_item_is_purchasable when getting cart item in session

* Add changelog.

* Do not migrate orders in auto-draft.

* Add $product to filters for convinience.

* Add changelog.

* Revert "Do not migrate orders in auto-draft."

This reverts commit 614586d0c4.

* Also add product param in new filter.

* fix docblocks.

* more docblock fixes

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-09-15 09:10:02 -03:00
Vedanshu Jain f534823f6d
Use localised time when displaying order date. (#34687) 2022-09-15 12:05:28 +02:00
RJ 828f66a54f
Added tracks for mobile welcome modal (#34670) 2022-09-15 16:26:43 +08:00
Néstor Soriano 2b8d1fbe11
Add the AccessiblePrivateMethods trait (#34019)
This trait allows to mark private and protected methods as externally
accessible. There are also utility add_action and add_filter methods
that mark the method as accessible and use it as callback in one
single step.

Additionally, all the classes that were hooking to private methods using an
anonymous function in the 'src' directory are changed to use the new
AccessiblePrivateMethods trait instead, thus they can be unhooked now.
2022-09-15 09:24:35 +02:00
Gan Eng Chin b73b2fff0a
Set multichannel-marketing feature flag to `true` in `core.json` (#34683) 2022-09-15 14:59:32 +08:00
RJ 29e70faf0f
fix: handle mobile app wrong user connection for mobile app modal (#34653) 2022-09-15 12:10:05 +08:00
RJ 641bdabc5e
Add: get mobile app task in additional tasks (#34651) 2022-09-15 12:06:03 +08:00
RJ 6e2ada3706
Add: mobile app welcome modal and magic link (#34637) 2022-09-15 11:58:47 +08:00
Corey McKrill a0768a086c
REST API: Add include_meta and exclude_meta params for orders and products (#34478)
Introduces two new collection params for v2 and v3 orders and products REST API endpoints. These params allow for limiting which meta keys are included in the meta_data property of the API responses.

Fixes #34243
2022-09-14 16:02:43 -07:00
Wojciech Zięba 361437c785
Add mobile messaging to new order emails (#34467)
For email notifications to store owners about new orders, adds messaging with deep links to open the orders directly from the Woo mobile app when the new order meets certain criteria. If the store owner has not yet used the Woo mobile app, instead provides a link to download the app.

Fixes #34544 

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2022-09-14 16:00:47 -07:00
louwie17 868b335aee
Fix remote inbox notification showing up for wrong country (#34632)
* Only run remote inbox notification once onboarding has been skipped or completed

* Add callback for add_option for profiler as well

* Add changelog

* Add extra condition to check if store address or country has actually been set

* Update rule to check if default location is set, if so return false

* Revert initial changes and update changelog description

* Added tests and updated logic a bit

* Add comment for long condition
2022-09-14 16:31:25 -03:00
AnnaMag 01925e61e3
Reintroduce JITMs in the WC Admin. (#34383)
* Add JITMs

* Fix styles

* Remove styles

* Add changelog.

* Add notice-list div

* Move hidden jitm style

* Move hidden jitm style

* Fix style

* Fix `margin-right`

* Remove `important`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-09-14 13:05:54 -03:00
Barry Hughes 012a8b4655
Prevent fatal errors during uninstall (#34469)
We need to bootstrap WooCommerce during uninstall to prevent fatal errors when `WC_REMOVE_ALL_DATA` is true.
2022-09-14 08:44:01 -07:00
Jorge A. Torres 2d3aa4fd45
Redirect new/edit/delete URLs from CPT implementation to COT (#34644)
Redirect legacy/CPT admin order URLs when Custom Order Tables are enabled.

* Add utility method to generate a link to the orders screen

* Add `PostsRedirectionController` to handle redirection from CPT-based URLs to new ones

* Use the redirections controller inside the orders screen PageController

* Add changelog

* Add check for COT enabled before enabling redirection controller

* Add support for trashing orders

* Update changelog

* Take into account ‘shop_orderplacehold’ when redirecting

* Correctly handle bulk actions
2022-09-14 08:42:48 -07:00
Peter Fabian 61e1cde33a
Fix/34667 (#34671)
* Add check for when the styles filter is used unexpectedly.

* Changelog
2022-09-14 09:52:47 -03:00
Gan Eng Chin 4b4b5f36e2
Feature integration: UI Revamp on Marketing Page (#34642)
Co-authored-by: Nima <nima.karimi@automattic.com>
Co-authored-by: Nima Karimi <73110514+nima-karimi@users.noreply.github.com>
2022-09-14 15:43:30 +08:00
Roy Ho 18e22dfac4
Prep trunk post 6.9 release (#34660) 2022-09-13 16:19:49 -07:00
Roy Ho 12af191888
Update mailer logic (#34659) 2022-09-13 15:32:35 -07:00
Tam Mullen 3e85dde082
k6: Update existing tests for COT (#34582)
* Update k6 tests to remove linting errors, replace custom metrics with tags, and add ability to run against COT

* Added changelog

* Updated readme for new k6 perf config variables & removal of custom metrics

* Updated k6 tag names
2022-09-13 12:40:28 -07:00
Maikel David Pérez Gómez 5e57471c5a
Collapse the short description module by default (#34619)
* Collapse the short description module by default

* Add a descriptive tooltip to description and short description editors
Product description editor shows a tip text that clarify the purpose of the editor
Product short description meta box title shows a tip text that clarify the purpose of the editor

* Add changelog file

* Add translatable text to short and description of the product
2022-09-13 11:23:25 -03:00
Barry Hughes f9a27d380f
[COT] Fix editor trash link (#34483)
Ensure move-to-trash link (within the COT editor) works as expected.
2022-09-13 11:58:36 +02:00
RJ bae061a421
dev: change webpack config to use asset modules instead of custom loaders (#34649)
- asset modules are a new webpack 5 feature that handles inlining or extracting resources
2022-09-13 17:40:56 +08:00
Peter Fabian 4eccddf140
Remove foreign key from the wc_download_log table (#34318)
* Remove the FK from the download log table.

It's unnecessary and forces InnoDB engine.

* Delete also related download logs.

To replicate the FK behaviour.

* ON DELETE CASCADE in PHP

* Changelog.

* Bump the version when this will be included.

* Fixed missing select in subquery.

* Fix copypasta error.

* Remove accidentally added file.

* DRYing.

* Bracketing.

* Slight refactor to make it easier to read.

* Remove the FK from the download log table.

It's unnecessary and forces InnoDB engine.

* Delete also related download logs.

To replicate the FK behaviour.

* ON DELETE CASCADE in PHP

* Changelog.

* Bump the version when this will be included.

* Fixed missing select in subquery.

* Fix copypasta error.

* Remove accidentally added file.

* DRYing.

* Bracketing.

* Slight refactor to make it easier to read.

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2022-09-12 10:42:39 +02:00
RJ d191ecc275
fix: set shipping defaults when address details not filled out (#34610) 2022-09-12 11:46:40 +08:00
Barry Hughes 03b9032de8
Coupons Controller → Import `Exception` class. (#34562)
Import `Exception` class.
2022-09-09 14:24:13 -07:00
Barry Hughes d375c3b609
[COT] Bulk actions for trashing etc (#34425)
Implement trash/untrash/delete permanently bulk actions for COT admin list table.

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2022-09-09 12:04:42 -07:00
Vedanshu Jain 657dceaba1
Update post directly to update correct post_modified value (#34611)
Update post directly to update correct post_modified value.

If we use wp's update_post function, then it will set the post-modified date to current time(). This is not desirable when backfilling order data where we want post data to be exactly the same as orders.

* Add changelog.

* Added protections and code standard fixes.

* Use wp_update_post so that hooks fire as usual.
2022-09-09 10:28:24 -07:00
Roy Ho 232d26846a
Remove/assets (#34633)
* Remove legacy assets source files from distribution

* Remove assets source files from distribution
2022-09-09 10:20:25 -07:00
Vedanshu Jain 1f2fc60a04
Add and use ON_DUPLICATE_KEY update function to perform update/insert (#34590)
* Add and use ON_DUPLICATE_KEY update function to perform update/insert without additional query.

* Fix typo

* Add more tests for save related functions.
2022-09-08 14:58:36 -03:00
Daniyal Ahmed d425d9374c
Update form-login.php (#34537)
* Update form-login.php

Fix #31742

* Add changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-09-08 14:04:25 -03:00
Barry Hughes 93a82c3f3e
Customer Notes for COT (#34477)
* Support customer notes within COT orders.

* Support setting customer notes from the COT editor.

* Changelog.
2022-09-08 09:39:08 -03:00
Paul Sealock fa2e7f7e96
Version Bump: Add CLI utility (#34555) 2022-09-08 19:48:01 +12:00
RJ 52ba69d712
fix: add tracks for shipping default settings tour (#34601) 2022-09-08 12:39:53 +08:00
Christopher Allford 341880b79b
Fixed Asset Output Caching (#34606)
This updates Turborepo and adjusts the output caching for `woocommerce/client/legacy` and `woocommerce/client/admin`. The result is that build outputs in `plugins/woocommerce/assets` should be stored correctly.
2022-09-07 13:57:15 -07:00
Gan Eng Chin a197622df1
Replace Facebook icon (#34592)
* Replace facebook icon.

* Use facebook.svg file instead of duplicating svg.

* Add changelog.
2022-09-07 22:45:05 +08:00
Matt Sherman beb6a6f4c7
Fix product list price help label to properly reflect tax settings (#34564)
* Fix product list price tax included help label

* Add changelog entry for products list price help label.
2022-09-07 09:33:12 -04:00
Timstreep 966cff5e7a
Update listing content (#34587)
Adding changes to improve search discovery for important ecommerce-related keywords such as 'product pages' and 'online store'.
2022-09-07 13:43:49 +02:00
aezazs-multidots f9642fedc8
fix-marketing-slider-image-size (#34589) 2022-09-07 16:32:46 +08:00
Chi-Hsuan Huang a2cfc2f1f5
Update get_product_data to send request with a locale query param for translation (#34461)
* Update get_product_data to send request with a locale query param for translation

* Add changelog

* Fix lint

* Update PRODUCT_DATA_TRANSIENT format for translations
2022-09-07 16:28:44 +08:00
Siddharth Thevaril 105355f967
[COT] feat/34436: implement column_default for ListTable (#34445)
* implement column_default for ListTable

* set priority to 0

* Add changelog

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-09-06 20:45:52 -03:00
Vedanshu Jain 646c2636e4
Add more indexes (and remove wc_orders.id auto_incr) for performance (#34588)
* Performance tune database.

* Add changelog.
2022-09-06 20:14:20 -03:00
Fernando Marichal ff0430d847
Fix recording events without props (#34595)
* Fix tracking events without props

* Add changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-09-06 16:37:31 -03:00
Maikel David Pérez Gómez e2afc5c13d
Validate that tinymce exists before using it. (#34551)
* Validate that tinymce exists before using it.
If wp is not configured to use blocks and the tinymce was changed by a different editor then the error happends because tinymce is required. Applaying a validation that makes sure tinymce exists before using it solves the problem. But this introduces a new problem, the description property will be send with value 'No' when event 'product_update' will be fired.

* Add changelog file

* Check if tinymce.get( 'content' ) is not falsy before calling getContent()
2022-09-06 15:37:18 -03:00
Matt Sherman c87d3c68cb
Products pricing section code cleanup (#34560)
* Switch to formatAmount from formatCurrency

* Rename priceValidation to sanitizeAndSetPrice

* Swap order of name, value args in sanitizeAndSetPrice
2022-09-06 10:48:50 -04:00
Tomek Wytrębowicz a86e387667
Update/unify jest@27 across all packages (#34322)
* Update `jest-puppeteer@5.0.4` (from `4.4.0`)

to be albe to run with jest 28.

* Update `jest` and `ts-jest@^27` (from `25`),

to match `e2e-environment` needs.

* Update api-core-tests' `jest@^27` (from `25`),

to unify the used version across the stack.

* Update e2e-env's `jest@^27` & co.  (from `25`),

to unify the used version across the stack.

* Update e2e-env's `@jest/test-sequencer@^27`  (from `25`),

to unify the used version across the stack.

* Update admin-e2e-tests' `@jest/globals@^27`  (from `26`),

to unify the used version across the stack.

* Update woocommerce's `jest@^27.5.1`  (from `25`),

to unify the used version across the stack.

* Replace `mocked` from `ts-jest` to the one from `jest`,

Update `@types/jest@27.4.1` from `27.0.2`.
Try to fix broken tsc build.

* Update `e2e-core-tests`' `@jest/globals@^27.5.1`

from `^26.4.2`.

* Remove changelog entry for bumpin jest in `api-core-tests`

It was already covered in `trunk`.

Addresses https://github.com/woocommerce/woocommerce/pull/34322#discussion_r956019567

* Updated package-lock.yaml

* Updated timeout

* Added changelogs

Co-authored-by: jamelreid <jnoelreid@gmail.com>
2022-09-06 09:29:45 -05:00
Damon Cook 8b1a105f39
Fix Button block markup for Onboarding homepage (#33966)
* Fix Button block markup for Onboarding homepage

* Add changelog entry

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-09-06 15:27:59 +05:30
Christopher Allford 6457348a97
Validate React Admin Changelog Files (#34520)
This maps the changelog command of the React Admin in order to ensure that they're validated and able to be added.
2022-09-05 13:02:00 -07:00
github-actions[bot] 59ee9418e7
Delete changelog files based on PR 34543 (#34577)
Delete changelog files for 34543

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-04 16:45:15 -07:00
github-actions[bot] 06da4144d0
Delete changelog files based on PR 34443 (#34575)
Delete changelog files for 34443

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-04 16:43:24 -07:00
github-actions[bot] c0e1b1abb4
Delete changelog files based on PR 34495 (#34573)
Delete changelog files for 34495

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-04 16:40:38 -07:00
github-actions[bot] 9345d34164
Delete changelog files based on PR 34455 (#34571)
Delete changelog files for 34455

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-09-04 16:37:35 -07:00
Tom Cafferkey e478f1a286
Bump WooCommerce Blocks to 8.3.2 (#34543) 2022-09-04 16:32:52 -07:00
Brian b82638c131
Liechtenstein Checkout: Hide Municipality Field with empty states array (#34189)
empty states array for liechtenstein
2022-09-02 13:20:28 +02:00
berislav grgičak ca91250b2e
Add WooCommerce header to WooCommerce.com requests (#33927)
* Add WooCommerce header to WooCommerce.com requests

* Remove duplicate user-agent

* Add header to suggestions request

* Add missing comma
2022-09-02 11:12:52 +02:00
Fernando Marichal 30151a6cf7
Add `recordEvent` validation to Tracks package (#34005)
* Add `recordEvent` validation

# Conflicts:
#	packages/js/tracks/package.json

* Convert tests to ts

* fix error message

* Add console.error message

* Fix `validateEventNameAndProperties`

* Add changelog

* Add validation method

* Fix tests

* Fix package

* Move changelog

* Add changelog

* Fix type

* Move env definition

* Fix tests

* Fix condition

* Fix regex and tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-09-01 13:34:42 -03:00
Peter Fabian 834d4945ad
Update Guernsey state field to non-required (#34500)
* Update Guernsey state field to non-required

Resolves woocommerce#32876 by making GG state field entry non-required.

* Update Guernsey state field with correct label

Based on https://en.wikipedia.org/wiki/Guernsey#:~:text=Guernsey%20(%2Fˈ%C9%A1ɜ%CB%90rn,Guernsey%2C%20a%20British%20Crown%20Dependency.&text=It%20is%20the%20second%20largest,west%20of%20the%20Cotentin%20Peninsula it looks like the state equivalent for GG is to "Parish" so rather than hiding the field entirely, it makes more sense to make it optional, and add the correct label.

* Added changelog.

Co-authored-by: Rynaldo <89896100+rynaldos@users.noreply.github.com>
2022-09-01 18:19:43 +02:00
Moon b4b7b4c329
Update/34540 add walmart and wish to store list (#34541)
* Add Wish and Walmart to the platform options

* Add changelog
2022-09-01 09:11:42 -07:00
Matt Sherman cf37a5dcfb
Use label prop on sale price input instead of separate label element (#34532)
Use label prop on sale price input instead of separate label element.
2022-09-01 11:09:22 -04:00
Vedanshu Jain 345f250a58
Add util methods to get order edit and create URLs (#34499) 2022-09-01 15:58:07 +02:00
Ilyas Foo 5af66c4b1e
Remove set up store details note (#34515)
* Remove CompleteStoreDetails note

* Changelog
2022-09-01 09:53:51 +08:00