* 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.