Mike Jolley
3e6bee0712
Move children to meta and update test
2016-11-09 15:39:18 +00:00
Mike Jolley
5fc0142ba0
Tests
2016-11-09 15:39:18 +00:00
Justin Shreve
19949d369d
External Product CRUD
2016-11-09 15:38:44 +00:00
Justin Shreve
432d736520
Clean up the abstract product class a bit, deprecate two functions we have renamed, make update & create work properly, and add some tests for it.
2016-11-09 15:38:44 +00:00
Justin Shreve
b41626c555
Implement Coupon Data Store ( #12280 )
...
* Implement a Coupon Data Store using CPTs..
* Handle PR feedback.
2016-11-09 12:21:18 +00:00
Claudio Sanches
8858e74c56
Fixed coding standards and tests
2016-11-08 18:27:21 -02:00
Justin Shreve
1797c76a14
Implement WC_Data_Store and related code & tests.
2016-11-08 01:39:47 -08:00
Mike Jolley
cfbb8d6601
Use meta as a cache for order/spent methods.
...
Closes #12080
2016-10-14 15:11:10 +01:00
Bryce Adams
ea1f9aea65
Remove last order from customers part of the API ( #12081 )
...
Proposed solution to close #12080
* Also removes from tests.
2016-10-14 14:38:35 +01:00
Mike Jolley
a6f4332f89
Remove non-existant field from unit test
2016-10-14 12:22:25 +01:00
Claudio Sanches
8339e9ca25
Introduces wc_get_min_max_price_meta_query() function
2016-10-14 11:19:20 +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
36797a382a
Fixed coding standards for tests
2016-10-04 18:57:01 -03: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
Matty
ae75f8b8cd
Adjusts all references of 'woothemes' to 'woocommerce' in relevant URLs, excluding the Travis CI integration which correctly uses 'woocommerce/woocommerce'.
2016-09-28 12:17:40 +02:00
Claudio Sanches
34784e5dca
Fixed unit tests for wc_get_account_downloads_columns()
...
cc @mikejolley
2016-09-15 19:56:23 -03:00
Mike Jolley
59dcb30928
comments
2016-09-12 21:51:32 +01:00
Mike Jolley
71d99f3434
Fix comment
2016-09-12 17:33:36 +01:00
Mike Jolley
f9b2ed88c2
Merge branch 'pr/11883'
...
# Conflicts:
# includes/class-wc-shortcodes.php
2016-09-12 14:53:04 +01:00
Claudio Sanches
7a4e0da1c1
Update tests for wc_format_postcode()
2016-09-09 15:05:44 -03:00
Aristeides Stathopoulos
230c0398b3
fix failing test from master
2016-09-09 19:39:09 +03:00
Justin Shreve
6fafbe855c
Fix register-wp-admin-settings.php tests based on recent changes to handle email registration
2016-09-08 15:38:58 -07: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
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
fd952e8efa
Payment Gateways API
2016-09-05 14:49:29 -07:00
Aristeides Stathopoulos
5280722f21
Squiz.Commenting.InlineComment.SpacingAfter
2016-09-02 05:47:24 +03:00
Aristeides Stathopoulos
15bec47475
Squiz.Commenting.InlineComment.NoSpaceBefore
2016-09-02 05:42:33 +03:00
Aristeides Stathopoulos
39d4d4bd69
Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar
2016-09-02 05:40:36 +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
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
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
Claudio Sanches
06280a7003
HTTPS for google maps
2016-08-31 14:18:55 -03: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
499e190efb
Merge pull request #11785 from woothemes/coupon-exceptions
...
Coupon Exceptions and REST/CRUD improvements
2016-08-30 11:44:19 +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
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
7c589cf7e1
WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis
2016-08-27 07:53:52 +03:00
Aristeides Stathopoulos
82f3cc221e
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
2016-08-27 07:23:02 +03:00
Aristeides Stathopoulos
d430dabb37
Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines
2016-08-27 07:04:18 +03:00
Aristeides Stathopoulos
741f2b954a
Squiz.WhiteSpace.SuperfluousWhitespace.EndLine
2016-08-27 07:01:22 +03:00
Aristeides Stathopoulos
55075ce3a4
WordPress.Arrays.ArrayDeclaration.IndexNoNewline
2016-08-27 06:35:20 +03:00
Aristeides Stathopoulos
17961f6484
WordPress.Arrays.ArrayDeclaration.ValueNoNewline
2016-08-27 06:04:10 +03:00
Aristeides Stathopoulos
72ee94d11b
WordPress.Arrays.ArrayDeclaration.SpaceBeforeComma
2016-08-27 05:46:40 +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
ed01282340
Made data match schema
2016-08-26 15:20:44 +01:00
Mike Jolley
f5cc89eec2
Merge pull request #11762 from woothemes/WC_Data_Exception
...
WC Data Exceptions
2016-08-26 10:57:41 +01:00
Mike Jolley
b4d6deba83
Remove var dump
2016-08-26 10:21:50 +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
6a2f87ca34
multisite sets username lowercase
2016-08-25 17:43:25 +01:00
Mike Jolley
627b08ba37
Test coverage
2016-08-25 17:42:47 +01:00
Mike Jolley
887ba3b55f
Run api tests as admin
2016-08-25 14:58:14 +01:00
Mike Jolley
077f57f139
Merge branch 'master' into WC_Data_Exception
2016-08-25 11:03:14 +01:00
Mike Jolley
90137f128b
Update unit test
2016-08-25 10:58:11 +01:00
Claudio Sanches
d4d1a95f21
Merge pull request #11765 from woothemes/system-status-tools-options
...
Remove checkbox options in system status tools
2016-08-24 14:19:19 -03:00
Claudio Sanches
2b7e725928
Tests for wc_get_coupon_code_by_id()
2016-08-24 14:17:58 -03:00
Mike Jolley
49283e5576
uninstall_data replaced with constant.
2016-08-24 17:34:13 +01:00
Mike Jolley
d9798f7226
Set reading to prevent exceptions during DB load
2016-08-24 14:37:19 +01:00
Claudio Sanches
5e069a4f4e
Merge pull request #11756 from woothemes/update/coupon-api-crud
...
Update Coupon API to use CRUD
2016-08-23 19:51:27 -03:00
Mike Jolley
b727acd96e
Implement get and set prop methods
2016-08-23 18:48:48 +01:00
Mike Jolley
42ce6443e8
Remove backslash
2016-08-23 11:15:41 +01:00
Justin Shreve
7da590e422
Coupon Tests:
...
* Move tests for legacy endpoints to a legacy test folder.
* Create a test class to test the WC-API coupons endpoint.
2016-08-22 13:50:32 -07:00
Claudio Sanches
38e1be71eb
ID first for all elements in the REST API
...
cc @mikejolley
2016-08-22 16:58:34 -03:00
Mike Jolley
39f4a1cdca
Swaps meta_id for id across crud and api
2016-08-22 19:37:34 +01:00
Mike Jolley
a8e47992a6
Put back add_product for convenience. Fix unit tests.
2016-08-22 18:00:52 +01:00
Mike Jolley
c88984eb0e
Replace add methods
2016-08-22 16:48:19 +01:00
Mike Jolley
fdd7e797ba
API get refunds
2016-08-22 13:15:15 +01:00
Claudio Sanches
a8c0216225
[TESTS] Fixed customer tests
2016-08-20 14:30:04 -03:00
Claudio Sanches
80ee7016f8
Fixed conflicts
2016-08-19 20:31:59 -03:00
Claudio Sanches
d60d3d5b1e
Merge branch 'order-crud-api'
2016-08-19 02:07:10 -03:00
Claudio Sanches
33f155b971
Fixed indentation
2016-08-19 01:53:50 -03:00
Claudio Sanches
5da47e532f
Fixed unit tests and standards
2016-08-19 01:51:25 -03:00
Mike Jolley
03110e755f
Unit tests
2016-08-18 17:24:44 +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
e99798f16e
Date modified is read only and set by WP after update
2016-08-16 11:57:25 +01:00
Mike Jolley
62b3939aa7
Add test to ensure user was deleted
2016-08-16 10:56:52 +01:00
Mike Jolley
c55170698e
More namespaces removed
2016-08-16 10:50:24 +01:00
Mike Jolley
fe9962bbb6
PHP 5.2 does not support namespace
...
cc @justinshreve
2016-08-16 10:14:36 +01:00
Mike Jolley
de7e522835
Remove customer order queries for performance reasons and offer get_last_order() method instead.
...
Same for order counts - these don’t need to be populated after read,
only when needed. cc @justinshreve
2016-08-16 10:04:52 +01:00
Mike Jolley
83dca89d0c
Correct customer escaping and tests
2016-08-15 16:53:48 +01:00
Mike Jolley
fc386f054b
Delete order after running test
2016-08-15 11:15:03 +01:00
Mike Jolley
f03d439259
Unit test fixes
2016-08-15 11:02:55 +01:00
Mike Jolley
eec9ce5b41
Revert addition of _delete_extra_meta_data
...
This essentially removes the ability to delete meta which is not great.
@justinshreve you added this in
https://github.com/woothemes/woocommerce/commit/e3b1f6dbc9558bae606fa76e
6941175582a301b7 - can you tell me what problems it was causing you so
we can add a different fix if needed?
2016-08-12 16:41:06 +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
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
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
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
4ac4bcaa08
Merge branch 'master' into WC-CRUD
...
# Conflicts:
# tests/unit-tests/cart/cart.php
2016-08-09 11:08:21 +01:00
Mike Jolley
cfe28c9b25
Made WC_Logger pluggable via wc_get_logger function.
...
Closes #11474
2016-08-08 13:59:23 +01:00
Mike Jolley
1c592b3872
Merge pull request #11208 from woothemes/orders-crud-classes
...
Orders crud classes
2016-08-05 15:44:15 +01:00
Mike Jolley
152134ed5e
Add unit test for #11626
2016-08-05 12:11:35 +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
59a68e11e3
Remove test for number of meta, since we don't delete extra meta bits anymore. The test for content is enough.
2016-08-04 13:17:53 -07:00
Justin Shreve
f4353f6aa9
Don't save to the database if we are working with sessions, save to the session when save() is called instead.
2016-08-04 11:39:34 -07: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
8867368b97
Fix unit tests
2016-08-04 17:24:23 +01: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
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
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
9a03eb4407
Use the new API test base for shipping zone tests.
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
105064ad26
Test coverage for getting a single shipping zone method.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e007bc1778
Test coverage for all shipping zone methods endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
cdc90f5633
Test coverage for shipping zone method routes.
2016-08-02 10:10:47 -07:00
Jeff Stieler
b9a0367cfa
Test coverage for update shipping zone locations endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e5fac4911e
Test coverage for requesting shipping zone locations with an invalid ID.
2016-08-02 10:10:47 -07:00
Jeff Stieler
0db15c5328
Add test coverage for shipping zone locations retrieval endpoint.
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
9b564b87b1
Add test coverage to single shipping zone retrieval endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
6a9ba5b9f3
Add test coverage for shipping zone update endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e037cf661e
Add test coverage to shipping zone creation endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
3492f397d4
Add test coverage for shipping zone schema endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e4ccede35f
Test coverage for /shipping/zones.
...
Covers success, shipping disabled, and insufficient permissions cases.
2016-08-02 10:10:47 -07:00
Jeff Stieler
bbe5ffc295
Add helper method to create shipping zones during testing.
2016-08-02 10:10:47 -07:00
Jeff Stieler
2a7e81a809
Initial Shipping Zones unit test coverage, testing route registration.
2016-08-02 10:10:47 -07:00
Justin Shreve
72f01d9c0a
Merge pull request #11548 from woothemes/system-status-api
...
Add system status info REST API endpoint
2016-08-02 10:08:45 -07:00
Fredrik Forsmo
9d07cf59b1
Use long array syntax instead of short array syntax
2016-08-01 18:08:42 +02:00
Fredrik Forsmo
88d8140110
Add tests for `wc_site_is_https`
...
Add callback url to `wc_site_is_https` test
2016-08-01 14:31:54 +02:00
Mike Jolley
e735903c04
Unit tests for wc_add_to_cart_message
...
For #11563
2016-08-01 11:42:19 +01: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
817ed71d2a
Test file rename
2016-07-27 10:29:45 -07:00
Justin Shreve
8c682d7510
Test base
2016-07-27 10:29:45 -07:00
Justin Shreve
9adce86239
Use the new REST unit test base class
2016-07-26 14:19:50 -07:00
Justin Shreve
55b37b3338
Rename helper class from 'legacy' to be more descriptive of whats happening. Registering wp-admin settings to the REST API.
2016-07-26 11:27:48 -07:00
Justin Shreve
838c27438e
Merge branch 'settings-api' of https://github.com/woothemes/woocommerce into settings-api
2016-07-26 11:11:09 -07:00
Justin Shreve
02915e6056
Rename helper class from 'legacy' to be more descriptive of whats happening. Registering wp-admin settings to the REST API.
2016-07-26 11:08:29 -07:00
Justin Shreve
226fdb870b
Misc cleanup of descriptions and some error strings.
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
a0f227a17c
Add test coverage for all WP_Error-returning cases in the Settings API.
2016-07-26 10:24:15 -07:00
Jeff Stieler
91a86efed9
Add test coverage for register_legacy_settings().
2016-07-26 10:24:15 -07:00
Jeff Stieler
b4eaa12f7a
Break “legacy” setting to “new” conversion into it’s own method.
2016-07-26 10:24:15 -07:00
Jeff Stieler
51cae9c441
Add test for register_legacy_group() and coverage annotations.
2016-07-26 10:24:15 -07:00
Jeff Stieler
09f7723457
Add initial test file for WC_Register_Legacy_Settings, with test for constructor.
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
83d252b6d3
Remove namespace from Settings API unit test file.
...
This fails builds on PHP 5.2.x.
2016-07-26 10:24:15 -07:00
Jeff Stieler
95990e32ca
Fix unit tests.
2016-07-26 10:24:15 -07:00
Justin Shreve
3de423b5c2
Wrap up settings api
2016-07-26 10:24:15 -07:00
Justin Shreve
5de870bb08
Wrap up settings endpoints for updating, finish tests.
2016-07-26 10:24:15 -07:00
Justin Shreve
46028e0151
Refactor down to two concepts - settings groups and settings. Fix up tests, and start working on returning actual settings and their values.
2016-07-26 10:24:15 -07:00
Justin Shreve
8fee6bd3b9
Add a test for settings groups, make sure any bad keys/values are filtered out, update docs.
2016-07-26 10:24:15 -07:00
Justin Shreve
12aa11d5be
Misc cleanup.
2016-07-26 10:24:15 -07:00
Justin Shreve
19d3bc4737
Add a permissions check to the locations endpoints and fill out the tests for them.
2016-07-26 10:24:15 -07:00
Justin Shreve
21b66f94ff
More setting location tests.
2016-07-26 10:24:15 -07:00
Justin Shreve
5ee4b5d4dd
Add the ability to get data on a single location.
2016-07-26 10:24:15 -07:00
Justin Shreve
11a3c89a2f
Make /settings/locations work properly. Add skeleton for tests and add register_routes test.
2016-07-26 10:24:15 -07:00
Justin Shreve
a9bb988873
Initial /settings API controller and /settings/locations route. Loads the WP-API and registers our namespace temporarily until WP-API is loaded by WC core.
2016-07-26 10:24:15 -07:00
Manos Psychogyiopoulos
17c6108832
ensure WC_ROUNDING_PRECISION is defined and use it as a low precision boundary in wc_get_rounding_precision()
2016-07-21 12:14:12 +03:00
Justin Shreve
57fd38c1a8
Misc cleanup of descriptions and some error strings.
2016-07-19 11:24:05 -07:00
Jeff Stieler
6f36179fe6
Rename WC_Rest_Settings_Groups_Controller to WC_Rest_Settings_Controller.
2016-07-19 10:41:22 -07:00
Jeff Stieler
f56a79c74b
Rename WC_Rest_Settings_Controller to WC_Rest_Settings_Options_Controller.
2016-07-19 10:41:22 -07:00
Jeff Stieler
cf65ff53c5
Add test coverage for all WP_Error-returning cases in the Settings API.
2016-07-19 10:41:22 -07:00
Jeff Stieler
ca15237332
Add test coverage for register_legacy_settings().
2016-07-19 10:41:22 -07:00
Jeff Stieler
1fc539992c
Break “legacy” setting to “new” conversion into it’s own method.
2016-07-19 10:41:22 -07:00
Jeff Stieler
6c53cfa167
Add test for register_legacy_group() and coverage annotations.
2016-07-19 10:41:22 -07:00
Jeff Stieler
3747505d83
Add initial test file for WC_Register_Legacy_Settings, with test for constructor.
2016-07-19 10:41:22 -07:00
Jeff Stieler
1cde743121
Reuse WC Admin Setting’s save_fields() instead of duplicating code for sanitizing saved values.
2016-07-19 10:41:22 -07:00
Jeff Stieler
a53040f186
Remove namespace from Settings API unit test file.
...
This fails builds on PHP 5.2.x.
2016-07-19 10:41:22 -07:00
Jeff Stieler
fde3318b41
Fix unit tests.
2016-07-19 10:41:22 -07:00
Justin Shreve
6bb546e11c
Wrap up settings api
2016-07-19 10:41:22 -07:00
Justin Shreve
05a2644066
Wrap up settings endpoints for updating, finish tests.
2016-07-19 10:41:22 -07:00
Justin Shreve
fa5425109e
Refactor down to two concepts - settings groups and settings. Fix up tests, and start working on returning actual settings and their values.
2016-07-19 10:41:22 -07:00
Justin Shreve
f425a3735a
Add a test for settings groups, make sure any bad keys/values are filtered out, update docs.
2016-07-19 10:41:22 -07:00
Justin Shreve
06e787a26d
Misc cleanup.
2016-07-19 10:41:22 -07:00
Justin Shreve
6c2be482ca
Add a permissions check to the locations endpoints and fill out the tests for them.
2016-07-19 10:41:22 -07:00
Justin Shreve
eb4291f699
More setting location tests.
2016-07-19 10:41:22 -07:00
Justin Shreve
9369d55ff4
Add the ability to get data on a single location.
2016-07-19 10:41:22 -07:00
Justin Shreve
c6b0debe26
Make /settings/locations work properly. Add skeleton for tests and add register_routes test.
2016-07-19 10:41:22 -07:00
Justin Shreve
fc076eb57e
Initial /settings API controller and /settings/locations route. Loads the WP-API and registers our namespace temporarily until WP-API is loaded by WC core.
2016-07-19 10:41:22 -07:00
Claudio Sanches
7778583340
Fixed wrong number of decimal precision, closes #11368
2016-07-11 17:26:54 +02:00
Claudio Sanches
7d9d091767
Fixed mixed tabs and spaces
2016-07-11 16:56:35 +02:00
Claudio Sanches
c59a5c0c31
Say hello to woocommerce.com
2016-07-05 19:52:16 -03:00
Claudio Sanches
08f95481e0
Normalize the "Read more" button text, closes #11319
2016-06-30 15:16:26 -03:00
Claudio Sanches
18b1b8c238
Disable empty my account endpoints, closes #11274
2016-06-30 13:58:10 -03:00
Mike Jolley
a942cfade8
Make sure page ID is > 0
...
Closes #11305
2016-06-30 12:23:41 +01:00
Mike Jolley
a22859ae32
Abstract unit tests
2016-06-23 15:52:12 +01:00
Mike Jolley
13d293dd25
abstract total unit tests
2016-06-22 17:02:22 +01:00
Mike Jolley
46439ddba5
Refund unit tests
2016-06-22 16:31:05 +01:00
Mike Jolley
9da9d3bf69
Unit test conditional functions
2016-06-22 15:38:28 +01:00
Mike Jolley
9fc3e24647
getter unit tests
2016-06-22 14:28:00 +01:00
Mike Jolley
8287b13cf1
Address and CRUD unit tests
2016-06-22 14:07:42 +01:00
Mike Jolley
9c7abaedcb
Fixed unit tests
2016-06-22 12:29:23 +01:00