Commit Graph

32145 Commits

Author SHA1 Message Date
Claudio Sanches eac2d39edf Better naming for REST API endpoints 2019-07-15 13:19:03 -03:00
Claudio Sanches 3fd0eb7391 Merge branch 'add/wccom-site-rest-api' of github.com:woocommerce/woocommerce into add/wccom-site-rest-api 2019-07-15 13:13:53 -03:00
Claudio Sanches 396bbe4cf5 Fixed doc blocks and coding standards 2019-07-15 13:13:16 -03:00
Akeda Bagus 3f9bbf5a3b
Replace __DIR__ with WC_ABSPATH. 2019-07-15 23:07:34 +07:00
Claudio Sanches d339a29468 Fixed standards 2019-07-15 12:58:41 -03:00
Claudio Sanches 73f27d030b Use trailingslashit 2019-07-15 12:57:16 -03:00
Akeda Bagus c8812a205b
Add helper method get_authorization_header.
This to support scenario in which HTTP_AUTHORIZATION being stripped
and use getallheaders as a fallback. This helper method is copied from
class-wc-rest-authentication.php.
2019-07-15 22:47:07 +07:00
Akeda Bagus 47db7588d7
Use hash_equals when checking access_token. 2019-07-15 22:03:31 +07:00
Akeda Bagus 0ffd4db630
Move authentication to WCCOM Site API to wccom-site main class. 2019-07-15 21:59:48 +07:00
Akeda Bagus 20325f2db6
Remove duplicate state download_link in favor of download_url. 2019-07-15 21:41:53 +07:00
Akeda Bagus 0891e0c85f
Remove extra docblock line. 2019-07-15 18:45:50 +07:00
Akeda Bagus 45bf842ea3
Add @ since tag. 2019-07-15 18:44:51 +07:00
Akeda Bagus 284239ee44
Replace SERVER['REQUEST_URI'] in favor of add_query_arg. 2019-07-15 18:28:33 +07:00
Akeda Bagus f51265e58d
Add @since tag. 2019-07-15 15:42:36 +07:00
Akeda Bagus 59a5c6d754
Disable few phpcs rules instead of all. 2019-07-15 15:17:40 +07:00
Akeda Bagus fc7cacb711
Fix coding standard issues. 2019-07-11 19:58:16 +07:00
Akeda Bagus e1743bfadb
Remove extra new line. 2019-07-11 18:22:39 +07:00
Akeda Bagus 40201eb9c3
Register wccom-site rest in main class.
With API moved to its own package (see #23957), controllers for wccom-
site namespace are now registered in wccom-site main class.
2019-07-11 18:19:08 +07:00
Akeda Bagus 5756766a03
Reset current_step state when installing. 2019-07-11 16:01:53 +07:00
Akeda Bagus 7d07e70958
Adjust products parameter so it can pass installation args. 2019-07-11 16:01:53 +07:00
Akeda Bagus d51e843190
Move WCCOM Site related files to `/wccom-site` directory.
Also use queue when installing products so API can respond immediately.
2019-07-11 16:01:53 +07:00
Akeda Bagus 0f2e22de9a
Add docblock in controller class. 2019-07-11 15:59:10 +07:00
Akeda Bagus a41b66c602
Rename helper to wccom-site. 2019-07-11 15:59:10 +07:00
Akeda Bagus c59e1c3553
Fix minor wording issue in error message. 2019-07-11 15:58:06 +07:00
Akeda Bagus 9d047fd912
Make sure to flush cache before checking wccom updates. 2019-07-11 15:58:06 +07:00
Akeda Bagus 18b503dbd6
Add support for theme installation. 2019-07-11 15:58:06 +07:00
tgglv c0d9fc7fc3
Make WP.org plugin support installation method names more precise 2019-07-11 15:58:06 +07:00
tgglv 6eeefd1341
Add WP.org plugin support into Product Activation 2019-07-11 15:58:05 +07:00
tgglv 1fae1d7ba2
Remove redundant line 2019-07-11 15:58:05 +07:00
tgglv 527fbca149
Store product's `installed_path` 2019-07-11 15:58:05 +07:00
tgglv 1dff186076
Add @return types into annotations 2019-07-11 15:58:05 +07:00
tgglv be63fba4cd
Fix typo 2019-07-11 15:58:05 +07:00
tgglv 5bde7b5161
Fix PHP CodeSniffer issues 2019-07-11 15:58:05 +07:00
Akeda Bagus 52a68177a0
Add product info retrieval step before downloading product. 2019-07-11 15:58:04 +07:00
Akeda Bagus 6854f3bdca
Update the state when installation finished. 2019-07-11 15:58:04 +07:00
Akeda Bagus 7ac8232d2c
Make sure to init the upgrader and clean plugins cache before activate. 2019-07-11 15:58:04 +07:00
Akeda Bagus b57f05fde9
Add missing description in docblock. 2019-07-11 15:58:04 +07:00
Akeda Bagus 69a4aa926a
Fix typo in error message. 2019-07-11 15:58:04 +07:00
Akeda Bagus 7adc256344
Move subscription check as part of installation steps. 2019-07-11 15:58:03 +07:00
Akeda Bagus a6e089e47b
Use WP_REST_Server::get_raw_data to get body from the request. 2019-07-11 15:58:03 +07:00
Akeda Bagus 4cf69e350e
Rename filename for helper REST API controller. 2019-07-11 15:55:16 +07:00
Akeda Bagus 72ba4ed2e5
Include helper product install class in main helper class. 2019-07-11 15:55:16 +07:00
Akeda Bagus 61b0d974f4
Add reset state. 2019-07-11 15:55:16 +07:00
Akeda Bagus 0f5a33d543
Add authentication for helper request. 2019-07-11 15:55:16 +07:00
Akeda Bagus d088aea85d
Initial work of adding product install API on top of helper. 2019-07-11 15:55:11 +07:00
Claudio Sanches c4c8fbbce5 Updated composer.lock 2019-07-10 15:50:28 -03:00
Claudio Sanches c63cd802aa
Merge pull request #23957 from woocommerce/feature/feature-plugin-packages
Include external feature plugins as packages
2019-07-10 15:47:48 -03:00
Claudio Sanches 5b8694e92a
Merge pull request #23915 from woocommerce/fix/23544
[Setup] Make PostCode optional as few countries don't use them
2019-07-10 15:45:32 -03:00
Claudio Sanches 22726bd74d
Merge pull request #24120 from woocommerce/fix/24110
add filter for product import image separator
2019-07-10 14:30:34 -03:00
Claudio Sanches d5168440a8
Merge pull request #24121 from woocommerce/renovate/lint-staged-9.x
Update dependency lint-staged to v9.2.0
2019-07-10 14:03:50 -03:00