Mike Jolley
9e45927803
Create refund with crud
2016-08-22 13:15:15 +01:00
Mike Jolley
21ad196297
Use CRUD in wc_save_order_items
2016-08-19 13:43:33 +01:00
Mike Jolley
594bceedf2
Comment out exception code - see #11715
2016-08-17 17:07:30 +01:00
Mike Jolley
709dec9ef1
Create and update handling
2016-08-17 16:53:01 +01:00
Mike Jolley
0b9a5998cc
Exception class
2016-08-17 11:44:56 +01:00
Mike Jolley
99be0167b4
Order type doesn't appear to be used anywhere, and I'd expect other plugins extending orders to have their own classes anyway making this a bit pointless.
...
@thenbrent
2016-08-16 13:02:22 +01:00
Mike Jolley
1baef12395
qty -> quantity
2016-08-16 12:36:38 +01:00
Mike Jolley
3f08d116d8
Start using crud for order requests
2016-08-15 17:27:33 +01:00
Mike Jolley
0113dbd7c5
Use wc_do_deprecated_action
2016-08-15 11:08:36 +01:00
Mike Jolley
0dd41179aa
Prefix item ids and revert some changes to add_products method for ease of use.
2016-08-15 11:02:25 +01:00
Mike Jolley
7796fe9cf1
Clean item/group cache when remove_order_items is used.
2016-08-12 16:48:48 +01:00
Mike Jolley
71afe5fdf7
Fix get_items
2016-08-09 14:21:54 +01:00
Mike Jolley
f4a4f6c361
Reduce stock and other notices
2016-08-09 14:15:04 +01:00
Mike Jolley
7861b76e9b
Checkout handling
...
Also introduces add_item so you can add items to an order before the
order exists. Save at once is more efficient.
2016-08-09 14:02:40 +01:00
Mike Jolley
971cff77b8
Fixed unit tests
2016-08-08 17:47:50 +01:00
Mike Jolley
39eb584321
Merge branch 'master' into orders-crud-function-update
2016-08-08 17:24:40 +01:00
Mike Jolley
e8d85005d7
Handle default status
2016-08-08 17:24:39 +01:00
Mike Jolley
9d66367699
Status change fixes
2016-08-08 17:03:43 +01:00
Mike Jolley
a8759fc0aa
Meta/product handling
2016-08-08 16:20:15 +01:00
Paul Kilmurray
4484877481
initialize $tax_rates variable
...
There are situations where the $tax_rates may not be initialized in the conditional, which in turn throws an error later in the function.
2016-08-08 10:36:04 +07:00
Mike Jolley
0b04ee195c
Over sanitization
2016-08-05 15:43:12 +01:00
Mike Jolley
f694f297e8
Use get_id()
2016-08-03 12:57:32 +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
423a18f5c1
[2.6] When checking needs_shipping, ignore anything after : in the method ID
...
Fixes #11552
2016-08-01 10:31:05 +01:00
Claudio Sanches
7778583340
Fixed wrong number of decimal precision, closes #11368
2016-07-11 17:26:54 +02:00
Paul Kilmurray
75379a6025
fix typo
...
#11349
2016-07-05 11:44:22 +08:00
Claudio Sanches
6fafe2c531
Fixed how calculate shipping tax rates when using more than one tax class
...
Closes #11349
cc @mikejolley
2016-07-04 17:52:53 -03:00
Mike Jolley
5275a2663a
check if empty
2016-06-23 16:07:35 +01:00
Mike Jolley
a22859ae32
Abstract unit tests
2016-06-23 15:52:12 +01:00
Mike Jolley
46439ddba5
Refund unit tests
2016-06-22 16:31:05 +01:00
Mike Jolley
8287b13cf1
Address and CRUD unit tests
2016-06-22 14:07:42 +01:00
Mike Jolley
122ad3a479
Abstract order class
2016-06-21 20:03:56 +01:00
Mike Jolley
847dea6a2d
docs/vars
2016-06-07 14:02:02 +01:00
Mike Jolley
d4d6f3181c
Best practice tweaks
2016-06-06 17:24:31 +01:00
Mike Jolley
2d2a5eb816
Hide empty taxes by default.
...
Closes #11050 @claudiosmweb
2016-06-06 13:50:21 +01:00
Claudio Sanches
e39274e753
HTTPS for everybody
2016-05-26 22:48:49 -03:00
Brent Shepherd
8ae4b5ad24
Fix "Undefined variable: args" notice
2016-05-16 22:25:58 -07:00
Brent Shepherd
29692a22c5
Fix fatal error on order tax calculations
...
Fix "PHP Fatal error: Call to a member function get_total() on array"
by using the shipping line items cost index instead of attempting
to call a method on it which does not exist (because it's an array)
2016-05-16 22:22:53 -07:00
Brent Shepherd
94a9c649ba
Remove empty lines
2016-05-16 22:22:38 -07:00
Mike Jolley
094afb4745
Allow failed orders to be edited
2016-05-16 11:12:12 +01:00
Mike Jolley
c9095abf8e
Save line taxes for shipping rows
...
Fixes #10897
2016-05-11 16:32:51 +01:00
Mike Jolley
fd001669fe
woocommerce_email_order_items_args filter
...
Closes #10812
2016-05-03 15:40:34 +01:00
Mike Jolley
87dc31ffac
Force name to be set
...
Closes #10782
2016-04-25 13:25:15 +01:00
Mike Jolley
29c6acf767
Used positional placeholders in strings where the order of strings may require modification in the locale.
...
Closes #10775
2016-04-25 13:07:41 +01:00
Mike Jolley
975f9d8c2d
Remove nonce on cancel order URL
...
Nonces are invalid if the user ID changes during checkout e.g. through
registration. Cancel links are invalid.
cc @claudiosmweb
Fixes #10605
2016-03-30 12:45:25 +01:00
Mike Jolley
c573a5b75f
Only add product line if product exists.
...
Fixes #10556
2016-03-14 15:40:58 +00:00
Mike Jolley
807b860a6c
Merge pull request #10514 from SiR-DanieL/email-items-type
...
Added bool param for email order items hooks
2016-03-09 12:00:11 +00:00
Mike Jolley
55918626f5
[2.5] Update date for paid orders during non-manual updates only
...
Fixes #10510
2016-03-09 11:58:44 +00:00
Nicola Mustone
c7756187e0
Added bool param for email order items hooks
2016-03-09 12:55:28 +01:00
Justin Shreve
927941e2ca
Merge pull request #10260 from justinshreve/token-api
...
Payment Token API
2016-03-04 04:34:41 -08:00
Mike Jolley
e7e4808726
Correct status check and improved note
...
#10461
2016-03-03 17:04:20 +00:00
Mike Jolley
fab1f224c6
When creating new order from draft, assume 'pending' for status transitions
...
Fixes #10461
2016-03-03 13:51:04 +00:00
Justin Shreve
bfa9437a43
Rename the meta name _payment_tokens to remove the wc_ prefix, since this meta is a part of WC orders already.
2016-03-01 11:49:38 -08:00
Justin Shreve
6112752836
Misc cleanup based on PR feedback:
...
* Remove $token_id parameter from WC_Order's add_payment_token. get_id() can be used to access the ID
* Rename our list of token ids from meta to $token_ids as it makes more sense
* Cleaned up/fixed some of the comments in WC_Payment_Token
* Some code formatting fixes
2016-03-01 11:49:38 -08:00
Justin Shreve
204922e2ae
Add methods for managing payment tokens associated with an order.
2016-03-01 11:49:37 -08:00
Mike Jolley
fa2280f3f8
Add notice on fail
2016-02-29 12:33:09 +00:00
Mike Jolley
09ef555e5a
[2.5] Combine update post calls
2016-02-29 12:24:02 +00:00
Mike Jolley
e9703da300
Merge pull request #9921 from peterrath/vat-exempt-and-tax-enabled-handling
...
VAT exempt and “TAX enabled” handling in back end and Orders API
2016-02-19 14:53:39 +00:00
Peter
de1ecf9f78
Use === instead of == in abstract-wc-order.php
...
Use === here: if ( 'yes' === $this->is_vat_exempt or ! wc_tax_enabled() )
2016-02-18 19:56:55 +01:00
Diego Zanella
6e4376511d
Fixed incompatibility with PHP 5.4 and earlier
2016-02-10 19:47:16 +00:00
Mike Jolley
352184cc06
Merge branch 'master' into shipping-zones
...
# Conflicts:
# assets/css/admin.css
# i18n/languages/woocommerce.pot
# includes/abstracts/abstract-wc-payment-gateway.php
# includes/abstracts/abstract-wc-shipping-method.php
# includes/admin/settings/class-wc-settings-shipping.php
# includes/wc-core-functions.php
# uninstall.php
2016-02-05 14:58:48 +00:00
Ewout Fernhout
a3634028fa
default order to processing for non-catalog products
...
fixes #10252
2016-02-03 14:48:19 +01:00
Mike Jolley
657521ffa4
[2.5] Don't show purchase note to admin
2016-01-27 15:30:07 +00:00
Mike Jolley
4cfd8ff214
[2.5] Don't show downloads in admin email
2016-01-20 16:58:58 +00:00
Mike Jolley
1076854608
Merge branch 'master' into shipping-zones
...
# Conflicts:
# assets/css/admin.css
# includes/abstracts/abstract-wc-shipping-method.php
# includes/class-wc-shipping.php
# includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
# includes/shipping/flat-rate/includes/class-wc-eval-math.php
# includes/shipping/free-shipping/class-wc-shipping-free-shipping.php
#
includes/shipping/legacy-international-delivery/class-wc-shipping-legacy
-international-delivery.php
#
includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-d
elivery.php
2016-01-11 11:48:18 +00:00
Mike Jolley
007abbc98e
Shipping meta data
...
Closes #9094
2016-01-08 11:42:32 +00:00
Peter
c5e3e018c3
is_vat_exempt and wc_tax_enabled handling in abstract-wc-order
...
If is_vat_exempt is 'yes', or wc_tax_enabled is false, then do not calculate tax.
2016-01-05 21:36:06 +01:00
Mike Jolley
7ece70a6ae
Update _transaction_id
...
Closes #9970
2016-01-05 15:59:57 +00:00
Mike Jolley
97d47fb576
Move zones to main settings
2016-01-05 11:23:15 +00:00
Fredrik Forsmo
b4a04a73ce
Fix phpdoc tags for methods in abstract WC_Order class
2016-01-03 10:00:02 +01:00
Mike Jolley
4bf40cedb1
Tweak logic
2015-12-23 12:50:28 +00:00
Peter
458c755b5f
Update abstract-wc-order.php
...
If the order has no shipping line, there must not generate an unnecessary shipping tax line with 0 value. It was happened if there is set a different tax class for shipping than tax classes of the actual product line items of the order, and the order has not got any shipping line.
The aim is to have the same tax calculation behavior if we create orders using the GUI (front end or back end), and the API.
This condition prevents to create the unnecessary tax line if there is no shipping methods of the order:
// Now calculate shipping tax
$matched_tax_rates = array();
$shipping_methods = $this->get_shipping_methods();
if ( ! empty( $shipping_methods ) ) {
......
}
This conditional solution is similar than calc_line_taxes() in WC_AJAX class:
// Get shipping taxes
if ( isset( $items['shipping_method_id'] ) ) {
.....
}
2015-12-21 23:42:59 +01:00
Mike Jolley
f3d6ce3c94
Round total discount to precision
...
Fixes #9834
2015-12-14 12:06:39 +00:00
Claudio Sanches
ff637abb7b
Removed duplicated argument for PHP 7, closes #9788
2015-12-07 17:36:18 -02:00
Mike Jolley
dd2fe6ff49
Make WC_Abstract_Order::update_status() return boolean
...
closes #9777
2015-12-07 10:12:17 +00:00
Mike Jolley
2e553cf220
Show order refunds in totals
...
Fixes #9589 @claudiosmweb
2015-11-30 15:25:48 +00:00
Mike Jolley
b5a2c2a9d5
Unify all order email tables to use a single template
...
Closes #9587
@claudiosmweb @jameskoster
2015-11-30 15:16:23 +00:00
Claudio Sanches
753014da5a
Merge pull request #9631 from woothemes/transient-tweaks
...
Transient tweaks
2015-11-21 22:48:14 -02:00
Illimar Tambek
d91dfb6fe6
Introduce woocommerce_recorded_sales action hook
2015-11-19 18:07:04 +02:00
Mike Jolley
851fc2a442
Use get_cache_prefix in orders class
2015-11-13 23:11:05 +00:00
Mike Jolley
4e5baf23aa
Cache get_item_meta_array for better performance
...
Closes #8810 @claudiosmweb
2015-11-05 15:21:28 +00:00
Claudio Sanches
5893875b0c
Removed period for file headers
2015-11-03 11:53:50 -02:00
Claudio Sanches
efa19f799d
Fixed some coding standards for docblocks
2015-11-03 10:28:01 -02:00
Mike Jolley
5b6e16682c
Handle partial/full refund for orders containing free items
...
Also adds helper method to determine if such as free item exists or
not. Closes #9460
2015-10-29 15:34:33 +00:00
Mike Jolley
d4fbe0e45c
Use SKU for stock order notes
...
Fixes #9133
2015-10-01 18:13:37 +02:00
Claudio Sanches
1522a4d87b
Added download-url class in WC_Abstract_Order::display_item_downloads(), closes #9158
2015-09-21 18:28:03 -03:00
Claudio Sanches
f7d035e739
Merge pull request #9084 from rchq/patch-1
...
Added an action for notifications
2015-09-15 19:59:16 -03:00
Mike Jolley
9f1a5e3c26
Remove unused arg
2015-09-15 12:51:45 +01:00
Mike Jolley
0164584aaf
Reduce stock once and record in _order_stock_reduced meta
...
Also clears up the payment_complete method
2015-09-15 12:39:16 +01:00
rchq
332c1bdf9c
Update abstract-wc-order.php
...
Created an action to be able to hook into and add additional notification triggers.
2015-09-08 11:00:22 -07:00
Mike Jolley
fad48bf800
Add filters to control shipped via text
2015-09-03 15:05:10 +01:00
Mike Jolley
fdb25fa0c3
Pass through tax_display
...
Fixes #8951
2015-08-26 13:05:52 +01:00
Mike Jolley
57bb0ebe25
Record manual order status change
2015-08-18 16:33:38 +01:00
Mike Jolley
1999dbe92d
Improve display_item_downloads numbering and use same function in emails.
2015-08-17 12:17:56 +01:00
Brent Shepherd
a826330ad0
Reinstate default value for $items
...
That was (accidentally?) removed with SHA: 877e39064
Fixes "PHP Notice: Undefined variable: items" when attempting to get
line items of a type that does not exist on the order, like coupons.
2015-08-07 12:12:08 -07:00
Mike Jolley
877e390646
Remove $type from prepare
2015-08-07 14:06:19 +01:00
Mike Jolley
4c8ef3ff33
Use esc_sql on item type instead of esc_attr
2015-08-07 11:37:19 +01:00
Mike Jolley
7f3c2a78c5
Get total functions should respect rounding settings.
...
Closes #8707
2015-08-05 14:33:53 +01:00
Mike Jolley
d6bd46c55d
Move expand_item_meta to own method
...
Fixes notices in some extensions (deposits)
2015-08-03 13:21:44 +01:00
Mike Jolley
ef798921aa
woocommerce_can_reduce_order_stock filter
...
Needed for extension (deposits)
2015-08-03 10:37:58 +01:00