Claudio Sanches
d48f1d4e2e
Fixed package tag usage
2020-08-05 13:36:24 -03:00
Denis Dvali
955bb2ca7e
Change "products" argument type from array to object.
2020-03-10 17:41:39 +03:00
Peter Fabian
fe9a5be828
Merge pull request #25528 from woocommerce/update/wccom-installer-api-authentication
...
Use query params as fallback for obtaining authentication data in plugin installer API
2020-02-05 18:13:06 +01:00
Denis Dvali
15ad616a2f
Pass request uri argument for more explicit function call.
2020-02-03 15:47:04 +03:00
Denis Dvali
b6be0b31f8
Add arguments declaration for install REST API endpoint.
2020-02-03 14:23:03 +03:00
Denis Dvali
cdb611e924
Small refactor to improve readablity.
2020-01-30 12:56:52 +03:00
Denis Dvali
ed918f5105
Adding fallback in case "Authorization" or "X-Woo-Signature" headers are not present.
...
Check if access token and request signature set in query arguments if the headers are missing.
2020-01-30 12:53:57 +03:00
Christopher Allford
6ad091a9b7
Changed all of the constant accesses into corresponding Automattic\Jetpack\Constants usages
2020-01-28 21:21:29 -08:00
Rodrigo Primo
62d6b05b58
Fix Generic.Formatting.MultipleStatementAlignment violations
...
This commit fixes all violations of the Generic.Formatting.MultipleStatementAlignment sniff automatically using phpcbf.
2019-12-20 14:21:08 -03:00
Rodrigo Primo
179dd7003e
Fix Generic.Arrays.DisallowShortArraySyntax violations
...
This commit fixes all violations of the
Generic.Arrays.DisallowShortArraySyntax sniff automatically using
phpcbf.
2019-12-20 14:18:04 -03:00
Claudio Sanches
174a722adf
Merge pull request #25131 from woocommerce/remove-wccom-site-api-permalink-require
...
Remove permalink reliance
2019-12-03 17:48:23 -03:00
Claudio Sanches
924109b80c
Merge pull request #25160 from bgrgicak/update/wccom-6777
...
Fix PHP Notice: Undefined index: folder_exists
2019-12-03 17:48:05 -03:00
Bero
df21888b59
check if isset folder_exists in move_product step
2019-12-03 20:03:17 +01:00
Claudio Sanches
cbeb95379e
Fixed PHPCS warnings and code clean up
2019-12-03 14:04:15 -03:00
Justas Butkus
34f54071bb
Revert "Build the REST API URL before checking for wccom-site"
...
This reverts commit 0674b421ec
.
2019-12-03 09:20:28 +02:00
Claudio Sanches
af849fbd8a
Merge pull request #25112 from woocommerce/add/wccom-installer-api-error-code
...
Improve error codes for plugin installer API authentication
2019-12-02 17:46:31 -03:00
Claudio Sanches
0674b421ec
Build the REST API URL before checking for wccom-site
2019-12-02 17:37:48 -03:00
Justas Butkus
e0613db386
Account for early start-up phase
...
Using `$wp` doesn't work in certain scenarios, where the entire system
didn't complete bootstrapping.
The raw query, after escaping the values, should sufficiently cater for
the need.
2019-12-02 21:56:42 +02:00
Bero
33d9f33fa3
folder_exists plugin info added
2019-12-02 16:11:44 +01:00
Bero
db112275c2
Return folder_exists error as success
2019-11-29 15:40:53 +01:00
Justas Butkus
dbc0c5ab85
Remove permalink reliance
...
Some sites don't have permalinks enabled (e.g. local dev environments) and
can't use the WC site API functionality.
The `rest_get_url_prefix` elsewhere is only used in permalink context (e.g.
`get_rest_url` uses it conditionally), while `$wp->query_vars` are always
populated, even in rewrite condition, thus making them more accessible.
2019-11-27 21:45:21 +02:00
Denis Dvali
4bc4faf7af
Adding new explicit error codes for WC.COM installer API authentication errors.
2019-11-25 19:32:10 +03:00
Denis Dvali
234bb9139f
Move "no permissions" error data (error code, message, http code) to
...
a constant within a dedicated error messages class.
2019-11-25 13:46:07 +03:00
tgglv
386aedd73d
Move flushing subscriptions' cache upper to run in once per install
...
Relates: https://github.com/Automattic/woocommerce.com/issues/6535
2019-10-18 10:36:30 +05:00
tgglv
34e873ca33
Move WC Helper subscriptions' cache cleaning before asking for subs
...
Relates: https://github.com/Automattic/woocommerce.com/issues/6535
2019-10-17 09:52:00 +05:00
tgglv
2c1663446b
Run WC Helper subs cache cleaning before getting product info
...
Relates: https://github.com/Automattic/woocommerce.com/issues/6535
2019-10-11 18:01:09 +05:00
Rommel Castro
4fabaed498
Implements WC_WCCOM_Site_Installer_Requirements_Check::met_requirements() validation on GET /install
2019-10-01 13:45:30 -06:00
Rommel Castro
6567271840
Update status error to 400
2019-09-30 18:31:23 -06:00
Rommel Castro
803f3e6cc6
Implements WC_WCCOM_Site_Installer_Requirements_Check::met_requirements() validation on POST /install
2019-09-30 15:20:11 -06:00
Rommel Castro
67091782f8
Includes WC_WCCOM_Site_Installer_Requirements_Check class
2019-09-30 15:15:11 -06:00
Rommel Castro
6e5210657b
Adds WC_WCCOM_Site_Installer_Requirements_Check class
2019-09-30 15:14:52 -06:00
Claudio Sanches
1f77efae4b
Don't use WP_REST_Server::get_raw_data() inside REST API endpoints
2019-07-15 13:30:17 -03:00
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
f51265e58d
Add @since tag.
2019-07-15 15:42:36 +07:00
Akeda Bagus
fc7cacb711
Fix coding standard issues.
2019-07-11 19:58:16 +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