Commit Graph

580 Commits

Author SHA1 Message Date
Claudio Sanches 11ce0fb18c [API] Added endpoint to allow delete product attribute terms 2015-12-04 17:01:49 -02:00
Claudio Sanches 4d57d6f4db [API] Added endpoint to allow edit product attribute terms 2015-12-04 16:53:17 -02:00
Claudio Sanches 20efee8cd4 [API] Added endpoint to create product attribute terms 2015-12-04 16:38:17 -02:00
Claudio Sanches 1d0d2258d0 [API] Created method to get a single product attribute term 2015-12-04 16:14:57 -02:00
Claudio Sanches b530449774 [API] Created method to get product attribute terms 2015-12-04 16:02:31 -02:00
Claudio Sanches 54f714e184 [API] Introduces expand filter for orders
Show full products, taxes and coupons data.

Usage: ?filter[expand]=products,taxes,coupons

Closes #9551

cc @mikejolley
2015-12-03 19:05:37 -02:00
Claudio Sanches 2529bd2a4c [API] Allow query endpoints with all status, closes #9738 2015-12-01 22:35:25 -02:00
Claudio Sanches 0b789ed216 [2.4] [API] Fixed early order status change
Closes #9672
2015-12-01 20:04:17 -02:00
Claudio Sanches 3e355ef538 [2.4] [API] Delete product parent transients
Closes #9595
2015-12-01 19:26:35 -02:00
Claudio Sanches c68501f666 [2.4] [API] Fixed backorders edit for variations
closes #9618
2015-12-01 19:14:41 -02:00
Claudio Sanches 89d177a48b [2.4] [API] Fixed status when have an invalid timestamp
Change status from 200 to 401

Closes #9737
2015-12-01 18:30:53 -02:00
Claudio Sanches eeafb202aa [API] Save variation description, closes #9663 2015-11-29 19:57:08 -02:00
Mehdi Esmaeili 101c7f47e1 Better Documentation: Put throws tag 2015-11-17 16:21:42 +03:30
Claudio Sanches 57feb4ba9b [API] Added woocommerce_api_uploaded_image_from_url action, closes #9568 2015-11-10 22:59:17 -02:00
Claudio Sanches 9adb04d612 [CLI] Created command to update tax rate 2015-11-06 02:50:07 -02:00
Claudio Sanches 394342c287 [API] Fixed action and removed transient functions from taxes PUT endpoint 2015-11-06 02:44:02 -02:00
Claudio Sanches 18cf62ed66 [API] Created commands to create tax rates and tax classes 2015-11-06 01:58:08 -02:00
Claudio Sanches 647a2e7498 [API] Created commands to list tax rates and tax classes 2015-11-06 01:37:57 -02:00
Mike Jolley 61e746730f wc_transaction_query function
Only uses transactions if enabled, or read uncommitted is supported
#9279
2015-11-04 14:11:40 +00:00
Claudio Sanches 4522b68a47 [2.4] [API] Avoid undefined $taxonomy warnings while save variable attributes, closes #9456 2015-10-28 16:31:05 -02:00
Claudio Sanches 154dac6d14 [2.4] [API] Fixed attributes save when using non-latin letters
Changed sanitize_title() to wc_sanitize_term_text_based() since
wp_set_object_terms() is creating wrong terms

Closes #9421
2015-10-23 14:38:37 -02:00
Claudio Sanches bfe98a283c [2.4] [API] Fixed editing product variations
Fixed general variations edition and make sync again variations when just
edit a variable product and don't send any 'variations' data

closes #9406
2015-10-22 17:19:16 -02:00
Jeff Stieler 58ec17f76d Use new review verification status retrieval method on single review template and in APIs. 2015-10-20 22:05:17 -06:00
Jeff Stieler 95fe3d47c2 Use review comment meta for verification status in API calls and WP-CLI. 2015-10-20 22:03:29 -06:00
Claudio Sanches 5c6206e511 [2.4] Fixed WC_API_Orders::set_line_item() for v2 #9338 2015-10-11 11:34:34 -03:00
Claudio Sanches 5465cdadb1 [2.4] Fixed WC_API_Orders::set_line_item(), closes #9338 2015-10-11 11:32:56 -03:00
Claudio Sanches f6526d72a7 [API] Allow get variable products by sku, closes #9330 2015-10-09 16:43:12 -03:00
Claudio Sanches 15e79820aa [API] Better naming for returned data on the taxes endpoint 2015-10-08 18:49:05 -03:00
Claudio Sanches e84fa58e35 [API] Created taxes bulk method 2015-10-08 18:44:26 -03:00
Claudio Sanches 860d292f4f [API] Added method to edit tax rates 2015-10-08 18:34:47 -03:00
Claudio Sanches 1a3b5f3a6f [API] Fixed the tax_rate key 2015-10-08 18:01:38 -03:00
Claudio Sanches 3200a1dc0c Removed error_log() 2015-10-08 17:35:34 -03:00
Claudio Sanches 6d485a2fed [API] Created woocommerce_api_create_tax_rate_data filter 2015-10-08 17:35:00 -03:00
Claudio Sanches 52bdc2c3a5 [API] Changed returned data name from tax to tax_rate 2015-10-08 17:34:39 -03:00
Claudio Sanches 47c3ba9d21 Created WC_Tax::_get_tax_rate() method 2015-10-08 17:24:37 -03:00
Claudio Sanches 1cded0e1a3 [API] Added method to create tax rates 2015-10-08 17:15:00 -03:00
Claudio Sanches befda55262 Removed test 2015-10-08 09:40:20 -03:00
Claudio Sanches 1081c2cbe6 [API] Added method to create tax classes 2015-10-07 22:52:45 -03:00
Claudio Sanches d4c1c4cca4 [API] Added endpoint to get total of tax classes 2015-10-07 22:35:34 -03:00
Claudio Sanches ef00fe5b2f [API] Added method for delete tax classes 2015-10-07 22:27:42 -03:00
Claudio Sanches 6cd57e2611 [API] Added method to delete tax rates 2015-10-07 22:10:33 -03:00
Claudio Sanches 34ef764477 [API] Included standard rate in get tax classes response 2015-10-07 19:12:31 -03:00
Claudio Sanches 4f45b04722 [API] Added endpoint to get taxes count 2015-10-07 19:07:45 -03:00
Claudio Sanches 40b210a144 [API] Get taxes method 2015-10-07 19:00:36 -03:00
Claudio Sanches e3d57ab70c [API] Created method to get tax rate by ID 2015-10-07 17:44:04 -03:00
Claudio Sanches 16b9f22706 [API] Created method to return tax classes 2015-10-07 17:02:06 -03:00
Claudio Sanches 1168adf8af [API] Created initial WC_API_Taxes class 2015-10-07 11:42:25 -03:00
Claudio Sanches 5b0a5d15a8 [API] Stop round product prices, closes #9271 2015-10-06 11:12:23 -03:00
Claudio Sanches 6cb5c08037 [API] Added inventory_delta attribute to products endpoint, closes #7673 2015-10-01 15:05:02 +02:00
Claudio Sanches e34e234481 [API] Added grouped_products attribute to products endpoint, closes #8862 2015-10-01 14:08:42 +02:00
Claudio Sanches 6c3005cddc [2.4] [API] Fixed customers count method 2015-10-01 10:54:30 +02:00
Claudio Sanches 0547c01418 [API] Removed useless _order_number param in POST/PUT orders, closes #9250 2015-10-01 10:14:42 +02:00
Claudio Sanches e43fa91ab9 Inline comment for #8884 2015-09-30 18:12:12 +02:00
Claudio Sanches 2559c9287a [API] Added filter option to show all users on customers endpoint, closes #8884 2015-09-30 18:10:47 +02:00
Claudio Sanches f7ea1d4c6a [API] Product featured_src return type as string, closes #9220 2015-09-25 16:13:52 +02:00
Claudio Sanches 06d31d1f86 [2.4] [API] Added refunded_item_id on GET orders/<id>/refunds endpoint, closes #9196 2015-09-22 14:37:11 -03:00
Claudio Sanches f9fb149551 Allow filter orders by customer id, closes #9162 2015-09-21 19:11:54 -03:00
Claudio Sanches c739f395ce [2.4] [API] Improved the way are used for non-global attributes for variations 2015-09-17 02:57:04 -03:00
Claudio Sanches 376b13aece [API] Sanitize product image alt attribute 2015-09-15 14:25:43 -03:00
Mikael Mattsson d3302a9fa8 Merge branch 'master' of https://github.com/woothemes/woocommerce
# By Akeda Bagus (4) and Beka Rice (1)
# Via Mike Jolley (3) and others
* 'master' of https://github.com/woothemes/woocommerce:
  Added more products query filter for REST API.
  Added support to GET, POST, PUT, and DELETE tags.
  Added support to POST, PUT, and DELETE categories.
  Added API support for product shipping classes.
  [2.5] Filter when purchase note is showed
2015-09-15 17:28:42 +02:00
Mikael Mattsson ac49411146 Make the image properties alt and title writable in the REST API v3. 2015-09-15 17:17:14 +02:00
Akeda Bagus 97565ef9a1 Added more products query filter for REST API.
The new filters are taxonomies related: tag, shipping class, and
attribute. The code was refactored a bit so all taxonomies query are
wrapped within tax_query.
2015-09-15 07:18:28 -05:00
Akeda Bagus 6906eb4eae Added support to GET, POST, PUT, and DELETE tags. 2015-09-13 17:59:07 +07:00
Akeda Bagus 2980ffd66b Added support to POST, PUT, and DELETE categories. 2015-09-13 17:59:07 +07:00
Akeda Bagus f781d393c8 Added API support for product shipping classes.
This change implements GET, POST, PUT, and DELETE handlers for shipping
classes endpoint, /products/shipping_classes.

Fixes #8948.
2015-09-13 17:54:23 +07:00
Claudio Sanches 194f9cd6ec Revert "Added API support for product shipping classes." 2015-09-10 14:22:11 -03:00
Akeda Bagus 1f18d861ce Added API support for product shipping classes.
This change implements GET, POST, PUT, and DELETE handlers for shipping
classes endpoint, /products/shipping_classes.

Fixes #8948.
2015-09-09 20:38:11 +07:00
Florian Ludwig 4e0961333f Restored wc<2.4 behavior of order item meta keys
The previous version of woocommerce showed the machine readable names
in item_meta['key’] especially for the custom variation attributes but
after 2.4 it shows only meta ids in the key.

This commit reverts the behavior to the prior 2.4 behavior.
2015-08-31 17:59:41 +02:00
Claudio Sanches 8da7369088 Just avoid deprecated notices for #8848 2015-08-17 14:04:12 -03:00
Claudio Sanches a12552dbf1 [API] Removed $HTTP_RAW_POST_DATA in favor of php://input, closes #8848 2015-08-17 12:51:19 -03:00
Claudio Sanches 1d0d48b1ad Fix attribute text based in API, closes #8823 2015-08-14 15:22:57 -03:00
Claudio Sanches a215c4ed3c [API] Fixed variation without parent for v2 2015-07-30 21:53:00 -03:00
nils-fredrik@maksimer.no f4db67bcbc Fix for #8691: Variation without parent will not cause 500. 2015-07-30 23:32:24 +02:00
Claudio Sanches 09145181e5 [API] Removed deprecated products/sku endpoint 2015-07-30 17:35:14 -03:00
Claudio Sanches 948c5c9cfc Fixed the sanitization for text-based default attributes 2015-07-22 21:40:06 -03:00
Claudio Sanches aa263ddc1e [API] Updated variable product attributes update for the new standard of WC 2.4 2015-07-22 21:07:05 -03:00
Claudio Sanches aec1e28549 [API] Check if REDIRECT_URL exists, closes #8632 2015-07-21 20:08:19 -03:00
Claudio Sanches 3a0d2f7c89 [API] Fixed edit coupon description, closes #8614 2015-07-20 12:49:21 -03:00
Claudio Sanches 9e41552342 Removed all "@return void" 2015-07-16 16:55:48 -03:00
Claudio Sanches 83bdf82767 Fixed docblock for WC_API_Orders::get_variation_id() 2015-07-16 16:14:39 -03:00
Claudio Sanches e0be5a2e9f Added truncated consumer key and last access fields in woocommerce_api_keys table 2015-07-16 15:42:00 -03:00
Claudio Sanches a01660cbba Fixed WC_API_Products::clear_product() 2015-07-10 10:49:18 -03:00
Mike Jolley d5a74203c2 Only need one numeric check 2015-07-10 10:48:29 +01:00
nils-fredrik@maksimer.no 3c2b54b360 Fix for #8550 2015-07-10 09:32:10 +02:00
Claudio Sanches 349fc2f665 [API] post__in filter for v2 2015-06-23 11:51:40 -03:00
Claudio Sanches e003b7803f Merge pull request #8440 from kilbot/patch-4
Add post__not_in filter for REST API requests
2015-06-23 11:50:36 -03:00
Claudio Sanches 9dc28be577 Support HTTP_X_HTTP_METHOD_OVERRIDE in API old versions 2015-06-23 11:49:19 -03:00
Paul Kilmurray 9b848fb1bd Add post__not_in filter for REST API requests
To match the `post__in` filter above
2015-06-23 20:48:19 +08:00
Paul Kilmurray a030ab52cb Allow HTTP method to be overwritten by HTTP_X_HTTP_METHOD_OVERRIDE
For the same reasons [outlined here](https://github.com/WP-API/WP-API/issues/964), ie: Backbone uses X-HTTP-Method-Override.
2015-06-23 20:42:39 +08:00
Mike Jolley 817e5355fd Pass $item object, not item meta array
Closes #8419
2015-06-23 10:24:13 +01:00
Claudio Sanches b43abff674 Merge pull request #8415 from justinshreve/oauth-7928
Fix issues with our OAuth implementation, including nonconformance to spec. Closes #7928
2015-06-22 15:00:51 -03:00
Justin Shreve 819a4fae0d wp_endswith doesn't actually exist (its a wpcom/jetpackism) - update with a simple substr check 2015-06-22 17:58:50 +00:00
Justin Shreve fcab013d53 $enc_type for http_build_query() is only available in PHP 5.4+
go back to a normalization approach
2015-06-19 23:03:45 +00:00
Justin Shreve 482303c0f9 Don't convert nested parameters to strings.
Switch to the native http_build_query instead of our own normalize function.
2015-06-19 16:11:17 +00:00
Justin Shreve 59bc17e0cb Check before building the current URL to see if a trailing slash should be appended or not, that way if a request includes one, the signature still matches. 2015-06-19 16:05:23 +00:00
Justin Shreve c43f9157c3 When generating the signature to compare, append a trailing &.
The OAuth spec (http://tools.ietf.org/html/rfc5849#section-3.4.2) states that a & character must be present, even if a token secret is not a part of the request.
2015-06-19 15:05:51 +00:00
Justin Shreve 9e2f0f55d8 Remove reauth endpoint. It's not going to work the way we want it to. If clients need to log out (like a browser), they can clear the sessions per browser. Also returns JSON error when auth is not returned correctly. 2015-06-19 13:42:10 +00:00
Justin Shreve 8da19e4dae Provide some directions in the Basic auth input box so the user knows where to provide the API key and secret. 2015-06-19 13:42:10 +00:00
Justin Shreve d63f7d014f Implement basic auth improvements and query string fall back.
If the key and secret query strings are provided, do auth based on those. If not, and the Basic auth headers are set, do full basic auth (including sending the correct headers).
Also implements a /reauth endpoint for basic auth.
2015-06-19 13:42:10 +00:00
Justin Shreve c9a2611d33 Version off the current api files into a v2 folder. 2015-06-19 13:42:10 +00:00