Commit Graph

284 Commits

Author SHA1 Message Date
Claudio Sanches d3a5a1bfd4 Fixed bugs caused after fixing coding standards 2017-11-29 10:32:35 -02:00
Claudio Sanches fd4fa0cf71 Fixed coding standards 2017-11-28 11:04:38 -02:00
Claudio Sanches def87b74bf Display product URL only if is not hidden in downloads list
Fixes #17925
2017-11-28 10:18:43 -02:00
Claudio Sanches 777ba46299
Merge branch 'master' into fix/17424 2017-10-30 11:01:17 -02:00
Shiva Poudel 53a2dfd77c Fix - Empty content undeclared variable in #17233 2017-10-29 23:02:27 +05:45
claudiulodro f06ecee1c5 Fix order methods and add tests 2017-10-27 13:37:00 -07:00
Mike Jolley ba3d959e66 Merge branch 'master' into pr/17183 2017-10-27 18:49:27 +01:00
Herre Groen 1bde5aa37f Add error logging to status update failes to prevent silent swallowing of errors. 2017-10-17 14:23:54 +02:00
Mike Jolley 7419168e65 More cleanup and new fallback option for addresses 2017-10-16 08:12:07 -07:00
Claudio Sanches 4887f7c5be Save order paid date as GMT+0
All dates should be saved as GMT+0 in order to make `WC_DateTime` work
correct.

Fixes #16932
2017-09-26 14:58:35 -03:00
Umangvaghela e38d01bcfa Resolve Issue 2017-09-15 10:54:30 -07:00
Michal Zuber 21c25f326b Remove dupe check
Already checked at 0337293e39/includes/abstracts/abstract-wc-product.php (L1593)
2017-09-08 14:25:02 +02:00
Mike Jolley 7a817ee103 Added back missing discount row
Closes #16586
2017-08-24 12:49:49 +01:00
Mike Jolley e99471c0cd Removed manual discounts code 2017-08-18 10:36:10 +01:00
claudiulodro a0effafef9 Move discount row in frontend 2017-08-11 11:48:08 -07:00
Mike Jolley 22d6c789ab herpa derpa 2017-08-10 15:57:34 +01:00
Emil Kjær Eriksen ee830d19b4 Store status_transition in a local variable and reset it before firing hooks 2017-08-08 12:47:16 +02:00
Mike Jolley 3939f50ced Download display in account/checkout 2017-07-11 13:45:35 +01:00
Mike Jolley c16acc6b51 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	assets/css/wc-setup-rtl.css
#	assets/css/wc-setup.css
2017-05-23 19:00:24 +01:00
Rasmus Bengtsson 185934fad9 Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
Rasmus Bengtsson 4f00d7e5e3 PHPDoc: Add missing return statement 2017-05-15 13:37:59 +02:00
Gabor Javorszky 6d71eab0cd Adds missing $this to arguments for woocommerce_payment_complete_order_status filter
Fixes #14698
2017-04-26 08:02:46 +01:00
Claudio Sanches 3b7a41ea53 Improved logic of WC_Order::get_shipping_address_map_url()
See comments in #14436
2017-04-20 02:12:18 -03:00
Mike Jolley 2071e8efee Added has_shipping_address helper method
#14364
2017-04-17 15:15:08 +01:00
Matt Cohen 4aba3d16b0
Adjusts the filter to apply after removing the undesired elements, instead of before. #14398 2017-04-17 12:05:29 +02:00
Matt Cohen dc37646273
Removes the first name, last name, and company from the shipping address map URL. Fixes #14398 2017-04-17 11:15:30 +02:00
Mike Jolley 58040c94ae Increase order key length to 22 to support 2.6
Fixes #13850
2017-03-31 12:29:19 +01:00
Akeda Bagus 0b416439c8
Fixed all typos of all files in includes/ directory.
Scanning and fixing were done automatically by codespell,
https://github.com/lucasdemarchi/codespell.
2017-03-29 00:58:51 +07:00
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