Commit Graph

244 Commits

Author SHA1 Message Date
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
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
Gregory Karpinsky 3fe4de8a95
Docblock: wc_get_orders returns WC_Order[] 2018-04-20 08:01:53 -04:00
Claudio Sanches 4c6641ab6a Adds new hook to allow customize downlodable file permissions
This is needed on Product Custom Tables in order to allow control expire
and remaining downloads per file.
2018-03-29 13:58:40 -03:00
Mike Jolley 6539b7913e Merge branch 'master' 2018-03-19 18:05:36 +00:00
Claudio Sanches 73de7414e2 Fixed includes/wc-order-functions.php PHPCS violations 2018-03-08 15:47:54 -03:00
Mike Jolley da0bda4a04 Add refunded payment prop after an API refund succeeds. 2017-12-15 16:23:26 +00:00
ragulka 4f2e1ee8d4 Ensure refund is deleted when exception is thrown during wc_create_refund 2017-11-22 17:03:58 +01:00
Jaydeep Rami 3522857d23 Fix typo in WooCommerce plugin (#16135)
* Fixed typo

* Fixed more typo

* Fixed more typo

* Fix tyop

* Fix more typo

* Fix more typo

* Fix typo

* Fix typo

* Fix typo

* Fix typo datatime object

* Fix short name of compat

* Fix typo: update short name

* Fix typo "deactive" to "deactivate" and short BW - Compat

* Fix typo "Backwards compat"

* Fix typo 'parameters'

* Fix more typo 'pararmeters'

* Fix typo 'compund'

* FIx typo order

* Fix typo

* Fix typo 'incorrecly'

* Fix typo 'genarate'

* Fix typo 'reletive'

* Fix typo 'Handly'

* Fix typo 'rotatated'

* Fix typo

* Fix typo 'additonal'

* Fix typos
2017-07-17 11:10:52 +01:00
Claudio Sanches 1b93282245 Change note to content 2017-07-13 19:30:25 -03:00
Claudio Sanches 3265f18af8 Tidy up wc_delete_order_note() 2017-07-12 18:46:19 -03:00
Claudio Sanches 85873d3d28 Not allow 'count' and 'fields' in wc_get_order_notes() 2017-07-12 18:45:27 -03:00
Claudio Sanches ac8b7f7087 Fixed docblocks 2017-07-12 18:05:44 -03:00
Claudio Sanches d93214e68e Order note helper functions 2017-07-12 18:03:39 -03:00
Trey Richards f019070307 Fixed major issue with getting orders when both before_date and after_date args are set.
Modified unit tests to prevent from happening again.
2017-06-30 17:30:16 -07:00