Claudiu Lodromanean
dda98da4ad
Merge pull request #13192 from woocommerce/deprecated-hooks
...
Deprecated hook handling
2017-02-15 08:40:16 -08:00
Boro Sitnikovski
5dd607023b
Fix PHP notice when there are shipping taxes.
2017-02-15 15:17:04 +01:00
Mike Jolley
e0d1cfc7b0
Actions
2017-02-14 19:23:57 +00:00
Mike Jolley
1a61f20785
Add actions to trigger legacy actions
2017-02-14 18:55:56 +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
3529d7cafd
Cache items
2017-02-01 14:54:18 +01:00
Mike Jolley
31308403d4
Use variables to save values in item crud.
2017-02-01 10:53:53 +01:00
Brent Shepherd
7a7c0fbce6
Add WC_Abstract_Order::get_valid_statuses()
...
So that classes which extend WC_Abstract_Order can define custom statuses
specifically for their order type and have those used for validation in
WC_Abstract_Order::set_status() instead of only the order statuses defined
by wc_get_order_statuses().
For example, the subscription order type has a number of custom order statuses,
like 'wc-active' and 'wc-expired', which do not apply to orders but are valid
statuses for WC_Subscription objects, which extend WC_Abstract_Order.
2017-01-31 15:00:03 -08:00
Brent Shepherd
0e393da2cd
Fix woocommerce_order_add_product deprecation msg
2017-01-26 16:58:47 -08:00
Brent Shepherd
5e77311384
Fix deprecated action messages
...
Don't end sentence with double .. and instead of "Replace with Use CRUD"
just say "Replace with CRUD"
2017-01-26 16:44:28 -08:00
Justin Shreve
474a307420
Introduce get_tax_class_slugs.
2017-01-25 13:38:13 -08:00
Justin Shreve
e4937b898d
Fix PHP 7.1 warnings/notices.
2017-01-04 10:45:45 -08: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
Mike Jolley
20680203bb
Add actions for all object types
2016-12-19 17:09:52 +00:00
Mike Jolley
5ae62959d8
Notices
2016-12-19 11:59:10 +00:00
Manos Psychogyiopoulos
87bb9adf08
use CRUD to add line item meta
2016-12-19 13:27:32 +02:00
Manos Psychogyiopoulos
3a8eae195b
maintain order item meta action hooks
2016-12-18 18:13:11 +02:00
Mike Jolley
d7dfdd3d10
Wrap all deprecation calls.
2016-11-23 16:15:00 +00:00
Mike Jolley
2b1c762142
Set parent
2016-11-23 15:37:34 +00:00
Justin Shreve
dd0a2317f1
Fix up data tests and some coding standards issues
2016-11-22 04:05:05 -08:00
Justin Shreve
174aa38be6
Start moving meta to normal stores, instead of a separate meta store.
2016-11-22 04:05:05 -08:00
Justin Shreve
b20b3590c8
First pass at order items
2016-11-21 10:56:21 -08:00
Mike Jolley
8cf3feaf82
No absint here
2016-11-21 16:55:36 +00:00
Mike Jolley
8466f4f79a
Feedback
2016-11-21 16:46:32 +00:00
Mike Jolley
c06c357399
Fix tests
2016-11-18 20:27:59 +00:00
Mike Jolley
c933f82961
Refunds
2016-11-17 16:53:13 +00:00
Mike Jolley
8d6f236d47
Fix save
2016-11-17 16:02:09 +00:00
Mike Jolley
83813bb9bb
Interface
2016-11-17 13:18:24 +00:00
Mike Jolley
eafd7c9fa5
Use data store for methods
2016-11-17 12:34:39 +00:00
Mike Jolley
81a2d6345f
Setters
2016-11-17 11:26:24 +00:00
Mike Jolley
b37db6eb7b
Getters
2016-11-17 11:22:24 +00:00
Mike Jolley
d387afbba3
Added data store
2016-11-17 10:53:22 +00:00
Mike Jolley
599a2ad296
Product CRUD improvements ( #12359 )
...
* args is not used any more - remove todo
* Added test for attributes
* wc_get_price_excluding_tax usage
* parent usage
* Fix rating counts
* Test fixes
* Cleanup after tests
* Make sure status transition code runs even during API calls, not just in admin.
* Default visibility
* Fix attribute setting in API
* Use get name instead of get title
* variation id usage
* Improved cross sell templates
* variation_data
* Grouped product sync
* Notices
* Sync is not needed in API
* Delete
* Rename interfaces
* Update counts in data store
2016-11-16 12:17:00 +00:00
Mike Jolley
c4806e63d1
Use new method in abstract order class to prevent headers sent issue in tests
2016-11-11 18:30:18 +00:00
Mike Jolley
09ea4ba91f
[Product CRUD] Variable, variation, notices, and stock handling ( #12277 )
...
* No longer needed
* Remove old todos
* Use getters in admin list
* Related and upsells update for CRUD
* Fix notice in gallery
* Variable fixes and todos
* Context
* Price sync
* Revert variation attributes change
* Return parent data in view context
* Defer term counting
* wc_find_matching_product_variation
* Stock manage tweaks
* Stock fixes
* Correct id
* correct id
* Better sync
* Data logic setter fix
* feedback
2016-11-09 16:10:37 +00:00
Mike Jolley
5f4dbdb733
[Product CRUD] Variations - setters, getters and admin. ( #12228 )
...
* Started on variation changes
* Stock functions
* Variation class
* Bulk change ->id to get_id() to fix variation form display
* Missing status
* Fix add to cart
* Start on stored data save
* save variation
* Save_variations
* Variation edit panel
* Save variations code works.
* Remove stored data code and fix save
* Improve legacy class
* wc_bool_to_string
* prepare_set_attributes
* Use wc_get_products
* More feedback fixes
* Feedback fixes
2016-11-09 16:05:49 +00:00
Justin Shreve
1797c76a14
Implement WC_Data_Store and related code & tests.
2016-11-08 01:39:47 -08:00
Rami Yushuvaev
6cc301e58c
add translators comments
2016-10-29 13:16:03 +03:00
Claudio Sanches
657c312cae
Fix strings case ( #12069 )
...
* Fixed case for all _e, esc_attr_e and esc_html_e strings
* Fixed case for all _n_noop strings
* Fixed case for all _x strings
* Fixed case for all __, esc_html__ and esc_attr__ strings
* Fixed a few more strings
* Fixed strings in unit tests
* Fix PayPal Standard case.
* Save Order text
2016-10-12 11:16:30 +01:00
Aristeides Stathopoulos
831b4463d0
Merge pull request #5 from woothemes/master
...
sync
2016-09-09 16:49:48 +03: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
Aristeides Stathopoulos
734f284fa4
WordPress.PHP.YodaConditions.NotYoda
2016-09-08 01:32:24 +03: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
cc0b29ccf4
PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket
2016-09-02 05:00:46 +03:00
Aristeides Stathopoulos
8fe4cd65a4
PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket
2016-09-02 04:12:22 +03:00
Aristeides Stathopoulos
fde1037757
fix failing tests.
2016-09-01 23:50:14 +03:00
Aristeides Stathopoulos
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
17961f6484
WordPress.Arrays.ArrayDeclaration.ValueNoNewline
2016-08-27 06:04:10 +03:00
Aristeides Stathopoulos
58b9df6564
WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis
2016-08-27 05:23:54 +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
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
077f57f139
Merge branch 'master' into WC_Data_Exception
2016-08-25 11:03:14 +01:00
Mike Jolley
d936dfa87e
[2.6] Allow has_shipping_method to deal with instance ids
...
Fixes #11772
2016-08-25 10:58:11 +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
2636d04ba6
Setters
2016-08-23 15:25:50 +01:00
Mike Jolley
a8e47992a6
Put back add_product for convenience. Fix unit tests.
2016-08-22 18:00:52 +01:00
Mike Jolley
95b11606fc
get_product_from_item -> get_product
2016-08-22 16:51:24 +01:00
Mike Jolley
c88984eb0e
Replace add methods
2016-08-22 16:48:19 +01:00
Mike Jolley
fc2e039882
Deprecate add_product etc
...
#11601
2016-08-22 14:51:53 +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
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