From a41b66c602261d6e9f1005e0f4a2ef055596772b Mon Sep 17 00:00:00 2001 From: Akeda Bagus Date: Tue, 9 Jul 2019 15:28:43 +0700 Subject: [PATCH] Rename helper to wccom-site. --- ...-rest-wccom-site-installer-controller.php} | 12 +++++------ includes/class-wc-rest-authentication.php | 20 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) rename includes/api/{wc-helper/class-wc-rest-helper-product-installation-controller.php => wccom-site/class-wc-rest-wccom-site-installer-controller.php} (88%) diff --git a/includes/api/wc-helper/class-wc-rest-helper-product-installation-controller.php b/includes/api/wccom-site/class-wc-rest-wccom-site-installer-controller.php similarity index 88% rename from includes/api/wc-helper/class-wc-rest-helper-product-installation-controller.php rename to includes/api/wccom-site/class-wc-rest-wccom-site-installer-controller.php index c0203b956a1..70d230d786c 100644 --- a/includes/api/wc-helper/class-wc-rest-helper-product-installation-controller.php +++ b/includes/api/wccom-site/class-wc-rest-wccom-site-installer-controller.php @@ -1,8 +1,8 @@ $_SERVER['HTTP_HOST'], 'request_uri' => $_SERVER['REQUEST_URI'], @@ -110,14 +110,14 @@ class WC_REST_Authentication { } /** - * Authenticate helper request. + * Authenticate WooCommerce.com request. * * @param int|false $user_id User ID. * * @return int|false */ - public function authenticate_helper( $user_id ) { - if ( ! empty( $user_id ) || ! $this->is_request_to_helper_rest_api() ) { + public function authenticate_wccom( $user_id ) { + if ( ! empty( $user_id ) || ! $this->is_request_to_wccom_site_rest_api() ) { return $user_id; } @@ -144,7 +144,7 @@ class WC_REST_Authentication { $body = WP_REST_Server::get_raw_data(); $signature = trim( $_SERVER['HTTP_X_WOO_SIGNATURE'] ); - if ( ! $this->verify_helper_request( $body, $signature, $site_auth['access_token_secret'] ) ) { + if ( ! $this->verify_wccom_request( $body, $signature, $site_auth['access_token_secret'] ) ) { return false; }