* 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.
* Add dropdownPlacement option to SelectControl
* Make use of parent element of menu for width
* Add changelog
* Add useEffect for boundingRect so it gets updated accordingly
* Fix styling for popover dropdown
* Move popup markup down to render return
* Move getMenuProps up
* Move getMenuProps down to list again and always render the popover menu
* Add MenuSlot that adds popover slot to mody with aria-live=off so it is skipped by Modal
* Add comment in relation to the eslint-disable comment
* Fix flashing of popover and addressed some minor PR suggestions
* Select the current new added shipping class
* Extracting constants into the right file
* Add unit tests
* Use setValue instead onChange to select the shipping class of the product
* Add label prop to rich text editor
* Create feature class and enqueue styles
* Add description editor and parsing
* Fix up incorrect context for product data
* Add styling to rich text editors in product form
* Fix editor initialization on new product
* Add changelog entries
* Use trunk lock file
* Add component changelog entry
* Update lock file
* Register block store provider in tests
* Fix up phpcs errors in product feature file
* Optimize is_complete() method
* Replaed WC_Product_Query with wp_count_posts, which has more optimized query
* Optimize TaskList::is_complete -- return early when false instead of running through all the tasks
* Cache is_complete() method for the tasks with db query
* Add changelog
* Update version of auto-assign-reviewer
Update version of auto-assign-reviewer action to one that fixes the bug with team reviewers.
* Update community pr assigner config for team syntax
The new version of community pr assigner uses `team: ` prefix to designate teams.
* Add initial category field component with new typeahead
Move search logic to useCategorySearch hook
Add initial add new category logic
Add parent category field to add new category modal
Adding some debug changes
Update category control to make use of internal selectItem function of select control
Add changelogs
Update pagesize back to 100
Add placeholder
Empty placeholder
Fix input and icon sizes
Fix input underline
Add max height and scroll to category dropdown
Add sorting of category items
Auto open parents when traversing up the tree using arrow keys
Add several comments
Add some initial unit tests for the category field component
Add tests for useCategorySearch hook and fixed minor bug
Update styling and autoselect parent if child is selected
Fix styling issues for the select control dropdown inside a modal
Fix issue with creating new category with parent
Add function comment and fixed border styling
Prune out create new category logic
Fix minor css issue with border
Revert some of the select control changes and make use of the custom type
Fix up some styling changes
* Fix type conflict
* Revert change in state reducer
* Add cursor pointer
* Fix styling errors
* Fix broken category tests
* Fix merge conflict
Make the quantity input visible, even if the min and max allowed values are identical.
* Add changelog
* Update plugins/woocommerce/changelog/fix-GH-34280
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/templates/global/quantity-input.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix `@since` tag
* Use a single readonly input (when quanity cannot be changed) instead of two inputs (hidden and disabled).
* Introduce consistent formatting when a product is sold individually and when the min/max is identical.
* Update `@version` tags to 7.1.0.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Set correct timezone when backfilling data.
* Add changelog.
* Apply code standards.
* Address further flakiness and more comprehensive test.
* More fixes for timezone backfil.
* Remove unnecessary comments.
* Revert test change since we are not changing systems timezone.
* Minor alignment fix.
* Minor language fix.
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
* Add and use ON_DUPLICATE_KEY update function to perform update/insert without additional query.
* Fix typo
* Add more tests for save related functions.
* Update post directly to update correct post_modified value.
If we use wp's update_post function, then it will set the post-modified date to current time(). This is not desirable when backfilling order data where we want post data to be exactly the same as orders.
* Add changelog.
* Add support to sync from posts table when reading order table.
When sync is enabled, we also read from posts table when an order is read from COT. Mismatch in this case implies a direct write and therefore we update the COT record with data from posts. This provides an additional layer of backwards compatibility.
* Add more tests for different tables.
* Modify sync logic to account for metadata that has been changed.
* Fetch post only when data sync is enabled.
* Made test case comparison more strict to prevent flakiness.
* WIP
* WIP
* Added protections and code standard fixes.
* WIP
* Change order data store internal key to props for better representation.
* Add changelog
* Add legacy datastore prop for WC_Data object to support COT.
* Also support passing in `get_stock_reduced` method.
* Add internal meta keys to order table data store.
* Add tests for CPT datastore for orders.
* Change return type to prevent implicit type conversion.
* Use correct conversion.
* Revert "Use correct conversion."
This reverts commit 97ead11f71.
* Add conversions to test as needed.
* Add internal keys for order table data store for consistency.
* Apply code standards.
* Merge conflict fixes.
* Add more tests.
* Add more fixes and unit test for sync logic.
* Remove $save param for consistency with parent class.
Earlier, we added the $save parameter for performance reason, but now that we are storing the props in the WC_Order object, this isn't needed anymore (as the object can hold the updated props).
* Return bool instead of string as described.
* Fix test by transforming bool values before confirming.
* Fix test by not needing to converting to string, since we now bool value.
* Store internal props as bool instead of string.
* Remove unused method.
* Only select props for refunds that are actually needed.
* Store bool as yes/no to maintain compatibility with how were storing prev.
* Fix unit test to extpect yes.
* Add tests and set special metadata migrated from data store correctly.
* Add tests for legacy prop get/set in ordertabledatastore.
* Update email class to use data store method instead of get_meta.
* Update exisiting tests to account for changes in legacy prop setting.
* Read from CPT store directly, and cache the pending value.
* Fixup in unit test.
* Add test for refund creation.
* Add test for refund creation.
* Remove strict WC_Order typecasting.
* Address code standard voilation.
* Call correct parent method for updating meta.
* Use WC_Absract instead of WC_Order to provide more compatibility.
* Record order ids we are syncing for to prevent any infinite loop.
* Add test for fixing infinite loop with read on sync.
* Address PR feedback.
* Fix formatting.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix formatting.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Use correct type hints.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix formatting.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Yoda, use.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Remove space between minus and numeral for readability.
* Fix ut, and use assertTrue instead of native for consistency.
* Port a fix for edit date save.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* 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
* 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
* Add initial rich text editor component
* Use fixed toolbar and add base formatters
* Add link as formatter option
* Fix up references to core/link block
* Add quote transform
* Add changelog entry
* Add text alignment toolbar
* Remove references to checkbox list
* Update toolbar button organization
* Remove unused rtj format types
* Create unique instance for editor writing flow
* Add registry provider for storybook examples
* Update styling for editor
* Rebase and fix lock file
* Add packages and type dependencies
* Move component to experimental
* Fix up formatting
* Update editor to use default GB toolbar
* Prefix names with woocoommerce
* Create block on initialization so toolbar is visible
* Rely on insertBlock to handle selection
* Update text editor to use setting instead of BlockList prop
* Fix up lock file after rebase
* Handle PR feedback
* Move logic for force rerender
* Fix up pnpm lock file
* Use trunk lock file
* Update lock file
* Add missing semicolon
* Use Pauls lock file and package file
* 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