Commit Graph

8657 Commits

Author SHA1 Message Date
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
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
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
Dharmesh Patel 9e9b4ef844
[COT] Fix error during apply coupon when COT enabled. (#34498)
* implement coupon held methods.

* Add changelog file.

* Used `delete_meta_data` of WC_Coupon and cleared meta cache after  adding coupon held meta.

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-08-31 15:21:22 +05:30
Chi-Hsuan Huang e687a48abf
Update dependencies and jest config to pass admin tests for pnpm 7 (#34428)
* Update @wordpress/data version to ^6.15.0

* Update jest.config.js to transform is-plain-obj js

* Update pnpm-lock.yaml

* Add changelog

* Add babel configs and update jest config

* Update tsconfig.json to exclude babel.config.js

* Add missing @types packages

* Add changelog

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Fix DateTimePickerControl type errors
2022-08-31 12:06:51 +08:00
Moon 2a455d1bdc
Add missing styles for the progress header (#34521)
* Add styles for the progress header

* Add changelog

* Fix invalid header error from the changelog -- this file is not related to this repo, but I am still fixing it since it is not passing the gitflow job
2022-08-30 20:35:39 -07:00
Daniyal Ahmed dc10473fe8
No states for Saint Martin - French Part (#34014) 2022-08-30 15:48:00 +02:00
Fernando 33405283cd
Add Pricing section (#34382)
* Add pricing inputs

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx
#	plugins/woocommerce-admin/client/products/layout/product-section-layout.scss
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

* Add pricing inputs

* Add validation

* Fix scss

* Moved validations

* Add tests

* Add regex validations

* Add tax settings

* Fix comment

* Add product name validation

* Fix validation copy

* Rename `woocommerce-add` classes

* Fix texts i18n

* Remove image section

* Fix decimal separator error

* Add `FormSection` component

* Fix `Enriched-label` component

* Add packages changelog

* Removed not used styles

* Add error handling

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-30 10:26:24 -03:00
Peter Fabian 5af8f8cbdc
Tests for foreign key removal (#34416) 2022-08-30 12:50:13 +02:00
Albert Juhé Lluveras 05b171d4aa
Enable WC Customizer panels in customize.php routes also for block themes (#34443) 2022-08-30 12:47:10 +02:00
Jorge A. Torres 45563f0c11
[COT] Initialize order date props during `read()` as GMT (#34474)
* Load order date props as timestamps in COT
2022-08-30 12:30:03 +02:00
Chi-Hsuan Huang f813153ac5
Fix country field is empty when navigating back to the store details tab (#34484)
* Add is_store_country_set to onboarding profile items

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

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

* Refactor OrderMilestones to have get_note method

* Add unit tests for notes

* Fix wrong content data return type

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

* Add missing field "is_read" to notes item schema

* Add changelog

* Fix test_get_notes_schema test
2022-08-30 09:42:32 +08:00
Néstor Soriano 427b3fbdc2
Make Yoda conditions mandatory again (#34335)
* Make Yoda conditions mandatory again

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

* Add changelog

* Rename prop

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

* Add spotlight parameter experimental product task menu

* Changelog

* Fix yoda
2022-08-29 14:19:59 +08:00
Christopher Allford ad8f1de6d1
Fix "Orders" Plurality (#34491) 2022-08-26 14:34:40 -07:00
Gan Eng Chin 945a55adbc
Update Google logo icon (#34471)
* Update Google logo icon.

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

* Simplify ProductIcon CSS with size prop.

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

* Add changelog.

* Set style for Google logo icon.

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

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

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

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

* Added changelog

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

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

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

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

Resolves: #28410

* Update Content Type of inline delivered files

* Update Downloaded file name

* Change content-disposition to be a checkbox

Since inline-delivery works with multiple download methods

* Document  function

* Add new setting for test, see #31145.

* Better setting wording and remove typo comment.

* Address pr feedback.

* Add changelog.

* Rephrase the settings to make it more clear.

* More rephrasing.

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

* Cleanup f26e62502c
* Remove extra tab
* Changelog.

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

* Implement `get_order_count()` in the COT datastore

* Implement `get_unpaid_orders()` in the COT datastore

* Implement `get_orders()` in the COT datastore

* Add unit tests for misc. COT datastore methods

* Add changelog

* Apply suggestions from code review

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

* Rename var

* Update docblock

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

* fix URL

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

* Revert skip button changes -- e2e tests

* Remove unexpected whitespace

* Update test snapshot

* Return early

* Remove test
2022-08-24 19:33:31 -07:00
Vedanshu Jain b2c3ef8f29
Add support for refunds and other order types in custom order tables (#34050)
* Add suppport for types and refund in migrations.

* Add changelog.

* Make CI happy.

* Add support for refunds save and read.

* Remove placeholder from order types eligible for migration.

* Link backfilling to migration process.

* Add changelog.

* Reduce batch size for backfilling since it is slower.

* Correct grammer.

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

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

* Remove _recorded_sales from skipped check keys since its implemented.

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

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

* remove yoda condition.

* Remove unintended change.

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

* Remove unsetting type, its supported now.

* Add support for backfilling order types with different datastores.

* Use correct datastore while migrating.

* Support -1 for limit queries

* Order factory to support reading multiple order types.

* Add read_multiple to refunds data store.

* Return negative total for consistency with posts table implementation.

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

* Remove type definations for back compat.

* Add test for get_orders

* Use persist_udpates method for consistency and DRY.

* Resolve conflict correctly.

* Removed duplicated methods.

* Use correct order in doc comment.

* Fix typo

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

* Rename parameter for better clarity.

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

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2022-08-24 12:06:15 -07:00
Tarun Vijwani a0ba266e75
Update WooCommerce blocks package to 8.3.1 (#34359) 2022-08-24 11:41:37 -07:00
susameca b8177b82e0
Fix Bulgarian States for Sofia (#34381)
Update subdivisions for Bulgaria.

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

* Add changelog

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

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

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

* Adding changelog

* Adding package changelog

* Making component more than barely functional

* Removing unnecessary export

* Rename directory to date-time-picker

* Add initial story

* Pass datetime to onChange callback

* Localize error string

* Remove initial error prop

* Rename currentDate to initialDate

* Simplify state for selected date

* Add extra stories around component

* Trigger onChange whenever date is changed

* Add readme

* Allow currentDate to be changed via props

* Update readme

* Update name to DateTimePickerControl

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-08-23 15:19:46 -07:00
Barry Hughes 852dc0ca61
Integrates the COT admin list table and COT-based search. (#34421)
* Integrates the COT admin list table and COT-based search.

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

* Always add `DISTINCT` to order queries.

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

* Changelog.

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

* Tidy.
2022-08-23 12:15:39 -05:00
Chi-Hsuan Huang 9e891cf47b
Fix marketing task placeholder flash after a plugin is installed (#34414) 2022-08-23 12:07:30 +08:00
Chi-Hsuan Huang c612d04819
Fix store details fails to save store address after navigating back to the tab (#34426) 2022-08-23 11:44:51 +08:00
Chi-Hsuan Huang b07029873b
Update remote inbox notifications readme (#34411)
* Update remote inbox notifications README.md

* Add changelog

* Update readme
2022-08-23 08:20:41 +08:00
Paul Sealock e651a46fb6
Turbo: Avoid caching result of `build:feature-config` (#34296) 2022-08-22 16:28:57 +12:00
Chi-Hsuan Huang 4841595f2f
Fix texts in wp-admin-scripts not translated (#34371)
* Fix texts in wca client/wp-admin-scripts are not translated

* Add changelog

* Fix Navigation/Init.php

* Fix code sniff errors

* Fix param type

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

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

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

* Add changelog

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

* fix format

* Update Reviews.php

* fix extra space

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

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

* added docblock

* renamed filter, array syntax

* Add changelog.

* Adjust hooks per coding standards.

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

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

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

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

* Create a product link modal for editing product link

* Only show permalink when product is published

* Add changelogs

* Add changelog for data package

* Change save button to primary

* Fix merge conflcts

* Add getPermalinkParts selector to products store

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

* Add changelog.

* Reduce batch size for backfilling since it is slower.

* Correct grammer.

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

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

* Remove _recorded_sales from skipped check keys since its implemented.

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

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

* remove yoda condition.

* Remove unintended change.

* Revert from using gmdate.

* Remove hardcoding.

* Remove doc block for fake option support.

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

* Add async example

* Reorganize getItemPropsType type

* Create separate MenuItem component

* Update items to use value/label pairs

* Add fuzzy matching example

* Use MenuItem component in example

* Add callback method example and onSelect prop

* Add custom render example

* Add styling

* Simplify Menu component

* Add changelog entry

* Update SelectControl to DeprecatedSelectControl

* Rename SearchControl to SelectControl

* Add readme

* Add placeholder prop

* Add icon to combox box

* Rename deprecated SelectControl classes

* Add changelog entries

* Pass menu props to menu to fix ref issues

* Update lock file

* Rebase and update lock file

* Fix up IDs in e2e tests

* Make list structure more semantic

* Fix update conflict with pnpm-lock

* Move new SelectControl to experimental

* Change experimental class name to avoid style conflicts

* Fix up latest lock file from rebase

* Remove onboarding e2e changes

* Update changelogs

* Update lock file again

* Update pnpm-lock and fix lint error

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

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

* Fix wrong get_action return type

* Add changelog

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

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

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

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

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

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-08-18 15:37:52 +08:00
Alejandro López Ariza 64b0b2865e
Added new command to set up the local environment with COT enabled. (#34321)
* Added new command to set up the local environment with COT enabled.

* Removed new file added to e2e-environment, which we will no longer be using.

Co-authored-by: jamelreid <jnoelreid@gmail.com>
2022-08-18 08:49:20 +02:00
Chi-Hsuan Huang 6d96a6e4c1
Exclude asterisk from Country / Region translation string (#34368) 2022-08-18 12:17:13 +08:00
RJ e3d0558447
add: store address tour tracks (#34337)
Added tracks event for store address tour dismissal with schema:

'wcadmin_settings_store_address_tour_dismiss'
{
  source: 'done-btn' | 'close-btn',
  fields_filled: {
    address_1: boolean;
    address_2: boolean;
    city: boolean;
    postcode: boolean;
  }
}
2022-08-18 10:10:22 +08:00
Chi-Hsuan Huang 26a3d0d3c1
Update inbox notes to display localized strings when locale changed (#34038)
* Add a filter woocommerce_get_note to modify note before it is returned

* Make ChoosingTheme.get_note public so we can call it outside

* Implement the get_note filter to return localized strings

* Create get_actions method to reuse it in RemoteInboxNotificationsEngine

* Implement get_note filter in RemoteInboxNotificationsEngine to return localized note

* Add changelog

* Make GivingFeedbackNotes.get_note public so we can call it outside

* Check if note class has NOTE_NAME constant

* Update WooSubscriptionsNotes to show localized content

* Rename filter hook name

* Remove todo to pass php lint

* Update filter description

* Move locale check into individual filter functions

* Fix get_note_from_db logic

* Fix php lint errors

* Update the filter doc

* Add test for spec-runner.php

* Add tests for RemoteInboxNotificationsEngine

* Remove unneeded check

* Check if $note_from_class is instance of Note class

* Fix unit test
2022-08-18 09:53:40 +08:00
Jamel Noel Reid b85819f2a9
Fix broken API tests (#34345)
* Bumped jest to v27

* Used jest in packaged node_modules

* Jest bump

* Removed puppeteer related code

* Updated CHANGELOG

* Added changelog
2022-08-17 11:04:41 -07:00
Néstor Soriano 5f257ed7d0
Fix inconsistent order total on checkout vs manual order page (#33812)
* fix: tax calculation and coupon sequence

* add phpunit skeleton

* Refactor calc_line_taxes and add_coupon_discount

The methods are moved to separate classes in src/Internal,
and two new "core" methods that exclude HTTP processing are added.

* The test partially passes now

* Final fix to unit tests, and fix remaining formatting issues

* Add changelog file

* Fix path to html-order-items.php

Co-authored-by: Siddharth Thevaril <siddharth.thevaril@gmail.com>
2022-08-17 14:56:28 +05:30
Ismael Martín Alabarce 115cac05de
Add WC Payments welcome page experiment (#34251)
* Show WCPay welcome page to all eligible merchants.

Remove the experiment and also check for marketplace suggestions.

* Update banner design and copy

Replace background `wcpay-banner.png` with `wcpay-offer.svg`, `flag.j` svg component with `gift.js`. Adjust styles and ensure it's responsive.

* Add more requirements.

Don't register it when there is an existing WCPay account or the site is on a WPCOM starter plan.

* Update promotion and FAQ copy

* Add the new experiment.

And remove the supported country check to use Explat instead.

* Add changelog entry

* Remove WPCOM starter plan check

* Remove Yoda comparisons

* Update `wcpay_exit_survey` event.

Record it also when the user chooses `Just remove` and use snake_case to avoid Track errors.

* Country and time conditions.

Only for US based businesses with a live store of at least 90 days.

* Update design and copy to match new requirements

* Update promo ID

* Fix country condition

* Load SVG as image instead of background

To prevent wrong asset generation due to Webpack configuration

* Fix WCPay installed condition

* Update promo ID

* Update promo ID in allowed notes

* Update FAQ copy

* Add `apply_filters` docblock

* Add missing `@since` to docblock comment
2022-08-17 17:11:51 +08:00
Rommel Castro 796c52018f
Add `wc com connect` command (#34073) 2022-08-17 10:21:16 +02:00
Paul Sealock 7a1048340e
Delete changelog files based on PR 34354 (#34355)
Delete changelog files for 34351
2022-08-17 18:33:04 +12:00
Chi-Hsuan Huang 64e14ebe7d
Enhance/34244 update data source poller for i18n (#34247)
* Update data source poller for i18n

* Update unit test

* Remove unnecessary change_locale hook

* Fix payment-gateway-suggestions unit test
2022-08-17 12:06:46 +08:00
Ilyas Foo cd5ffed61b
Deploy payments banner in settings page (#34326)
* Deploy payments banner in settings page, updated tests

* Add track on banner CTA click

* Add test for track

* Changelog

* Fix unit tests
2022-08-17 11:33:24 +08:00
Moon 68985e3222
Fix: Smart shipping defaults bug (#34351)
* Do not create default shipping zones when a shipping zone already exists

* Add changelog

* Use woocommerce_admin_skipped_creating_default_shipping_zones to avoid triggering spotlight tour

* Set woocommerce_admin_reviewed_default_shipping_zones to yes to prevent spotlight tour for the existing shipping zones
2022-08-16 20:18:52 -07:00
Eric Jinks 3739c425ac
Remove WCPay Subscriptions offer page experiment code (#34317)
* Remove WCPay Subscriptions offer page experiment

This removes all code added in PR#32957 as experiment has ended.

(WooCommerce > Subscriptions admin menu item and empty state offer screen)

* Add changelog entry
2022-08-17 15:07:39 +12:00
Peter Fabian 82b95fb474
Remove PHP 8.1 warnings and errors (#34336)
* Make the php file valid

* Remove code that's no longer in PHP.

mysql_* functions were removed in PHP 7.0

* Remove deprecated setting.

This only helps detecting \r as end of line and that should only be used in old MacOS 9 which is 20 years old by now.

* Changelog

* Added compulsory file comment.

* Removed forgotten phpcs flag

* ...and more cleanup.
2022-08-16 10:22:53 -07:00
Jorge A. Torres ecec9eaa76
[COT] Respect status flags `show_in_admin_(all|status)_list` in orders list table (#34290)
* Implement filtering by status in list table

* Respect ‘show_in_admin_status_list’ in list table

* Display correct status name for ‘draft’ and ‘trash’ post statuses
2022-08-16 12:37:46 +02:00
Sam Seay f4595c6ed4
Fix a bug crashing wp-env 5.1.0 in CI (#34274)
* remove `core: null` from wpenv json config
* peg wp-env to 5.1.0
2022-08-16 13:21:52 +12:00
Chi-Hsuan Huang ed9cd231d2
Add unit tests for orders milestone note (#34295)
* Refactor OrderMilestones.php

* Add unit tests for Orders Milestones note

* Add changelog

* Update OrderMilestones.php

* Fix OrderMilestones.php
2022-08-16 08:42:11 +08:00
Chi-Hsuan Huang 71ffd2c548
Update "context" prop of task list click/view event (#34297)
* Update Update context prop of wcadmin_tasklist_/view event

* Add changelog
2022-08-16 08:41:59 +08:00
Jamel Noel Reid 40dbc1f924
Update CI to use wp-env for api, e2e and performance tests (#34311)
* Renamed e2e to e2e-legacy

* Moved e2e folder to tests/e2e

* Updated gitignore

* Updted init script to work with wp-env

* Updated readme

* Updated commands to match new test structure

* Updated workflow to work with new test structure

* Added changelog

* turned off alternate wp cron in test

* Fixed path to playwright config

* Renamed e2e to e2e-pw

* Renamed e2e-legacy to e2e

* Updated e2e-pw path

* Fixed workflow

* Fixed csv test

* Updated .gitignore

* Removed puppeteer specific step
2022-08-15 11:47:53 -07:00
Barry Hughes 7021d442bd
Clear post cache after updating menu order for products. (#34195) 2022-08-15 07:28:14 -07:00
Rommel Castro 2ab9398167
Add `wc com disconnect` command (#33999)
* extract `disconnect` function

* extract `is_site_connected` function

* add `wc com disconnect` command

* add changelog

* fix phpcs errors
2022-08-15 09:54:55 -03:00
Chi-Hsuan Huang de46baf8fc
Fix review shipping option task title (#34294)
* Fix Review Shipping Options Task title

* Add changelog

* Reformat by phpcbf
2022-08-15 17:41:12 +08:00
Adrian Duffell d6224d8a0c
Add Facebook Extension to Onboarding (#34303)
* Add facebook logo

* Add facebook to OBW

* Add pinterest to OBW

* Add changelog

* Revert "Add pinterest to OBW"

This reverts commit cd99fb296c.

* Update changelog

* Update facebook URL

* Switch the “alt” data

* Update manage url
2022-08-12 14:54:53 -07:00
Peter Fabian 0f99bd4e8d
Fix/forgotten template version (#34308)
Corrected the template version.
2022-08-12 08:23:34 -07:00
Barry Hughes 1a4060d689
Fix/34271 unlimited results (#34289)
Support for unlimited ('-1') results in COT queries.
2022-08-12 08:22:32 -07:00
Fernando 4693e251f7
Add product name and checkboxes for Product details (#34214)
* Add product details

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

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

* Rename folder

* Fix help icon

* Fix form

* Removed useless `useState`

* Add `getCheckboxProps`

* Add params to getCheckboxProps

* Add recordEvent

* Rename event

* Add changelog

* Fix texts

* Remove Fragment

* Fix useState initial state

* Convert EnrichedLabel to TS

* Fix unknown value prop

* Rename event

* Move EnrichedLabel

* Fix js warning

* Add storybook

* Add readme

* Add components changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-12 10:47:54 -03:00
RJ 6a95d3ee93
dev: move guided tours into consolidated folder (#34279)
* dev: moved shipping tour into guided tours folder

* dev: moved store address tour to guided-tour folder

* dev: updated imports for store address tour code move

* dev: move add-product-tour to guided-tours

* dev: update imports for add-product-tour code move
2022-08-12 09:49:18 +08:00
Barry Hughes bc31065b8e
Filtering for the COT admin list table. (#33789)
* Column sorting for the COT admin list table.

* Add filter for easier extensibility.

* Implement date based filtering within the admin order list table.

* Implement customer-based filtering within admin order list table.

* Allow filtering down to no results, better management of http_referer state.

* Changelog.

* Bring up-to-date, fix some conflict resolution mis-steps.

* Address coding standards.

* Remove unused import.
2022-08-11 13:00:47 -03:00
louwie17 a498cc8280
Add product form buttons and specific product edit page (#34211)
* Add initial product form action buttons to form

* Add new edit page and allow for updating and creating products

* Move crud functions to helper hook to keep things seperated better

* Add changelog

* ADd package changelogs

* Add isPending selector to products store

* Fix trash screen showing up when deleting product and add loading indicators

* Add extra types to Product type

* Update track names and add product data to tracks

* Update track logic when product is published

* Remove the Image section for now, to prevent confusion as it is not ready yet

* Add tests for the product form actions

* Update copy for publish & duplicate

* Remove unused code

* Set window.location correctly with href

* Reset changes in pnpm lock

* Moved pending action variables to product helper and updated buttons to reflect new suggestions

* Fix backwards compabitibility issue with Form changes

* Add switch to draft button
2022-08-11 11:04:14 -03:00
Jorge A. Torres 055ed34c0d
[COT] Add support for /v3/orders (#34178)
* Use WC_Order_Query for REST API v3 requests when COT is enabled

* Remove pre-COT internal meta keys from metadata in REST order responses

* Add changelog

* Add unit tests

* Fix test in `ProductAttributesLookup\FiltererTest`

Some tests in this class relied on a particular ordering of an array of IDs returned by a query with an `ORDER BY` that doesn’t really disambiguate sorting (all rows have the same values for the fields). As such, `assertEquals()` can’t be used to make sure arrays had the same values.

* Use `get_internal_meta_keys()` from a CPT instance to hide certain meta on COT REST response

* Move COT REST test outside of the COT datastore tests

* Fix typo

* Remove unnecessary imports
2022-08-11 13:11:18 +05:30
Chi-Hsuan Huang 831c9fcab3
Keep the user in the marketing task after installing an extension (#34241)
* Keep the user in the marketing task after installing an extension

* Add changelog
2022-08-11 08:56:58 +08:00
Seghir Nadir 0a9c0049b3
support single_select_page_with_search in WC REST API (#34234)
Support single_select_page_with_search in WC REST API
2022-08-10 14:37:53 -07:00
Chi-Hsuan Huang 58ff656764
Remove @wordpress/eslint-plugin from woo admin package.json (#34240)
* Remove @wordpress/eslint-plugin from woo admin package.json

* Add changelog

* Update pnpm-lock.yaml
2022-08-10 14:45:40 +08:00
Moon dd794e8e26
Update/34063 store location skip btn (#34176)
* Make ProfileItems properties optional

* Remove skip button codes and replace them with SkipButton component

* Add SkipButton component

* Add changelog

* Add back continue button callback

* Apply popover styles globally

* Add skip button on the industry step

* Add skip button on the product types step

* Add skip button on the Business Details step

* Support onSkipped callback

* Record skip event

* Add skip event track for industry, product types, and business details

* Add SkipButton to the theme step

* Update snapshot

* Change track name to separate business details and free features

* Add changelog

* Remove unused code

* Update product types test snapshot

* Add back UsageModal on Continue click

* Update e2e tests to use Skip

* Use button selector for skip btn

* Fix duplicate event dispatch

* Do not call onClose and onContinue during the rendering -- it causes cannot update a component while rendering a different warning. Instead, call them when the button is clicked

* Skip the profiler without rendering usage modal when woocommerce_allow_tracking is set

* Skip the profiler without rendering usage modal when woocommerce_allow_tracking is set

* Go to the next step when allowTracking is yes
2022-08-08 21:08:03 -07:00
Paul Sealock 2fe344e2af
Remove cherry-picked 34209 changelogs (#34216)
remove wc-admin changelogs
2022-08-09 11:15:52 +12:00
Néstor Soriano cc779db83c
Add the woocommerce_cart_session_initialize-hook (#34156)
* Add the woocommerce_cart_session_initialize-hook

* Add changelog file
2022-08-08 16:54:44 -03:00
Oliver Juhas bb02983893
Accessibility: Adding missing form field and table header labels to template files (#31211)
Add screen reader labels to improve accessibility in various locations.

* Adding missing table header labels
* Adding missing form field labels
* Adding missing form field label
* Adding missing form field labels — Ideally we would add these with `<labe>` tag (may be hidden with `screen-reader-text` class), but playing safe here to prevent CSS style issues.
* Adding missing form field label
* Changing `aria-label` attribute to actual `<label>` tag
* Rebase; add changelog.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-08-08 12:32:51 -07:00
Vedanshu Jain fe27a9a87c
Add various Util methods to OrderUtil class (#34141)
Add method in utils to check whether posts and order tables are in sync.

* Add changelog.
* Fix Yoda condition

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2022-08-08 11:28:35 -07:00
nigeljamesstevenson fbb6bd1c53
Add e2e test to check ability to add and remove regions from shipping… (#34187)
* Add e2e test to check ability to add and remove regions from shipping zone

* Add changelog file

* skip test in order to check CI

* add skipped test back in

* group shipping zone tests to avoid concurrency issues

* update assertions relevant to added zone region

* update test file

* update test to select appropriate delete based on other tests

* Ensure the correct Shipping Zone has been removed

* remove attempt to delte zone via front end as API call will handle this
2022-08-08 11:26:35 -06:00
Chi-Hsuan Huang af97aaf410
Migrate @woocommerce/data settings store to TS (#34184)
* Migrate wc.data.settings to TS

* Correct data.settings type

* Fix wc admin client type errors

* Add changelog

* Add changelog

* Update types

* Update RawSetting type
2022-08-08 13:25:46 +08:00
Chi-Hsuan Huang 3bbee139ed
Update "Add store details" task complete logic (#34206)
* Update store details task complete logic

Mark as completed if the store address, city and postcode are set.

* Add changelog

* Update store details test
2022-08-08 13:21:10 +08:00
Fernando 88c7cfb628
Fix Customer Effort Score Tracks (#34209)
* Rename sent prop (CustomerEffortScore)

* Add changelog

* Fix changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-05 15:40:01 -03:00
Jorge A. Torres c2cd415ab5
[COT] Misc test fixes (#34210)
* Stop resetting all definations in DI to not initialize hooks again.

* Adjust setting test to account for COT feature.

* Support temporary tables.

* Add changelog

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2022-08-05 11:08:35 -07:00
Néstor Soriano 3a76aa4255
Disable the WordPress.PHP.YodaConditions.NotYoda phpcs rule (#34204) 2022-08-05 10:39:55 +02:00
Ilyas Foo bc98010cd3
Fix set default homescreen layout after setup task completion or dismissal (#34191)
* Add set layout function after setup task completion or dismissal

* Add test

* Changelog
2022-08-05 15:53:11 +08:00
RJ f3e436f991
fix: type definition issues related to pnpm hoisting rules in preparation for pnpm 7 upgrade (#34154)
- added missing TS definition dependencies
2022-08-05 15:19:08 +08:00
Néstor Soriano a397168a37
Disallow/discourage Yoda comparisons in the WooCommerce codebase (#34185)
- Use the built-in phpcs sniff for "includes" (as warnings)
- Use the slevomat coding standards package for the rest of the code
  (as errors, with the ability to auto-correct)
2022-08-05 09:02:20 +02:00
Jorge A. Torres 7a1999ec86
[COT] `query()` method: add support for date queries (#34119)
* Add some date-related query arg mappings

* Add `join()` utility method

* Add support for date_query

* Add date_query tests

* Add changelog

* Address feedback

* ‘type’ not yet implemented

* Remap legacy date columns too
2022-08-05 08:59:12 +05:30
Sam Seay 5becf47d60
Simplify turbo commands (#34055)
* Change package json commands and turbo repo config to allow for greatly simplifying running turbo
* Remove require-turbo script which was causing caching issues
* Colorize CI output from scripts
* Add missing changelog script to extend-cart-checkout-block
2022-08-05 12:03:17 +12:00
Alba Rincón 4a4de7a7f6
Hide the customizer when the active theme is a FSE theme (#34022)
Only register the customizer and related scripts when the active theme is a classic one.

* See https://woofse.wordpress.com/2022/06/07/pt-ensure-customizer-doesnt-show-up-with-block-themes-active-2/
* Skip the test if the WP version is not compatible with the block theme.
* Move the condition to avoid the class instantiation when theme is fse.
2022-08-04 09:57:50 -07:00
louwie17 470fc899e1
Add/33 two column product page layout (#34113)
* Add product page layout components

* Add a quick sample page to test the product form layout

* Add changelog

* Add option 2

* Refactor the product field layout structure

* Update page component structure of product form

* Add simple SlotFill support

* Update product page chunk name

* Add order to slot fill and move product field layout wrapper into product category layout

* Remove unused import

* Consolidate the slot fill ordering logic

* Rename category component to section component to prevent confusion

* Remove edit product page and use the new add product page instead

* Add tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-04 10:15:30 -03:00
Vedanshu Jain 5f0efcf02f
Fixes a WP nightly unity test (#34190)
* Dont check for cache when there are no cached templates.

* Add changelog.
2022-08-04 10:00:39 -03:00
Néstor Soriano 0e0212254e
[COT] Add unique key constraints for the addresses and operational data tables (#34144)
* Add unique constraints to the COT addresses and operational tables

* Add changelog file
2022-08-04 16:52:08 +05:30
RJ 75f6ec3a43
dev: refactor Homescreen component to use useQuery hook (#34183)
- added useQuery hook for usage in functional components
- refactored Homescreen component to useQuery instead of prop drilling
2022-08-04 16:57:53 +08:00
Chi-Hsuan Huang cb87be1552
Update store location profiler (#34153)
* Update store details unit tests

* Update store details subheading and field order

* Update obw store details e2e tests

* Add changelog

* Add changelog

* Update Store owner can go through setup Task List test
2022-08-04 09:02:50 +08:00
Fernando 835f3d548e
Add/42 new product page (#34115)
* Add feature falg

* Modify href to menu item

* Modify page title href button

* Add product files on Client

* Change button's URL for new Nav

* Add changelog

* Moved changelog

* Fix URL for new nav

* Change URL for add product task

* Add Tracks event

* Change const name

* Renamed tracks event name

* Undo Add New Product redirect

* Undo use Products addition

* Undo lint fix to woocommerce_admin.js

* Rename component and file (AddProductPage)

* Set flag in core.json to false

* Fix typo

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-03 14:42:22 -03:00
Vedanshu Jain e4dae58502
Upgrade misc WooCommerce bits to support COT (#34124)
Update miscellanous WC bits to support custom tables.

* Add changelog.
* Add test for order_meta call.
* Make CI happy.
* Add tests for before_delete_order.
* Add test for is_valid_resource
* Add tests for PayPal API.
* Add test for save paypal meta data.
* Minor fixup.
2022-08-03 09:41:37 -07:00
Luigi Teschio 397a7846b5
JQuery FlexSlider: Fix innerHeight computation (#33847)
Fix computation innerHeight
2022-08-03 09:20:42 -07:00
Vedanshu Jain ef08507c13
Add support for updating values in order edit form inside WP Admin (#33972)
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-08-03 13:55:54 +02:00
RJ d44942dc0d
fix: e2e test on shipping task (#34165)
- shipping task was recently changed and shipping method is set up automatically now
2022-08-03 15:08:27 +08:00
Kaavya a9b0542532
Fix/33253 fix order number in notice (#33802)
Fix order number displayed in order status changed notice
2022-08-02 10:02:15 -07:00
Néstor Soriano c06ae5d903
Add a namespace prefix to the Psr/Container package (#33703)
Remove the explicit dependency from the psr/container package

* Prepend the psr/container package classes with a namespace using Mozart. This is done to prevent conflicts with other versions of the package used by other packages or plugins.
* Add changelog file
* Minor documentation/indentation updates
2022-08-02 09:59:32 -07:00
RJ cb09649a4c
add: store location settings tour (#34137) 2022-08-02 11:10:34 +08:00
Néstor Soriano e05697dfab
[COT] Fix order related methods in customer data store (#34121) 2022-08-01 11:13:55 +02:00
Néstor Soriano 5459f7e8ef
[COT] Add remove_processor method in batch processing controller, use it when disabling orders sync (#34122)
Also fix a bug: force_clear_all_processes wasn't actually unscheduling the watchdog.
2022-08-01 11:13:15 +02:00
Paul Sealock 06d5222585
Changelog removals due to 34133 (#34134)
remove changelog
2022-08-01 12:19:43 +08:00
Jorge A. Torres 0a3c3e7463
[COT] Make sure status is correctly prefixed for saving (#34128)
Make sure status is correctly prefixed for saving
2022-07-29 19:11:36 -07:00
Barry Hughes c97c373870
Remove 'do not edit' warnings (not applicable following monorepo rest… (#33790)
Remove 'do not edit' warnings (not applicable following monorepo restructuring).
2022-07-29 13:49:23 -07:00
Vedanshu Jain f7959c7680
Add order edit rendering when creating new order (#33848)
* Create an empty order when initializing new order form.

* Set object read to false to preent order note.

* Add changelog.
2022-07-29 17:08:38 -03:00
Barry Hughes 406853634a
Column sorting for the COT admin list table. (#33787)
* Column sorting for the COT admin list table.

* Add filter for easier extensibility.

* Changelog.

* Add support for orderby order’s total and creation/modification dates

* Remove unnecessary import

* Use ‘any’ instead of ‘all’ as status so that all valid statuses are used instead

* Use ‘order_total’ as orderby GET arg for backwards compat

* Rework sorting logic after support in `OrdersTableQuery`

* Update `@since` tag

* Make PHPCS happy

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-07-29 13:52:25 +05:30
RJ be89ba6e06
fix: wrong condition for shipping recommendations tour step (#34120) 2022-07-29 15:34:00 +08:00
Paul Sealock 4284673b68
Delete changelog files based on PR 34116 (#34117)
Delete changelog files for 34099
2022-07-29 10:15:41 +12:00
Paul Sealock d4e19d6c51
Beta Tester: Update composer lock file (#34086)
* Update Beta Tester lock file

* changelog
2022-07-29 09:11:04 +12:00
Moon 15015b9eda
Clean up setup_experiment_1 and setup_experiment_2 experiments (#34084)
* Remove setup_experiment_1 and setup_experiment_2 tests and css

* Remove setup_experiment_1 and 2 from the client code

* Copy over setup_experiment_1 options to the setup tasklist and remove setup_experiment_1 and 2

* Add changelog

* Determine the default component to use by task id

* Update plugins/woocommerce-admin/client/tasks/hooks/useActiveSetupList.ts

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

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-07-28 09:16:10 -07:00
Daniyal Ahmed 94cc85be6c
Fix fatal error when bulk editing sale price to empty value in PHP 8 (#34053) 2022-07-28 15:31:46 +02:00
Néstor Soriano 2c8a68315b
Introduce the object cache infrastructure (#33634)
* Introduce the ObjectCache class.

It's an abstract class intended to be used to implement caching for
any kind of object (arrays or PHP objects) using the underlying
WordPress caching or any alternative custom cache engine.

* Add changelog file

* Change the order of parameters in ObjectCache::get

Also change the max expiration value from one day to one month
2022-07-28 08:20:09 -03:00
Vedanshu Jain b4fcbd80a4
Render order edit page (#33638)
* Implement order edit screen rendering.

* Add changelog.

* Use global function instead of harcoded string.

* Use pagecontroller to display order edit form.

* Move HTML out from the translatable string.

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

* Capitalize `Order` for consistency.

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

* Minor realignment.

* phpcs fix .

* Decouple meta boxes from global $post object to support custom order tables.

* Bug fixes - improperly set $order object, and allow passing null.

* Make order item meta work with order object.

* Use `$order` object to minimize diff.

* Refactor $theorder object initialization to a common method.

* Remove check for WC_Order object.

* Move common methods to inside `src` in a dedicated class.

* Fix spacing for code style.

* Renamed method to be more accurate.

* Add proxies for static so they can be mocked.

* Remove PageController import.

* Move helper methods to an internal util class.

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-07-28 15:07:34 +05:30
Ilyas Foo a94d6c57ff
Fix shipping zone count transient reset (#34099)
* Delete shipping zone transient on adding shipping zone via smart defaults

* Changelog

* Fix comment
2022-07-28 16:18:08 +08:00