This commit is contained in:
Francesco 2020-09-16 16:45:16 -05:00 committed by GitHub
parent d057022caf
commit 36f61c89f1
12 changed files with 35 additions and 32 deletions

View File

@ -246,7 +246,7 @@ function getTaxItems( props ) {
},
showWCS && {
title: __(
'Automated Tax calculation using WooCommerce Services',
'Automated Tax calculation using WooCommerce Tax',
'woocommerce-admin'
),
link:

View File

@ -87,7 +87,7 @@ describe( 'Activity Panels', () => {
);
expect(
taxjarPluginEnabled.queryByText( /WooCommerce Services/ )
taxjarPluginEnabled.queryByText( /WooCommerce Tax/ )
).toBeNull();
const unSupportedCountry = render(
@ -102,7 +102,7 @@ describe( 'Activity Panels', () => {
);
expect(
unSupportedCountry.queryByText( /WooCommerce Services/ )
unSupportedCountry.queryByText( /WooCommerce Tax/ )
).toBeNull();
const supportedCountry = render(
@ -117,7 +117,7 @@ describe( 'Activity Panels', () => {
);
expect(
supportedCountry.getByText( /WooCommerce Services/ )
supportedCountry.getByText( /WooCommerce Tax/ )
).toBeDefined();
} );

View File

@ -379,7 +379,7 @@ class BusinessDetails extends Component {
<Text variant="caption" as="p">
{ interpolateComponents( {
mixedString: __(
'By installing Jetpack and WooCommerce Services plugins for free you agree to our {{link}}Terms of Service{{/link}}.',
'By installing Jetpack and WooCommerce Shipping plugins for free you agree to our {{link}}Terms of Service{{/link}}.',
'woocommerce-admin'
),
components: {

View File

@ -245,7 +245,7 @@ class Shipping extends Component {
},
} )
: __(
'With WooCommerce Services and Jetpack you can save time at the ' +
'With WooCommerce Shipping and Jetpack you can save time at the ' +
'Post Office by printing your shipping labels at home',
'woocommerce-admin'
),

View File

@ -222,11 +222,11 @@ class Tax extends Component {
{
key: 'plugins',
label: __(
'Install Jetpack and WooCommerce Services',
'Install Jetpack and WooCommerce Tax',
'woocommerce-admin'
),
description: __(
'Jetpack and WooCommerce Services allow you to automate sales tax calculations',
'Jetpack and WooCommerce Tax allow you to automate sales tax calculations',
'woocommerce-admin'
),
content: (
@ -274,7 +274,7 @@ class Tax extends Component {
>
{ interpolateComponents( {
mixedString: __(
'By installing Jetpack and WooCommerce Services you agree to the {{link}}Terms of Service{{/link}}.',
'By installing Jetpack and WooCommerce Tax you agree to the {{link}}Terms of Service{{/link}}.',
'woocommerce-admin'
),
components: {
@ -401,7 +401,7 @@ class Tax extends Component {
<p>
{ interpolateComponents( {
mixedString: __(
'{{strong}}Jetpack{{/strong}} and {{strong}}WooCommerce Services{{/strong}} ' +
'{{strong}}Jetpack{{/strong}} and {{strong}}WooCommerce Tax{{/strong}} ' +
'can automate your sales tax calculations for you.',
'woocommerce-admin'
),

View File

@ -50,7 +50,7 @@ A few new WordPress options have been introduced to store information and settin
* `woocommerce_task_list_welcome_modal_dismissed`. This option is used to show a congratulations modal during the transition between the profile wizard and task list.
* `woocommerce_task_list_prompt_shown`. This option is used to conditionally show the "Is this card useful?" snackbar notice, shown once right after a user completes all the task list tasks.
We also use existing options from WooCommerce Core or extensions like WooCommerce Services or Stripe. The list below may not be complete, as new tasks are introduced, but you can generally find usage of these by searching for the [getOptions selector](https://github.com/woocommerce/woocommerce-admin/search?q=getOptions&unscoped_q=getOptions).
We also use existing options from WooCommerce Core or extensions like WooCommerce Shipping & Tax or Stripe. The list below may not be complete, as new tasks are introduced, but you can generally find usage of these by searching for the [getOptions selector](https://github.com/woocommerce/woocommerce-admin/search?q=getOptions&unscoped_q=getOptions).
* `woocommerce_setup_jetpack_opted_in` and `wc_connect_options` are both used to control Jetpack's Terms of Service opt-in, which is necessary to set for a user during the connection process, so that they can use services like automated tax rates.
* `woocommerce_allow_tracking` is used to control Tracks opt-in, allowing us to gather usage data from WooCommerce Admin and WooCommerce core.
@ -72,7 +72,7 @@ To disconnect from WooCommerce.com, go to `WooCommerce > Extensions > WooCommerc
## Jetpack Connection
Using Jetpack & WooCommerce Services allows us to offer additional features to new WooCommerce users as well as simplify parts of the setup process. For example, we can do automated tax calculations for certain countries, significantly simplifying the tax task. To make this work, the user needs to be connected to a WordPress.com account. This also means development and testing of these features needs to be done on a Jetpack connected site. Search the MGS & the Feld Guide for additional resources on testing Jetpack with local setups.
Using Jetpack & WooCommerce Shipping & Tax allows us to offer additional features to new WooCommerce users as well as simplify parts of the setup process. For example, we can do automated tax calculations for certain countries, significantly simplifying the tax task. To make this work, the user needs to be connected to a WordPress.com account. This also means development and testing of these features needs to be done on a Jetpack connected site. Search the MGS & the Feld Guide for additional resources on testing Jetpack with local setups.
We have a special Jetpack connection flow designed specifically for WooCommerce onboarding, so that the user feels that they are connecting as part of a cohesive experience. To access this flow, we have a custom Jetpack connection endpoint [/wc-admin/plugins/connect-jetpack](https://github.com/woocommerce/woocommerce-admin/blob/61b771c2643c24334ea062ab3521073beaf50019/src/API/OnboardingPlugins.php#L273-L296).
@ -122,4 +122,4 @@ Sometimes, it may be necessary to generate a separate build of the plugin betwee
* Switch to the latest `main` branch and pull down any changes
* Run `npm run build:release -- --slug onboarding --features '{"onboarding":true}'`
* A special `woocommerce-admin-onboarding.zip` release will be generated, containing the latest onboarding code
* Make sure to follow the directions in the "enabling onboarding" section above to properly use the build
* Make sure to follow the directions in the "enabling onboarding" section above to properly use the build

View File

@ -39,7 +39,10 @@ export const pluginNames = {
'woocommerce-admin'
),
'woocommerce-payments': __( 'WooCommerce Payments', 'woocommerce-admin' ),
'woocommerce-services': __( 'WooCommerce Services', 'woocommerce-admin' ),
'woocommerce-services': __(
'WooCommerce Shipping & Tax',
'woocommerce-admin'
),
'woocommerce-shipstation-integration': __(
'WooCommerce ShipStation Gateway',
'woocommerce-admin'

View File

@ -215,7 +215,7 @@ class OnboardingProfile extends \WC_REST_Data_Controller {
),
'plugins' => array(
'type' => 'string',
'description' => __( 'How the Jetpack/WooCommerce Services step was handled.', 'woocommerce-admin' ),
'description' => __( 'How the Jetpack/WooCommerce Shipping & Tax step was handled.', 'woocommerce-admin' ),
'context' => array( 'view' ),
'readonly' => true,
'validate_callback' => 'rest_validate_request_arg',

View File

@ -189,7 +189,7 @@ class Plugins extends \WC_REST_Data_Controller {
* @param string $slug The slug of the plugin being installed.
*/
private function create_install_plugin_error_inbox_notification_for_jetpack_installs( $slug ) {
// Exit early if we're not installing the Jetpack or the WooCommerce Services plugins.
// Exit early if we're not installing the Jetpack or the WooCommerce Shipping & Tax plugins.
if ( 'jetpack' !== $slug && 'woocommerce-services' !== $slug ) {
return;
}

View File

@ -27,7 +27,7 @@ class ShippingLabelBannerDisplayRules {
private $jetpack_connected;
/**
* Holds the installed WooCommerce Services version.
* Holds the installed WooCommerce Shipping & Tax version.
*
* @var string
*/
@ -41,7 +41,7 @@ class ShippingLabelBannerDisplayRules {
private $no_incompatible_plugins_installed;
/**
* Whether or not the WooCommerce Services ToS has been accepted.
* Whether or not the WooCommerce Shipping & Tax ToS has been accepted.
*
* @var bool
*/
@ -55,7 +55,7 @@ class ShippingLabelBannerDisplayRules {
private $min_jetpack_version = '4.4';
/**
* Minimum supported WooCommerce Services version.
* Minimum supported WooCommerce Shipping & Tax version.
*
* @var string
*/
@ -81,8 +81,8 @@ class ShippingLabelBannerDisplayRules {
*
* @param string $jetpack_version Installed Jetpack version to check.
* @param bool $jetpack_connected Is Jetpack connected?.
* @param string $wcs_version Installed WooCommerce Services version to check.
* @param bool $wcs_tos_accepted WooCommerce Services Terms of Service accepted?.
* @param string $wcs_version Installed WooCommerce Shipping & Tax version to check.
* @param bool $wcs_tos_accepted WooCommerce Shipping & Tax Terms of Service accepted?.
* @param bool $incompatible_plugins_installed Are there any incompatible plugins installed?.
*/
public function __construct( $jetpack_version, $jetpack_connected, $wcs_version, $wcs_tos_accepted, $incompatible_plugins_installed ) {
@ -191,7 +191,7 @@ class ShippingLabelBannerDisplayRules {
}
/**
* Checks if WooCommerce Services is not installed.
* Checks if WooCommerce Shipping & Tax is not installed.
*
* @return bool
*/
@ -200,7 +200,7 @@ class ShippingLabelBannerDisplayRules {
}
/**
* Checks if WooCommerce Services is up to date.
* Checks if WooCommerce Shipping & Tax is up to date.
*/
private function wcs_up_to_date() {
return $this->wcs_version && version_compare( $this->wcs_version, $this->min_wcs_version, '>=' );

View File

@ -1,9 +1,9 @@
<?php
/**
* WooCommerce Admin Add Install Jetpack and WooCommerce Services Plugin Note Provider.
* WooCommerce Admin Add Install Jetpack and WooCommerce Shipping & Tax Plugin Note Provider.
*
* Adds a note to the merchant's inbox prompting them to install the Jetpack
* and WooCommerce Services plugins after it fails to install during
* and WooCommerce Shipping & Tax plugins after it fails to install during
* WooCommerce setup.
*/
@ -39,10 +39,10 @@ class WC_Admin_Notes_Install_JP_And_WCS_Plugins {
* Get the note.
*/
public static function get_note() {
$content = __( 'We noticed that there was a problem during the Jetpack and WooCommerce Services install. Please try again and enjoy all the advantages of having the plugins connected to your store! Sorry for the inconvenience. The "Jetpack" and "WooCommerce Services" plugins will be installed & activated for free.', 'woocommerce-admin' );
$content = __( 'We noticed that there was a problem during the Jetpack and WooCommerce Shipping & Tax install. Please try again and enjoy all the advantages of having the plugins connected to your store! Sorry for the inconvenience. The "Jetpack" and "WooCommerce Shipping & Tax" plugins will be installed & activated for free.', 'woocommerce-admin' );
$note = new WC_Admin_Note();
$note->set_title( __( 'Uh oh... There was a problem during the Jetpack and WooCommerce Services install. Please try again.', 'woocommerce-admin' ) );
$note->set_title( __( 'Uh oh... There was a problem during the Jetpack and WooCommerce Shipping & Tax install. Please try again.', 'woocommerce-admin' ) );
$note->set_content( $content );
$note->set_content_data( (object) array() );
$note->set_type( WC_ADMIN_Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
@ -59,8 +59,8 @@ class WC_Admin_Notes_Install_JP_And_WCS_Plugins {
}
/**
* Action the Install Jetpack and WooCommerce Services note, if any exists,
* and as long as both the Jetpack and WooCommerce Services plugins have been
* Action the Install Jetpack and WooCommerce Shipping & Tax note, if any exists,
* and as long as both the Jetpack and WooCommerce Shipping & Tax plugins have been
* activated.
*/
public static function action_note() {
@ -88,7 +88,7 @@ class WC_Admin_Notes_Install_JP_And_WCS_Plugins {
}
/**
* Install the Jetpack and WooCommerce Services plugins in response to the action
* Install the Jetpack and WooCommerce Shipping & Tax plugins in response to the action
* being clicked in the admin note.
*
* @param WC_Admin_Note $note The note being actioned.

View File

@ -200,7 +200,7 @@ class WC_Tests_Shipping_Label_Banner_Display_Rules extends WC_Unit_Test_Case {
}
/**
* Test if the banner is hidden when the WooCommerce Services Terms of Service has been already accepted.
* Test if the banner is hidden when the WooCommerce Shipping & Tax Terms of Service has been already accepted.
*/
public function test_if_banner_hidden_when_wcs_tos_accepted() {
$this->with_order(
@ -213,7 +213,7 @@ class WC_Tests_Shipping_Label_Banner_Display_Rules extends WC_Unit_Test_Case {
}
/**
* Test if the banner is hidden when WooCommerce Services is installed but not up to date.
* Test if the banner is hidden when WooCommerce Shipping & Tax is installed but not up to date.
*/
public function test_if_banner_hidden_when_wcs_not_installed() {
$this->with_order(