Commit Graph

1004 Commits

Author SHA1 Message Date
Mike Jolley 709dec9ef1 Create and update handling 2016-08-17 16:53:01 +01:00
Mike Jolley b4599d9254 Schema update 2016-08-17 11:44:39 +01:00
Mike Jolley 92ebb933b4 Finish order get 2016-08-16 15:18:16 +01:00
Mike Jolley 3e88ec1f20 Product formatting 2016-08-16 14:49:30 +01:00
Mike Jolley b64c55de49 Format item meta 2016-08-16 13:55:10 +01:00
Mike Jolley bc75c60227 Merge branch 'master' into order-crud-api 2016-08-16 11:09:14 +01:00
Mike Jolley c6f6713e47 Write context in coupon api
@justinshreve
2016-08-15 19:28:07 +01:00
Mike Jolley 3f08d116d8 Start using crud for order requests 2016-08-15 17:27:33 +01:00
Mike Jolley 9138d8a9e1 order api notices 2016-08-15 16:56:55 +01:00
Mike Jolley 23e13fbfa6 created_via 2016-08-15 11:29:29 +01:00
Mike Jolley f3651a9881 Fix user agent calls 2016-08-12 12:53:09 +01:00
Justin Shreve a610c6a804 Update the Customers API to use the WC_Customer CRUD Class
Also:
* Introduces Tests for the Customer REST API
* Fixes a few API and test issues from recent CRUD changes
* Adds some missing billing_ and shipping_ meta data functions to Customer CRUD
2016-08-11 10:30:44 -07:00
Claudio Sanches 43c654a04b [2.6] [REST API] Fixed wrong get order notes error message, closes #11672 2016-08-10 17:55:41 -03:00
Mike Jolley efd390e951 Merge pull request #11645 from woothemes/orders-crud-function-update
Orders crud functions
2016-08-10 12:19:38 +01:00
Justin Shreve 486f7cc738 Correct the avatar_url Customer API response to use the correct email field. 2016-08-09 14:02:58 -07:00
Justin Shreve 35cae38aa2 Fix issues from PR review: sanitize/escape fixes in wp-admin, remove modes. 2016-08-09 10:14:47 -07:00
Justin Shreve 72d665d464 Remove @todo 2016-08-09 09:51:30 -07:00
Justin Shreve b198e6d65b Add the ability to see and update system status modes (shipping debug, template debug, uninstall...) 2016-08-09 09:51:30 -07:00
Justin Shreve 9609998505 Add tools controller 2016-08-09 09:51:30 -07:00
Justin Shreve 9dbd365be8 First pass at system status tools. Fully functioning endpoints for listing tools, listing data about a specific tool, and executing a tool. 2016-08-09 09:51:30 -07:00
Mike Jolley f4a4f6c361 Reduce stock and other notices 2016-08-09 14:15:04 +01:00
Mike Jolley 8d58febaf8 Merge branch 'master' into orders-crud-function-update
# Conflicts:
#	includes/class-wc-checkout.php
2016-08-09 14:03:06 +01:00
Mike Jolley 4ac4bcaa08 Merge branch 'master' into WC-CRUD
# Conflicts:
#	tests/unit-tests/cart/cart.php
2016-08-09 11:08:21 +01:00
Justin Shreve 2d0aeec5c5 Fix customer batch error 2016-08-08 14:54:12 -07:00
Justin Shreve fe7e26d68d Error fixes:
* Typos
* Consistent edit error handles
* Consistent error messages
2016-08-08 14:52:46 -07:00
Mike Jolley 39eb584321 Merge branch 'master' into orders-crud-function-update 2016-08-08 17:24:40 +01:00
Mike Jolley 31803f4e51 Billing/shipping 2016-08-08 16:46:58 +01:00
Mike Jolley 7b0d9a3e61 IP and notes 2016-08-08 16:24:16 +01:00
Mike Jolley 61e2969b83 [2.6][API] Fix coupon description field
fixes #11633
2016-08-08 11:27:07 +01:00
Mike Jolley 6bf05396c2 date_paid 2016-08-05 16:14:30 +01:00
Mike Jolley b8bf05df11 get_user_agent 2016-08-05 16:10:45 +01:00
Mike Jolley 0a0330bac0 customer_user 2016-08-05 16:09:40 +01:00
Mike Jolley 007a767657 billing_phone 2016-08-05 16:09:04 +01:00
Mike Jolley 7685587b22 payment_method 2016-08-05 16:04:41 +01:00
Mike Jolley 693e5ece36 billing_company 2016-08-05 16:03:09 +01:00
Mike Jolley 8d3b4bc5a4 payment_method_title 2016-08-05 15:59:55 +01:00
Mike Jolley 1c18c2f44a billing_first_name 2016-08-05 15:58:44 +01:00
Mike Jolley 84c52370fa more getters 2016-08-05 15:57:40 +01:00
Mike Jolley 39b4831e95 get_id 2016-08-05 15:56:23 +01:00
Mike Jolley 9181c107a8 get_currency 2016-08-05 15:49:17 +01:00
Mike Jolley ccad4d2df3 Merge pull request #11561 from woothemes/add/product-reviews-create-and-update
Add tests, create, update, delete, and batch to the Product Reviews API
2016-08-05 11:16:42 +01:00
Justin Shreve 47c299583d Merge pull request #11618 from woothemes/update/wp-admin-system-status
Update wp-admin's system status page to share backend code with the API
2016-08-04 10:55:19 -07:00
Mike Jolley 1bc9da3e91 Merge branch 'master' into WC-CRUD
# Conflicts:
#	includes/class-wc-coupon.php
2016-08-04 12:10:04 +01:00
Justin Shreve 8df6ff3c7b Convert wp-admin's system status page to use the same backend code as the API. 2016-08-03 10:50:47 -07:00
Justin Shreve 5d521b0da5 Fix product review endpoint based on PR feedback: Code cleanup, prepare_item_for_database like WP-API's comments does, better error handling on create, required arg simplification, trash support for reviews. 2016-08-02 11:03:44 -07:00
Justin Shreve 7529b0b3e9 Code cleanup 2016-08-02 10:30:43 -07:00
Justin Shreve a305da25ef Add batch support to the product reviews endpoint. 2016-08-02 10:30:43 -07:00
Justin Shreve b8ec255ea8 First pass at a product reviews REST API that supports creating/updating/deleting product reviews. 2016-08-02 10:30:43 -07:00
Justin Shreve 9396c5436b Make sure that the create shipping zone uses the correct permissions function. Also makes sure creating the shipping zone returns 201, with the location of the new entity, like other endpoints. 2016-08-02 10:26:26 -07:00
Justin Shreve 069ee3b9ac Add an error check when creating a new shipping zone via the API, incase create() fails. 2016-08-02 10:10:47 -07:00
Justin Shreve 33e0b367ac Add new line at end of files. 2016-08-02 10:10:47 -07:00
Jeff Stieler ea4285b1ec Ensure “rest of the world” zone retrieval doesn’t fail by using the core method instead of the REST controller wrapper. 2016-08-02 10:10:47 -07:00
Jeff Stieler bb23d2eaae Ensure _links are added to the single shipping zone method endpoint. 2016-08-02 10:10:47 -07:00
Jeff Stieler 5e7c495e10 Add “rest of the world” zone to API response. 2016-08-02 10:10:47 -07:00
Jeff Stieler 61a5bf8a68 Add single shipping zone method instance endpoint. 2016-08-02 10:10:47 -07:00
Jeff Stieler 288496b22b Separate shipping zone endpoint permissions check between read and write operations. 2016-08-02 10:10:47 -07:00
Jeff Stieler 7ebb466287 REST API item schemas should be singular objects.
Use single object schemas for Shipping Zone Locations and Methods.
2016-08-02 10:10:47 -07:00
Jeff Stieler f2bb438e98 Add _links to each shipping zone method. 2016-08-02 10:10:47 -07:00
Jeff Stieler 92f0c2bd2c Add endpoint to retrieve all shipping zone methods. 2016-08-02 10:10:47 -07:00
Jeff Stieler 510229e13d Add initial controller for Shipping Zone Methods endpoint, with schema definition. 2016-08-02 10:10:47 -07:00
Jeff Stieler 5400f94f86 Shipping zone location “type” field sanitization callback should be for text values. 2016-08-02 10:10:47 -07:00
Jeff Stieler 5d147ae287 Fix @extends annotation in shipping zone controller classes. 2016-08-02 10:10:47 -07:00
Jeff Stieler 6d891e1247 Handle case where no locations are sent in update request. 2016-08-02 10:10:47 -07:00
Jeff Stieler 626819f9b8 Add shipping zone locations update endpoint and handler. 2016-08-02 10:10:47 -07:00
Jeff Stieler c041e69e86 Correct locations schema, should be an array of location objects. 2016-08-02 10:10:47 -07:00
Jeff Stieler 9946d028f2 Add “described by” link to shipping zones endpoint response. 2016-08-02 10:10:47 -07:00
Jeff Stieler 96c18abb8d Add shipping zone locations retrieval endpoint. 2016-08-02 10:10:47 -07:00
Jeff Stieler 56ef442624 Move common methods to an abstract base shipping zones controller class. 2016-08-02 10:10:47 -07:00
Jeff Stieler 7a142af215 Initial Shipping Zone Locations endpoint controller, with schema. 2016-08-02 10:10:47 -07:00
Jeff Stieler 5718e66b2c Add create shipping zone endpoint and handler. 2016-08-02 10:10:47 -07:00
Jeff Stieler 29e150612f Add update shipping zone endpoint and handler. 2016-08-02 10:10:47 -07:00
Jeff Stieler 1480741998 Cast returned zone ID and order as integers. 2016-08-02 10:10:47 -07:00
Jeff Stieler 69a40b0648 Refactor Shipping Zone retrieval into a reusable method. 2016-08-02 10:10:47 -07:00
Jeff Stieler 039f5d2300 Add route and handler for retrieving single Shipping Zones. 2016-08-02 10:10:47 -07:00
Jeff Stieler fd042b88cf Implement get_items() for Shipping Zones endpoint. 2016-08-02 10:10:47 -07:00
Jeff Stieler 0de6f42b51 Create GET route for shipping zones, handling case where shipping calculations are disabled. 2016-08-02 10:10:47 -07:00
Jeff Stieler 267e5cba9a Add initial Shipping Zones REST API controller, with zone schema definition method. 2016-08-02 10:10:47 -07:00
Justin Shreve 5d95b76e1a Rename the endpoint from system-status to system_status (matches the rest of WC endpoints). 2016-07-27 14:06:14 -07:00
Justin Shreve e436e96654 Add missing textdomains, remove wc_ prefix from a few fields, spacing/coding standard fixes. 2016-07-27 13:59:16 -07:00
Justin Shreve 041b5745b4 Finish system status tests 2016-07-27 12:19:14 -07:00
Justin Shreve e255602d91 System status controller 2016-07-27 10:29:10 -07:00
Enrico Deleo 6ef223057a Merge branch 'master' of github.com:woothemes/woocommerce 2016-07-27 11:07:17 +02:00
Justin Shreve 1d4615aee3 Fix setting class case. REST should be uppercase. 2016-07-26 14:33:55 -07:00
Justin Shreve 226fdb870b Misc cleanup of descriptions and some error strings. 2016-07-26 10:24:15 -07:00
Jeff Stieler af1e3d0417 Remove WC_REST_Settings_Options_Controller dependency on WC_REST_Settings_API_Controller. 2016-07-26 10:24:15 -07:00
Jeff Stieler 8ff799562b Remove WC_REST_Settings_Controller dependency on WC_REST_Settings_API_Controller. 2016-07-26 10:24:15 -07:00
Jeff Stieler 2fcb15d9cf Rename WC_Rest_Settings_Groups_Controller to WC_Rest_Settings_Controller. 2016-07-26 10:24:15 -07:00
Jeff Stieler f168f356bc Rename WC_Rest_Settings_Controller to WC_Rest_Settings_Options_Controller. 2016-07-26 10:24:15 -07:00
Jeff Stieler cca2a0ff5e Reuse WC Admin Setting’s save_fields() instead of duplicating code for sanitizing saved values. 2016-07-26 10:24:15 -07:00
Jeff Stieler f3e21123d1 Use WC Admin Settings’s get_option() in REST Settings controller instead of duplicating code. 2016-07-26 10:24:15 -07:00
Jeff Stieler 4f98586979 Add _links to returned settings groups. 2016-07-26 10:24:15 -07:00
Jeff Stieler 24014a5d04 Move bulk settings updating to the Settings controller, following existing batch endpoint patterns. 2016-07-26 10:24:15 -07:00
Jeff Stieler 7c119ac268 Add _links to /settings/<group> and /settings/<group>/<setting> responses. 2016-07-26 10:24:15 -07:00
Jeff Stieler b2c628f0d8 Move settings group endpoint to Settings controller and only return settings-schema’d items. 2016-07-26 10:24:15 -07:00
Jeff Stieler 519be1c519 Add Settings controller getter method for all group settings. 2016-07-26 10:24:15 -07:00
Jeff Stieler b69c9814af Match parent signature of prepare_item_for_response(), add getter method for settings. 2016-07-26 10:24:15 -07:00
Claudio Sanches 7b78a6d9a7 Small tweaks to make it follow the REST API standards 2016-07-26 10:24:15 -07:00
Justin Shreve 56b769614d edit_item should be update_item 2016-07-26 10:24:15 -07:00
Justin Shreve 3c35721bea Rename update_ functions to edit_item, and get_groups/get_settings to get_item and get_items per feedback. Also move the namespace into each class. 2016-07-26 10:24:15 -07:00
Justin Shreve fa27f277a1 Split settings and groups controllers into two separate files. 2016-07-26 10:24:15 -07:00