* 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.
* 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
* 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 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
* (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.
* 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>
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
* 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
* 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
* 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>
* 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>
* 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
* 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>
* Added JS data file
* Moved onboarding logic into utils folder
* Used new onboarding methods and data file
* Added changelog
* Moved utils directory
* Fixed import
* 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
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.
* 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
* 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
* 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
* 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
* 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
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
* 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>
* 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
* 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
* 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
* 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
* 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.
* 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
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
* 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
* 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>
* 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
* 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>
* 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
* 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>
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.
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
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>
* 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
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
* 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
* 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
* 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>
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.
* Add and use ON_DUPLICATE_KEY update function to perform update/insert without additional query.
* Fix typo
* Add more tests for save related functions.
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.
* 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
* 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()
* 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>
* 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>
* 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>
* 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
* 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
* 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.
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>
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>
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>
* 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>
* 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>
* 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.
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
* 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.
* 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