roykho
980fe7c759
Add to the restock_refunded_items count instead of replacting
2021-04-27 07:22:28 -07:00
roykho
7105a7a17e
Update restock logic during refunds closes #29502
2021-04-23 12:14:51 -07:00
Claudio Sanches
50e036f934
Merge pull request #23188 from LuigiPulcini/master
...
Add $item to wc_downloadable_file_permission
2021-03-25 12:19:08 -03:00
jonathansadowski
e5a3ac48aa
Merge pull request #28933 from Mindsize/wc-24581-holding-stock-minutes
...
Wc 24581 holding stock minutes
2021-02-03 16:05:18 -06:00
mfs-mindsize
5be2c80b89
adjusted new filter's default to option value + added absint
2021-02-01 14:16:30 -05:00
mfs-mindsize
9dc87f629a
added filter: woocommerce_cancel_unpaid_orders_interval_minutes (default 5 mins) that separates interval for checking cancelsfrom option: woocommerce_hold_stock_minutes
2020-12-17 11:41:50 -05:00
Vedanshu Jain
4339aee35f
Merge pull request #27352 from juliquiron/fix/slow-wc-customer-get-operations
...
Added cache and filter for wc-customer get operations.
2020-12-14 09:43:04 +05:30
vedanshujain
a5fb3178f0
Drop CacheHydration class and do it directly.
...
Primary reason for dropping the cache hydration is that seems like we can acheive the same results without it, so no need to add this additional complexity to our code.
2020-11-10 14:23:43 +05:30
vedanshujain
9bd92205b0
Add support to use `cache_hydration` in wc_get_order.
...
This can be used to pre-load expensive to compute caches.
2020-11-10 14:23:40 +05:30
LuigiPulcini
b43c75a68f
Merge branch 'master' into master
2020-10-18 16:23:29 +02:00
Julià Mestieri
83434deb42
Added PR feedback.
2020-08-27 09:05:33 +02:00
Julià Mestieri
b2c35a5ded
Added cache and filters for wc-customer get operations.
2020-08-17 11:25:54 +02:00
Ron Rennick
38d358490b
switch to site locale before translating refund reason
2020-08-13 10:32:19 -03:00
Claudio Sanches
02cf0dfaed
Merge pull request #27239 from woocommerce/fix/package-tag
...
Fix usage of "package" tag in file headers
2020-08-07 13:37:24 -03:00
Néstor Soriano
a13a0d2187
Merge pull request #27179 from woocommerce/fix/26741
...
Release coupon holds when status it updated to cancelled regardless of recorded coupons
2020-08-07 11:27:45 +02:00
Claudio Sanches
d48f1d4e2e
Fixed package tag usage
2020-08-05 13:36:24 -03:00
Jonathan Sadowski
163e10253a
Release coupon holds when status it updated to cancelled regardless of recorded coupons
2020-07-30 10:35:23 -05:00
Ron Rennick
d3ab19b7cf
eliminate internal use of deprecated functions
...
- remove deprecation of offsetGet as it is used throught abstract order
- eliminate use of offsetGet in unit tests, structured data, order functions
-
2020-07-17 17:14:26 -03:00
Claudio Sanches
5d034b83a9
Allow custom values in wc_generate_order_key()
2020-05-20 17:41:22 -03:00
Francesco Leanza
c90a275bc7
Added woocommerce_can_restock_refunded_items filter
2020-02-21 19:15:09 +01:00
Claudio Sanches
85a077b939
Coupon race condition prevention
2020-01-06 19:44:24 -03:00
Rodrigo Primo
487f96d844
Fix WordPress.DateTime.CurrentTimeTimestamp vilations
...
This commit fixes all violations of the WordPress.DateTime.CurrentTimeTimestamp sniff automatically using phpcbf.
2019-12-20 14:23:05 -03:00
vedanshujain
72545c44b7
Add support for `_held_for_checkout` records to improve performance.
...
This will also improve transactional stability and avoid race conditions by providing a way to lock usage counts.
2019-12-17 19:13:19 +05:30
Claudio Sanches
a12c25862b
Revert "Add support for '_held_for_checkout` records to prevent race conditions."
2019-12-04 16:03:05 -03:00
Claudio Sanches
0c486785ad
Merge pull request #25089 from woocommerce/fix/24009
...
Add support for '_held_for_checkout` records to prevent race conditions.
2019-12-03 17:47:22 -03:00
Claudio Sanches
3d394dd72c
Use wc_get_order() instead of "new WC_Order"
2019-12-03 16:43:00 -03:00
Claudio Sanches
988b72e461
Updated filter name to woocommerce_hold_stock_for_checkout
...
Also fixed coding standards
2019-12-03 16:38:17 -03:00
Peter Fabian
309c48ab0e
Deprecated old cache function and replaced it with a new one.
2019-11-28 14:03:57 +01:00
vedanshujain
70a54d0639
Added Unit Tests for `held_for_checkout` records.
2019-11-21 18:11:37 +05:30
vedanshujain
e87024bb81
Add support for '_held_for_checkout` records to prevent race conditions.
...
When creating an order, if manage inventory is enabled then add a `_held_for_checkout` record with a expiry timestamp embedded. This is added in an atomic manner along with making a check whether we have current stock or not.
This record is removed when order status goes to either `processing` or `completed`.
2019-11-21 01:21:08 +05:30
Claudio Sanches
f5bab51c6a
Improve refund reason when changing order status to refunded
...
Refund reasons are public, can be visualized on emails, and shall not
contain any sensitive data or administration information.
2019-05-16 17:57:28 -03:00
Gerhard
486321161c
Update usage of get_used_coupon_codes to get_coupon_codes
2019-05-14 11:21:27 +02:00
Gerhard
31acfbcb4a
Deprecate WC_Abstract_Order::get_used_coupons in favor of WC_Abstract_Order::get_used_coupon_codes, this reflects the actual data being returned better.
2019-05-13 14:40:54 +02:00
LuigiPulcini
60085f43fd
Add $item to wc_downloadable_file_permission
...
Adding the parameter `$item` to both the function `wc_downloadable_file_permission` and the filter hook `woocommerce_downloadable_file_permission` would provide a further level of customization for the downloadable file being granted, depending on the metadata assigned to the single item when purchasing a product.
2019-04-01 13:52:02 -07:00
Mike Jolley
bdc009cfbf
Update refund reason to make it clear refunding is manual
2019-03-26 12:46:27 +00:00
Mike Jolley
fa97d1a791
Update reduced stock amount under some circumstances
2019-02-18 12:27:08 +00:00
Mike Jolley
d0abd6f09b
Check for _reduced_stock meta when restocking refunded items
2019-02-13 15:05:20 +00:00
Mike Jolley
7ac26ce893
Merge pull request #22518 from Prospress/fix/21779_redux
...
Fix/21779 redux
2019-01-22 13:29:40 +00:00
Mike Jolley
afbdd06e83
Merge branch 'pr/22409'
2019-01-22 13:12:34 +00:00
Mike Jolley
892ec24fed
correct version
2019-01-22 13:12:26 +00:00
Mike Jolley
6367d19615
phpcs
2019-01-21 08:11:40 -08:00
Ron Rennick
b774968c81
set refund prices_include_tax meta to be the same as the order receiving the refund
2019-01-18 23:38:36 -04:00
Ron Rennick
d826aba858
phpcs sniff fixes for wc-order-functions.php
2019-01-18 23:36:46 -04:00
plexus admin
9acc7ced5d
Add function wc_get_is_pending_statuses
2019-01-16 09:54:02 -06:00
Steve Grunwell
550b309901
Merge branch 'master' into feature/sanitize-order-id-tests
2018-10-17 02:21:04 +00:00
AmanS
9d327ac52e
WC Refund class older name 'WC_Refund' somehow left over in the function docblock. Corrected to WC_Order_Refund.
2018-10-10 00:28:15 +05:30
Steve Grunwell
65cda44fe6
Add tests for wc_sanitize_order_id()
...
This commit adds four test cases (via a PHPUnit data provider) for the `wc_sanitize_order_id()` function.
While writing the tests, it was also discovered that the function was returning a *string*, not an integer as indicated by the DocBlock, so explicit type-casting was added.
2018-10-04 13:53:55 +00:00
Mike Jolley
01a3e359c3
Merge branch 'master' into feature/product-custom-tables-supporting-changes
2018-06-13 10:18:38 +01:00
Khan M Rashedun-Naby
80a1a64285
Else Removed
2018-05-15 00:33:22 +06:00
Rodrigo Primo
597033ca6f
Merge branch 'master' into feature/product-custom-tables-supporting-changes
2018-04-24 13:47:22 -03:00