Commit Graph

256 Commits

Author SHA1 Message Date
Mike Jolley 3a2f3586ed get_tax_refunded_for_item ignoring tax id
Fixes #13681
2017-03-21 11:20:39 +00:00
Claudio Sanches 59c2849736 Changed version 2.7 to 3.0 2017-03-15 13:36:53 -03:00
Mike Jolley d55653a408 Merge branch 'master' into fix-13498
# Conflicts:
#	includes/class-wc-order.php
#	tests/unit-tests/crud/data.php
2017-03-15 15:52:40 +00:00
Mike Jolley ff4b79a6fc Status transition hooks should never run when objects are read regardless of status being set.
Fixes #13547
2017-03-10 20:20:07 +00:00
Mike Jolley 339b1b7aab Set dates based on UTC 2017-03-10 16:29:52 +00:00
Mike Jolley 89fab41440 date_{paid|completed} getters and setters. 2017-03-10 14:25:40 +00:00
Mike Jolley 2894d5aab0 Make needs_processing public so the data store can access. 2017-03-10 12:21:42 +00:00
Mike Jolley ac1c2f02b7 syntax 2017-03-09 14:53:52 +00:00
Mike Jolley 28a8d05285 Handle date paid in getter and during save to avoid filters during construct 2017-03-09 14:40:19 +00:00
Mike Jolley c7dc8ae2b4 date_created and date_modified getters and setters 2017-03-08 16:51:10 +00:00
Mike Jolley be0a8d2c87 Remove filter in maybe_set_date_paid to avoid infinite loop
Fixes #13496
2017-03-07 14:45:42 +00:00
Mike Jolley ffa0bcc2bb Pass $this to woocommerce_payment_complete_order_status filter 2017-03-07 14:39:07 +00:00
Mike Jolley 578f89812c Use set_date_paid directly 2017-03-07 14:37:45 +00:00
Mike Jolley e5ed116e33 Split total row methods to avoid calling total row filter twice
Fixes #13456
2017-03-06 13:44:52 +00:00
Mike Jolley 0a53e0e47f Merge pull request #13444 from woocommerce/fix-13420
Set date paid for old orders
2017-03-03 10:41:33 +00:00
Mike Jolley 35eea95550 Set date paid for old order 2017-03-02 17:47:28 +00:00
Mike Jolley fd07d06825 Update date created/modified if changed.
Fixes #13419
2017-03-02 16:46:59 +00:00
Mike Jolley 6edd13579b Update date paid if transitioning to payment complete status (#13382)
* Update date paid if the from status is unpaid, and the to status is ! unpaid

Closes #13376

* maybe_set_date_paid, maybe_set_date_completed and needs_processing helpers

Set paid is performed once only for BW compatibility with #13375

* Should use set_date_completed

* Docblock and params
2017-02-28 19:08:12 +00:00
Mike Jolley f5a36778fd Move refund/payment method code out of abstract 2017-02-27 17:06:09 +00:00
Mike Jolley 6f02cda453 get_item_count_refunded should be positive
Closes #13307
2017-02-23 13:52:17 +00:00
Mike Jolley 7ff301e2ca Merge branch 'master' into crud-perf-tweaks
# Conflicts:
#	includes/data-stores/class-wc-order-item-data-store.php
2017-02-09 12:31:25 +00:00
Mike Jolley b17932f4e3 Fix test due to invalid amount and caching 2017-02-09 12:04:44 +00:00
Mike Jolley c63cec32b9 Fix; prevent duplicate queries 2017-02-08 16:19:01 +00:00
Mike Jolley ed51c8ac13 Pass order object to emails 2017-02-01 17:54:47 +01:00
Justin Shreve 3d55efffac Move order logic to wc-order 2017-01-23 13:08:55 -08:00
Mike Jolley 99527e8013 Merge pull request #12680 from franticpsyx/remaining-incorrect-inline-comments
[2.7] Remaining inline comments about pointers
2016-12-22 22:37:33 +00:00
Mike Jolley 364d4bd82c Merge pull request #12675 from maciekkus/feature/make-tax-includes-text-consistient
Make 'includes tax' text wrapping with <small> tag consistient across order and cart table
2016-12-22 22:37:06 +00:00
Maciej Kuś e5bae8b7af space preserved before "included_tax" small element 2016-12-22 20:05:46 +01:00
Manos Psychogyiopoulos 40bf6afc29 fix incorrect inline comments
Ref: 01aba1fd2b
2016-12-22 19:41:23 +02:00
Mike Jolley 03b581f72e Refunds API/get_data() missing ID
Fixes #12672
2016-12-22 14:52:37 +00:00
Maciej Kuś 53c7c4025f includes tax wrapping <small> consistient across order and cart table 2016-12-22 13:56:29 +01:00
Mike Jolley 20680203bb Add actions for all object types 2016-12-19 17:09:52 +00:00
Mike Jolley d46d00bd08 Order numbers should be a string
Closes #12616
2016-12-16 11:49:00 +00:00
Mike Jolley 3c06dab0e8 Change action order to be compat with 2.6
Closes #12606
2016-12-15 13:08:25 +00:00
Mike Jolley 4bacbaf90c Fix completed and paid date meta keys. 2016-12-08 11:19:32 +00:00
Justin Shreve 174aa38be6 Start moving meta to normal stores, instead of a separate meta store. 2016-11-22 04:05:05 -08:00
Mike Jolley ac3be6ba50 Order stores complete 2016-11-18 14:07:21 +00:00
Mike Jolley 5d9a9b4dec Fix tests 2016-11-18 11:14:09 +00:00
Mike Jolley 8d6f236d47 Fix save 2016-11-17 16:02:09 +00:00
Mike Jolley 717f712b3d save addresses 2016-11-17 15:32:52 +00:00
Mike Jolley d88b512143 Setters 2016-11-17 15:17:23 +00:00
Mike Jolley 87aadaa7cf getters 2016-11-17 15:02:33 +00:00
Mike Jolley 52c866c57b Main order interface 2016-11-17 14:37:29 +00:00
Claudio Sanches 1360f6fc3e Docblock for #12287 2016-11-09 10:54:08 -02:00
Dwain Maralack 5f87161c06 add function arguments to the filter to give more context when filter is applied 2016-11-09 12:49:38 +02:00
Claudio Sanches 2de494e105 Merge pull request #12219 from ramiy/i18n-translation-comments
i18n: add translators comments
2016-11-03 13:24:35 -02:00
Mike Jolley 32e814eef1 Use all paid statuses in $customer->get_total_spent() 2016-11-03 11:27:03 +00:00
Rami Yushuvaev 93d55dade9 add translators comments 2016-10-29 20:32:38 +03:00
Claudio Sanches 4a1d5d3b0c Use Order CRUD to save admin order data (#12181)
* Fixed downlodable permissions while updating orders.

- Fixed undefined $wpdb fatal error
- Fixed how to update permissions when updated the billing_email

cc @mikejolley

* Use order CRUD to update admin order data

* Updated WC_Meta_Box_Order_Data::save() params and updated docblocks

* Missing period

* Handle cache and status on CRUD side
2016-10-28 10:52:01 +01:00
Justin Shreve e1e6c682b5 * Stop using _ as a prefix for protected or private vars and functions. We have a keyword for that.
* Introduces set_id and get_id to WC_Data for the CRUD classes to share
2016-09-09 05:36:54 -07:00
Mike Jolley 311c540662 Merge pull request #11833 from aristath/master
Coding Standards (2nd pass)
2016-09-07 10:14:17 +01:00
Mike Jolley cf59524dd7 Fix order total race condition in CRUD 2016-09-07 09:28:11 +01:00
Aristeides Stathopoulos 9dc4949e0a Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis 2016-09-02 06:17:42 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Mike Jolley 1b2df3dd3b Merge branch 'pr/11797'
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:46:05 +01:00
Claudio Sanches 06280a7003 HTTPS for google maps 2016-08-31 14:18:55 -03:00
Aristeides Stathopoulos 17961f6484 WordPress.Arrays.ArrayDeclaration.ValueNoNewline 2016-08-27 06:04:10 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Mike Jolley 9bd57414c5 Remove set and get prop - no longer need the extra overhead since functions won't return wp_error now. 2016-08-26 10:48:17 +01:00
Mike Jolley 461ec4da16 Return false instead of throwing exception 2016-08-25 17:48:36 +01:00
Mike Jolley 658970cbc8 No string required here 2016-08-25 17:12:32 +01:00
Mike Jolley 3637814b92 Revert use of default_data for default args and just set that in constructor 2016-08-25 13:31:03 +01:00
Mike Jolley 25883f8687 Set_props helper to load data from DB and handle errors 2016-08-25 13:05:27 +01:00
Mike Jolley 938361535f Exception handling 2016-08-24 16:02:19 +01:00
Mike Jolley d9798f7226 Set reading to prevent exceptions during DB load 2016-08-24 14:37:19 +01:00
Mike Jolley 7e30e8dda3 Set defaults and handle order reads without exceptions 2016-08-24 12:34:19 +01:00
Mike Jolley 53f01b52a8 Bring back WC_Data_Exception 2016-08-24 10:46:29 +01:00
Mike Jolley b727acd96e Implement get and set prop methods 2016-08-23 18:48:48 +01:00
Mike Jolley e08e5a816d 2d array handling 2016-08-23 15:49:34 +01:00
Mike Jolley 2636d04ba6 Setters 2016-08-23 15:25:50 +01:00
Mike Jolley fdd7e797ba API get refunds 2016-08-22 13:15:15 +01:00
Mike Jolley 9e45927803 Create refund with crud 2016-08-22 13:15:15 +01:00
Mike Jolley 1baef12395 qty -> quantity 2016-08-16 12:36:38 +01:00
Mike Jolley 837e08143b Merge branch 'master' into orders-crud-classes
# Conflicts:
#	includes/abstracts/abstract-wc-order.php
2016-08-03 12:32:27 +01:00
Mike Jolley b11794ceac @Since changes 2016-06-29 12:58:38 +01:00
Mike Jolley 46439ddba5 Refund unit tests 2016-06-22 16:31:05 +01:00
Mike Jolley 9da9d3bf69 Unit test conditional functions 2016-06-22 15:38:28 +01:00
Mike Jolley 8287b13cf1 Address and CRUD unit tests 2016-06-22 14:07:42 +01:00
Mike Jolley ece2b5bf57 Order class 2016-06-21 20:06:39 +01:00
Mike Jolley ee0798047e Merge branch 'wc-get-orders-10500' 2016-03-14 16:09:01 +00:00
Mike Jolley 733b0c8c93 Lowercase includes %s string only 2016-03-14 10:41:48 +00:00
Mike Jolley c1e8dd1fe8 Use wc_get_orders iternally 2016-03-09 16:11:05 +00:00
Mike Jolley 37003b2370 Round get_remaining_refund_amount
Fixes #10060
2016-01-13 11:07:05 +00:00
Mike Jolley 2e553cf220 Show order refunds in totals
Fixes #9589 @claudiosmweb
2015-11-30 15:25:48 +00:00
Nicola Mustone c9da4f928a check if ABSPATH is defined 2015-11-06 10:22:19 +01:00
Scrutinizer Auto-Fixer 08efaf84df Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-11-05 16:05:03 +00:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley abaa8f47d8 Moved refund hooks to avoid emails after API refund failure 2015-10-06 14:43:36 +01:00
Ewout Fernhout 535949b02e add $display_refunded parameter to get_formatted_order_total
#8793
2015-08-13 15:45:49 +02:00
Mike Jolley 7b2aec4791 Take item qty into consideration when refunding orders
Fixes #8675
2015-07-29 13:13:41 +01:00
Mike Jolley 7285ce74e6 Tax display notice 2015-07-16 10:15:45 +01:00
Mike Jolley db473cc369 Move refund logic into main order class.
These methods are not defined in the abstract.
2015-07-15 16:02:26 +01:00
Mike Jolley b9708c4df9 Show refunded total shipping and taxes
Closes #8222
2015-06-01 11:06:11 +01:00
Mike Jolley efb8be72c2 Round tax total 2015-05-01 14:57:56 +01:00
Claudio Sanches def250e912 Display taxes labels in order totals when order has refunded, closes #7229 2015-01-29 18:50:08 -02:00
Mike Jolley e03cf9c204 Set order_type property, and move actual order loading to separate method to make it easier for sub-classes to handle just that process.
Closes #6513
2014-10-14 14:25:53 +01:00
Nick Ivanter 3fcae6e63f Allow WC_Order to be constructed w/o Order ID
This was allowed in WooCommerce 2.1 and some plugins rely on this behavior. Also, there seems to be no downside, as the parent class WC_Abstract_Order similarly doesn't require an Order ID at construction.
2014-09-22 14:58:18 +04:00
shivapoudel 5f05a78669 Line and indendation fix 2014-09-21 00:39:33 +05:45
Mike Jolley c4ef86d44e scrutinizer patches 2014-09-08 00:37:55 +01:00