Commit Graph

1134 Commits

Author SHA1 Message Date
Claudio Sanches ec79238f30 Added min_price and max_price product filter 2016-10-14 11:19:20 +01:00
Claudio Sanches 2400a72b93 Filter products in stock or out of stock 2016-10-14 11:15:11 +01:00
Claudio Sanches e57ae3da27 Filter products by tax class 2016-10-14 11:15:11 +01:00
Claudio Sanches 842c39b525 Make easy to add query_meta 2016-10-14 11:15:11 +01:00
Claudio Sanches 92404fc867 Allow filter products by featured post meta 2016-10-14 11:15:11 +01:00
Claudio Sanches 4aa1689015 Better description for product taxonomy filters 2016-10-14 11:15:11 +01:00
Manos Psychogyiopoulos 4658245625 Revise the stock + stock status saving logic (#11858)
* use set_stock to reset stock meta when not managing stock

Ensures that the 'woocommerce_{ variation | product }_set_stock' hooks fire to refllect the fact that stock becomes infinite.

* track state of Manage Stock? option

* quick/bulk edit fixes

* reapply quick and bulk edit fixes

* improve conditional reset logic that prevents actions from *_set_stock actions from firing with every save
2016-10-12 12:51:40 +01: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
Claudio Sanches 77722ecbe3 Fixed missing text domains (#12066) 2016-10-12 11:05:37 +01:00
Rami Yushuvaev 65cf1bcb6f Merge branch 'master' of https://github.com/ramiy/woocommerce into i18n/similar-strings 2016-10-11 21:14:56 +03:00
Daniel Hüsken 9b12df381e Rest-API fix action not called if no core attribute param updated 2016-10-11 13:40:54 +02:00
Rami Yushuvaev 83e938af1e i18n: Merge similar translation strings to reduce the total strings count #11905 2016-10-11 04:39:13 +03:00
Claudio Sanches 0d756deb1c [REST API] Allow filter order note by type 2016-10-05 12:27:06 -03:00
Claudio Sanches 226482baf5 Fixed coding standards 2016-10-04 14:36:18 -03:00
Claudio Sanches c62c5b835e Updated values to check if line item is null 2016-10-04 13:39:37 -03:00
rspublishing 180ac717a8 Coding standards 2016-09-30 16:23:17 +02:00
rspublishing 424948f4de Coding standards 2016-09-30 16:15:56 +02:00
rspublishing 5814dc3a97 Adds a system status tool for clearing orphaned variations 2016-09-30 10:39:37 +02:00
Justin Shreve ca10cca69b Merge pull request #11990 from woocommerce/variations-rest-api
Implement Variation Endpoints & Tests
2016-09-29 15:48:36 -07:00
Justin Shreve c1d7111240 Implement separate variation endpoints for managing a product's variations. Also adds tests. 2016-09-29 14:44:14 -07:00
Claudio Sanches 1230be795e Fixed REST API docs, codeclimate and coveralls URLs 2016-09-28 09:09:06 -03:00
Matty d037c4a3f2 Ensures any checks for 'woothemes.com' in logic also check for 'woocommerce.com'. 2016-09-28 12:19:58 +02:00
Claudio Sanches 9817caccdd Removed multiple lines #11915 2016-09-14 11:27:11 -03:00
Taylor Lovett 01a92a3bcb Add filter to continue uploading images if one fails (api) 2016-09-13 21:03:05 -04:00
Claudio Sanches 16eb18a0ab [REST API] Include variation description, closes #11815 2016-09-13 19:28:25 -03:00
Mike Jolley e0489e4706 [2.6][api] Skip empty attribute. 2016-09-12 15:13:32 +01:00
Mike Jolley 1037f9b8c4 Merge pull request #11895 from tlovett1/api-silent-images-fail
(API) Add filter to continue uploading images if one fails
2016-09-12 14:53:58 +01:00
Mike Jolley f9b2ed88c2 Merge branch 'pr/11883'
# Conflicts:
#	includes/class-wc-shortcodes.php
2016-09-12 14:53:04 +01:00
Mike Jolley 978fa976f7 [2.6][api] Convert posted names to the API to slugs before save.
Fixes #11871

@claudiosmweb can you review the API changes made today - there are a
few like this - for inclusion in 2.6 asap. Let me know on slack.
2016-09-12 14:37:44 +01:00
Mike Jolley 8d19028754 Merge branch 'pr/11876' 2016-09-12 14:23:10 +01:00
Taylor Lovett 6eae03c6df Make sure to continue to next image on error 2016-09-09 23:49:45 -04:00
Taylor Lovett 3c164427ca Add filter to continue uploading images if one fails (api) 2016-09-09 22:41:41 -04:00
Aristeides Stathopoulos 230c0398b3 fix failing test from master 2016-09-09 19:39:09 +03:00
Aristeides Stathopoulos 831b4463d0 Merge pull request #5 from woothemes/master
sync
2016-09-09 16:49:48 +03:00
Justin Shreve c8ddca0635 Merge pull request #11882 from woothemes/settings-and-api-fixes
Settings & API Fixes
2016-09-09 05:52:23 -07: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 7a509f53d4 Merge pull request #4 from woothemes/master
sync
2016-09-09 03:17:28 +03:00
Aristeides Stathopoulos 9668247b95 WordPress.PHP.YodaConditions.NotYoda 2016-09-09 03:14:28 +03:00
Justin Shreve a36b25a68f Add setting validation to the REST API 2016-09-08 15:20:15 -07:00
Justin Shreve b665f5e1c6 Setting IDs do not need to be unique across the entire system.. just the group. 2016-09-08 15:20:15 -07:00
Justin Shreve 49676d1781 Hook up email settings to the API
Add support for option_key when registering settings, so we can also manage settings that are stored in the array of a single option.
2016-09-08 15:20:15 -07:00
Justin Shreve 9889222bd1 Swap "doesn't" with "does not" in 404 error messages. 2016-09-08 15:17:02 -07:00
Daniel Hüsken 47561278b8 API: Attribute slug will not be sanitize correctly #11874 2016-09-08 15:06:19 +02:00
Daniel Hüsken 367e16ffa9 API Variation returns sanitize attribute names #11868 2016-09-08 14:13:39 +02:00
Mike Jolley 238483ff2b No need to strip pa_ here
Closes #11868
2016-09-08 12:04:51 +01:00
Mike Jolley 9cca27f21e Take out admin check
@justinshreve I’m not sure why we had the admin check there, but I’ve
removed it because the setting of WP_ADMIN was breaking unrelated unit
tests. I think we should leave constants alone if possible and just
modify gateways.
2016-09-07 12:37:39 +01:00
Mike Jolley 311c540662 Merge pull request #11833 from aristath/master
Coding Standards (2nd pass)
2016-09-07 10:14:17 +01:00
Justin Shreve 5113a8d19f Fix unusued variable in Payment Gateway's prepare_item_for_response and fix the phpdoc for get_gateway 2016-09-06 13:34:25 -07:00
Justin Shreve 3dc0c5242a Update method_title and method_description to use their get_ methods, also update the resource does not exist message, based on feedback. 2016-09-06 10:32:54 -07:00
Justin Shreve fd952e8efa Payment Gateways API 2016-09-05 14:49:29 -07:00
Aristeides Stathopoulos 2346c3b735 Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace 2016-09-02 06:15:49 +03:00
Aristeides Stathopoulos 5280722f21 Squiz.Commenting.InlineComment.SpacingAfter 2016-09-02 05:47:24 +03:00
Aristeides Stathopoulos cc0b29ccf4 PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket 2016-09-02 05:00:46 +03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Aristeides Stathopoulos 0516e96843 PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket 2016-09-02 04:33:57 +03:00
Aristeides Stathopoulos 8fe4cd65a4 PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket 2016-09-02 04:12:22 +03:00
Aristeides Stathopoulos d922d045a7 Squiz.Commenting.BlockComment.NoNewLine + indentation on class-wc-cart 2016-09-02 04:03:52 +03:00
Aristeides Stathopoulos e07511502d Additional coding-standards fixes. 2016-09-02 03:26:24 +03:00
Aristeides Stathopoulos fde1037757 fix failing tests. 2016-09-01 23:50:14 +03:00
Mike Jolley 1b2df3dd3b Merge branch 'pr/11797'
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:46:05 +01:00
Mike Jolley 402d0ff077 Merge branch 'master' into pr/11797
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:43:31 +01:00
Mike Jolley 4e14c4abeb Merge pull request #11821 from woothemes/customer-exceptions
Customer CRUD/API exceptions
2016-09-01 10:58:35 +01:00
Claudio Sanches f6d20eb324 [REST API] Fixed products query by SKU 2016-08-31 19:36:55 -03:00
Claudio Sanches 6def1188ab Force post_type in products controller 2016-08-31 19:22:27 -03:00
Justin Shreve 43e55c3336 Instead of catching just the post_status, don't overwrite any filter args. 2016-08-31 15:15:28 -07:00
Justin Shreve 6cb9e1b613 Since we support WP_Query filtering via the API, make sure post_status filtering works too. 2016-08-31 14:39:37 -07:00
Mike Jolley d9a0d0988b Handle meta data and fix unit tests 2016-08-31 15:43:34 +01:00
Mike Jolley 047242515d Make API and CRUD use consistent keys and make use of data 2016-08-30 17:50:35 +01:00
Mike Jolley b82415dfa3 Handle exceptions in API 2016-08-30 15:57:45 +01:00
Mike Jolley 499e190efb Merge pull request #11785 from woothemes/coupon-exceptions
Coupon Exceptions and REST/CRUD improvements
2016-08-30 11:44:19 +01:00
Mike Jolley df35845d4d wc_get_coupon_id_by_code 2016-08-30 11:43:53 +01:00
Justin Shreve de4296dd15 Add some missing API pieces:
* Value was missing from the settings schema (but was still present in the response).
* Added delete endpoint for shipping zones.
* Corrected permissions check/error for shipping zone methods.
2016-08-29 10:22:29 -07:00
Aristeides Stathopoulos 72696901f3 WordPress.WhiteSpace.OperatorSpacing.SpacingAfter 2016-08-27 09:14:06 +03:00
Aristeides Stathopoulos e69fafbda7 WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter 2016-08-27 09:06:22 +03:00
Aristeides Stathopoulos f2730eea02 WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd 2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos dea39df779 WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis 2016-08-27 07:38:29 +03:00
Aristeides Stathopoulos 9543c7fe1c WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis 2016-08-27 07:29:49 +03:00
Aristeides Stathopoulos 82f3cc221e WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis 2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos 56fd004a72 WordPress.Arrays.ArrayDeclaration.FirstIndexNoNewline 2016-08-27 06:56:09 +03:00
Aristeides Stathopoulos 6c30f84fa2 WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys 2016-08-27 06:23:21 +03:00
Aristeides Stathopoulos ff852038c9 WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys 2016-08-27 06:11:30 +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 ec8a0b288b PHPCS: WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast 2016-08-27 05:08:49 +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 8eef062079 Merge pull request #11781 from woothemes/shipping-method-api
Shipping Methods API
2016-08-26 16:51:55 +01:00
Mike Jolley b0672a000a Fixed unit tests 2016-08-26 16:44:00 +01:00
Mike Jolley 7d8bacc2b3 Missing $wpdb 2016-08-26 16:15:18 +01:00
Mike Jolley f034e1f69d Exception handling and REST optimisation 2016-08-26 15:42:42 +01:00
Mike Jolley 3ff41ceea4 No need to add meta since CRUD handles this 2016-08-26 15:26:05 +01:00
Mike Jolley 5c40236d79 Fixes notices 2016-08-26 15:24:01 +01:00
Mike Jolley ed01282340 Made data match schema 2016-08-26 15:20:44 +01:00
Justin Shreve 849a208e54 Fix issues based on feedback. Make sure to use WC_Shipping_Zone's methods when avaiable, fix up some coding standards, and add a new delete_shipping_method to WC_Shipping_Zone 2016-08-26 04:57:30 -07:00
Mike Jolley 6b6c856cc7 Filter the template path
Closes #11774
2016-08-26 11:03:08 +01:00
Justin Shreve 147c18c197 Add the ability to update/create/delete shipping method instances 2016-08-25 20:34:26 -07:00
Justin Shreve 3ceb189118 Add GET /shipping_methods and GET /shipping_methods/METHOD_ID
Also adds tests.
2016-08-25 11:48:17 -07:00
Mike Jolley 077f57f139 Merge branch 'master' into WC_Data_Exception 2016-08-25 11:03:14 +01:00
Claudio Sanches 16e386c873 Merge pull request #11757 from woothemes/get-coupon-code-by-id
Get coupon code by
2016-08-24 14:18:23 -03:00
Mike Jolley cde78abed3 Working on catching errors 2016-08-24 15:26:35 +01:00
Mike Jolley d9798f7226 Set reading to prevent exceptions during DB load 2016-08-24 14:37:19 +01:00