* Use @wordpress/date to format for display in DateTimePickerControl
* Update default formats to PHP style
* Update tests to use @wordpress/date formatting
* Update CustomDateTimeFormat story to use PHP style formatting
* Set paths to e2e-pw
* Delete and untrack storage state files
* Add changelog
* Checkout updated version of smoke test daily workflow
* Allow setting allure output paths to e2e-pw folder using environment variables
* Set allure output paths to be inside api-core-tests/api-test-report folder
* Remove unnecessary TODO comment
* Disable product inventory toggle when inventory management is disabled
* Export conditional wrapper as experimental component
* Conditionally show the tooltip
* Add comment explaining the tooltip overlay
* Add components changelog entry
* Display tooltip on hover any portion of toggle or label
* Add changelog entry
* Fix scss lint error
* Center tooltip over label and toggle
* Fix up input props after rebase
* Add wrapper around field to maintain block item formatting
* Show a dismissible snackbar if the server responds an error
* Removed the default value New shipping class from the Name field and replaced it with a placeholder: e.g. Fragile products
* Only used the category's name when the user creates a new shipping class for the first time
* Fix linter errors
* Update grammar error
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Add empty initial values to form field to prevent controlled/uncontrolled react error
* Tune error handling
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* add api-core-tests for system status
* add api-core-tests for system status
* add system status api-core-tests
* add system status api-core-tests formatting updates
* Allow additional props to be passed to the Form getInputProps method
* Remove getTextControlProps
* Pass additional shared props through getInputProps in shipping
* Simplify checkbox props
* Unwrap currency props
* Use onBlur event to sanitize prices
* Add changelog entry
* Add option to get checkbox props to form context helpers
* Update checkbox tracks handler naming and typing
* Fix up usage of getInputProps
* Add helper sanitize method
* Use sanitize helper method for product input fields
* Fix inventory input props after rebase
* Fix shipping typo
* Fix up form types after rebase
* Align all checkboxes on product page
* Rename new checkbox helper to getCheckboxControlProps
* Add helper method to get select control props
* Add data changelog entry
* Check for product name length on blur
* Add initial value for name to prevent uncontrolled value
* Add initial value for sku
* Fix trashing/untrashing orders when using COT:
- Trashing wasn't changing the update date on the orders table record.
- Trashing wasn't applying trash on the corresponding post.
- Untrashing wasn't actually deleting _wp_trash_meta_status in metadata.
* Fix: maybe_sync_order was syncing even with identical update dates.
* PHPCS is happy now.
* WP_DIE when attempting to load a trashed order in Admin
(same behavior as when using the posts table)
* Add changelog file
* Revert change in order records date comparison
Data comparison is needed too when the dates are equal, since data in the metadata table could have been modified as well.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix handling of order status and trash meta when untrashing.
Untrashing an order was setting it to the default status of "pending"
instead of the previous status. This is what was happening:
1. Order is trashed, order meta table gets the value (e.g.) "on-hold"
for the _wp_trash_meta_status key
2. Post is trashed, post meta table gets "wc-on-hold"
3. Order is re-read, but then so is posts, and the order meta value is
updated to "wc-on-hold"
4. On untrash the previous order status from order meta table is
prefixed with "wc-", thus it becomes "wc-wc-on-hold", which is not
a valid status
5. Not having a valid status, the order is restored as the default
status of "pending payment"
To fix this, the previous status is stored in order meta table
with "wc-", and it doesn't get prefixed on untrash.
Also, wp_untrash_post is called on order untrash, otherwise the
trash metadata keeps dangling and being synced back and forth.
* Add unit tetst for the trash-untrash cycle
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix 'Invalid payment method' error upon double click 'Delete' #30862
An 'Invalid payment method' error shows when a user double clicks the
'Delete' button in the 'Add Payment method screen'. Every time the user clicks
the button, there is a GET request to delete the payment method. First request is
handled correctly, but subsequent requests throw an error, because the payment
method cannot be found since it was already deleted.
This adds an event handler to disable the button on the first
click.
* Add changelog entry
* Use AccessiblePrivateMethods in DataSynchronizer.
Also fix some code styling stuff.
* Introduce the woocommerce_feature_description_tip filter.
...and use it to display a warning for the COT feature
if there are orders pending sync.
* Display the plugin-feature incompatibility warning in all admin pages.
...except in the plugins list when we are already showing the
"You are viewing plugins with incompatibilities" page.
Also change the styling from warning to error.
* Add changelog file
* Revert accidental change.
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
* Add initial add attribute modal
* Add async select control component and add attribute terms
* Make use of AsyncSelectControl for attributes
* Rearranged the add attribute form to make removing easier
* Make sure add button is disabled if fields are empty
* Remove the use of AsyncSelectControl for now
* Add disabled option and fix merge conflict
* Add attribute modal tests
* Remove unused trigger drag
* Add popover slot
* Small update to select control and fix multi selection in term field
* Add tests for attribute and attribute term fields
* Add changelogs
* Small fix after merge conflict
* Fix some styling and issue with select control when clearing item
* Fix lint error
* Fix up some styling issues after rebase
* Fix formatting, some styling issues, and address some PR feedback
* And confirmation dialog for closing the modal.