Commit Graph

306 Commits

Author SHA1 Message Date
Michael Pretty 6150ee2fde Validate the parent order ID by calling wc_get_order() instead of get_post() 2017-03-08 08:02:18 -05: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 1a8737fdeb Standardize cache group names 2017-03-02 17:15:39 +00:00
Mike Jolley f5a36778fd Move refund/payment method code out of abstract 2017-02-27 17:06:09 +00:00
Mike Jolley c5697f2d59 Logic error with used id 2017-02-23 15:25:49 +00:00
Mike Jolley 134df2f4a0 Save existing rates rather than recreate all
Fixes #13264
2017-02-23 14:14:50 +00:00
Mike Jolley ded2accace Allow trash status to be set/returned rather than pending 2017-02-22 11:53:47 +00:00
Mike Jolley b37e4da43c Move legacy classes to correct dir 2017-02-16 16:39:56 +00:00
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