Redirect to shipping settings page when task is completed (https://github.com/woocommerce/woocommerce-admin/pull/6791)

* Redirect to shipping settings page when shipping task after task is completed

* Add changelog and testing instructions
This commit is contained in:
louwie17 2021-04-13 16:49:29 -03:00 committed by GitHub
parent a2e2db5ab6
commit 715f4806f5
3 changed files with 23 additions and 2 deletions

View File

@ -42,6 +42,18 @@ In case the report shows "no data", please reimport historical data by following
- Choose payment methods
- See no error message
### Set up shipping costs task, redirect to shipping settings after completion. #6791
- Create a new store, and finish the Onboarding flow
- Go to **WooCommerce > Home** and select the **Set up shipping costs** task, it should show the standard stepper
- Type some number in the 'Shipping cost' input
- Click the 'Rest of the world' toggle to toggle it on.
- Type some number in the 'Shipping cost' input box under the 'Rest of the world' label
- Finish the set up, but don't need to install the shipping label plugin
- Once on home screen the **Set up shipping costs** task should show as finished
- Click on the task again
- It should now redirect to the shipping settings page.
## 2.2.0
### Fixed event tracking for merchant email notes #6616

View File

@ -26,6 +26,7 @@ import {
isWCPaySupported,
} from './tasks/payments/wcpay';
import { groupListOfObjectsBy } from '../lib/collections';
import { getLinkTypeAndHref } from '~/store-management-links';
export function recordTaskViewEvent(
taskName,
@ -226,8 +227,15 @@ export function getAllTasks( {
title: __( 'Set up shipping costs', 'woocommerce-admin' ),
container: <Shipping />,
onClick: () => {
onTaskSelect( 'shipping' );
updateQueryString( { task: 'shipping' } );
if ( shippingZonesCount > 0 ) {
window.location = getLinkTypeAndHref( {
type: 'wc-settings',
tab: 'shipping',
} ).href;
} else {
onTaskSelect( 'shipping' );
updateQueryString( { task: 'shipping' } );
}
},
completed: shippingZonesCount > 0,
visible:

View File

@ -89,6 +89,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Dev: Add support for running php unit tests in PHP 8. #6678
- Fix: Remove no-reply from inbox notification emails #6644
- Performance: Avoid updating customer info synchronously from the front end. #6765
- Fix: Set up shipping costs task, redirect to shipping settings after completion. #6791
== 2.2.0 3/30/2021 ==