Merged in feature/117-dev-dev01 (pull request #8)
auto-patch 117-dev-dev01-2023-12-15T16_09_06 * auto-patch 117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* WooCommerce.com Product Installation Requirements Check.
|
||||
* Woo.com Product Installation Requirements Check.
|
||||
*
|
||||
* @package WooCommerce\WCCom
|
||||
* @since 3.8.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* WooCommerce.com Product Installation.
|
||||
* Woo.com Product Installation.
|
||||
*
|
||||
* @package WooCommerce\WCCom
|
||||
* @since 3.7.0
|
||||
@@ -11,7 +11,7 @@ defined( 'ABSPATH' ) || exit;
|
||||
/**
|
||||
* WC_WCCOM_Site_Installer Class
|
||||
*
|
||||
* Contains functionalities to install products via WooCommerce.com helper connection.
|
||||
* Contains functionalities to install products via Woo.com helper connection.
|
||||
*/
|
||||
class WC_WCCOM_Site_Installer {
|
||||
|
||||
@@ -138,7 +138,7 @@ class WC_WCCOM_Site_Installer {
|
||||
);
|
||||
|
||||
// Clear the cache of customer's subscription before asking for them.
|
||||
// Thus, they will be re-fetched from WooCommerce.com after a purchase.
|
||||
// Thus, they will be re-fetched from Woo.com after a purchase.
|
||||
WC_Helper::_flush_subscriptions_cache();
|
||||
|
||||
WC()->queue()->cancel_all( 'woocommerce_wccom_install_products', $args );
|
||||
@@ -282,7 +282,7 @@ class WC_WCCOM_Site_Installer {
|
||||
'product_type' => '',
|
||||
);
|
||||
|
||||
// Get product info from woocommerce.com.
|
||||
// Get product info from Woo.com.
|
||||
$request = WC_Helper_API::get(
|
||||
add_query_arg(
|
||||
array( 'product_id' => absint( $product_id ) ),
|
||||
@@ -294,7 +294,7 @@ class WC_WCCOM_Site_Installer {
|
||||
);
|
||||
|
||||
if ( 200 !== wp_remote_retrieve_response_code( $request ) ) {
|
||||
return new WP_Error( 'product_info_failed', __( 'Failed to retrieve product info from woocommerce.com', 'woocommerce' ) );
|
||||
return new WP_Error( 'product_info_failed', __( 'Failed to retrieve product info from Woo.com', 'woocommerce' ) );
|
||||
}
|
||||
|
||||
$result = json_decode( wp_remote_retrieve_body( $request ), true );
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* WooCommerce.com Product Installation.
|
||||
* Woo.com Product Installation.
|
||||
*
|
||||
* @package WooCommerce\WCCom
|
||||
* @since 3.7.0
|
||||
@@ -14,7 +14,7 @@ defined( 'ABSPATH' ) || exit;
|
||||
/**
|
||||
* WC_WCCOM_Site Class
|
||||
*
|
||||
* Main class for WooCommerce.com connected site.
|
||||
* Main class for Woo.com connected site.
|
||||
*/
|
||||
class WC_WCCOM_Site {
|
||||
|
||||
@@ -45,7 +45,7 @@ class WC_WCCOM_Site {
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate WooCommerce.com request.
|
||||
* Authenticate Woo.com request.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param int|false $user_id User ID.
|
||||
@@ -184,7 +184,7 @@ class WC_WCCOM_Site {
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify WooCommerce.com request from a given body and signature request.
|
||||
* Verify Woo.com request from a given body and signature request.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param string $body Request body.
|
||||
|
||||
@@ -40,7 +40,7 @@ class WC_WCCOM_Site_Installation_Step_Get_Product_Info implements WC_WCCOM_Site_
|
||||
public function run() {
|
||||
$product_id = $this->state->get_product_id();
|
||||
|
||||
// Get product info from woocommerce.com.
|
||||
// Get product info from Woo.com.
|
||||
$request = WC_Helper_API::get(
|
||||
add_query_arg(
|
||||
array( 'product_id' => $product_id ),
|
||||
|
||||
@@ -47,7 +47,7 @@ class WC_REST_WCCOM_Site_Installer_Error_Codes {
|
||||
self::NOT_AUTHENTICATED => 'Authentication required',
|
||||
self::NO_ACCESS_TOKEN => 'No access token provided',
|
||||
self::NO_SIGNATURE => 'No signature provided',
|
||||
self::SITE_NOT_CONNECTED => 'Site not connected to WooCommerce.com',
|
||||
self::SITE_NOT_CONNECTED => 'Site not connected to Woo.com',
|
||||
self::INVALID_TOKEN => 'Invalid access token provided',
|
||||
self::REQUEST_VERIFICATION_FAILED => 'Request verification by signature failed',
|
||||
self::USER_NOT_FOUND => 'Token owning user not found',
|
||||
@@ -60,8 +60,8 @@ class WC_REST_WCCOM_Site_Installer_Error_Codes {
|
||||
self::INSTALLATION_ALREADY_RUNNING => 'The installation of the plugin is already running',
|
||||
self::INSTALLATION_FAILED => 'The installation of the plugin failed',
|
||||
self::FILESYSTEM_REQUIREMENTS_NOT_MET => 'The filesystem requirements are not met',
|
||||
self::FAILED_GETTING_PRODUCT_INFO => 'Failed to retrieve product info from woocommerce.com',
|
||||
self::INVALID_PRODUCT_INFO_RESPONSE => 'Invalid product info response from woocommerce.com',
|
||||
self::FAILED_GETTING_PRODUCT_INFO => 'Failed to retrieve product info from Woo.com',
|
||||
self::INVALID_PRODUCT_INFO_RESPONSE => 'Invalid product info response from Woo.com',
|
||||
self::WCCOM_PRODUCT_MISSING_SUBSCRIPTION => 'Product subscription is missing',
|
||||
self::WCCOM_PRODUCT_MISSING_PACKAGE => 'Could not find product package',
|
||||
self::MISSING_DOWNLOAD_PATH => 'Download path is missing',
|
||||
|
||||
@@ -124,7 +124,7 @@ class WC_REST_WCCOM_Site_Installer_Controller_V2 extends WC_REST_Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Install WooCommerce.com products.
|
||||
* Install Woo.com products.
|
||||
*
|
||||
* @since 7.7.0
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
|
||||
@@ -125,7 +125,7 @@ class WC_REST_WCCOM_Site_Installer_Controller extends WC_REST_Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* Install WooCommerce.com products.
|
||||
* Install Woo.com products.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
|
||||
@@ -106,7 +106,7 @@ class WC_REST_WCCOM_Site_SSR_Controller extends WC_REST_Controller {
|
||||
$data = $ssr_controller->get_items( $request );
|
||||
$data = $data->get_data();
|
||||
|
||||
// Submit SSR data to WooCommerce.com.
|
||||
// Submit SSR data to Woo.com.
|
||||
$request = WC_Helper_API::post(
|
||||
'ssr',
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user