Fix location settings not updated in tax task (#48606)

* Fix unable to complete tax task via wcs

* Fix missing dependencies

* Add changefile(s) from automation for the following project(s): woocommerce

* Update 48606-fix-location-not-update-in-tax-task

* Fix missing dependencies

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chi-Hsuan Huang 2024-06-20 04:06:21 +08:00 committed by GitHub
parent 76171ea32f
commit 61517c2609
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 6 deletions

View File

@ -88,7 +88,7 @@ const Tax: React.FC< TaxProps > = ( { onComplete, query, task } ) => {
} else {
redirectToTaxSettings();
}
}, [] );
}, [ generalSettings, taxSettings, updateAndPersistSettingsForGroup ] );
const onAutomate = useCallback( async () => {
setIsPending( true );
@ -127,7 +127,13 @@ const Tax: React.FC< TaxProps > = ( { onComplete, query, task } ) => {
)
);
onComplete();
}, [] );
}, [
createNotice,
generalSettings,
onComplete,
taxSettings,
updateAndPersistSettingsForGroup,
] );
const onDisable = useCallback( () => {
setIsPending( true );
@ -142,7 +148,7 @@ const Tax: React.FC< TaxProps > = ( { onComplete, query, task } ) => {
} ).then( () => {
window.location.href = getAdminLink( 'admin.php?page=wc-admin' );
} );
}, [] );
}, [ updateOptions ] );
const getVisiblePartners = () => {
const countryCode =
@ -186,7 +192,7 @@ const Tax: React.FC< TaxProps > = ( { onComplete, query, task } ) => {
recordEvent( 'tasklist_tax_view_options', {
options: partners.map( ( partner ) => partner.id ),
} );
}, [] );
}, [ onAutomate, partners, query ] );
const getCurrentPartner = () => {
if ( ! query.partner ) {

View File

@ -54,7 +54,7 @@ export const Plugins: React.FC< SetupStepProps > = ( {
}
nextStep();
}, [ isResolving ] );
}, [ isResolving, nextStep, pluginsToActivate.length, tosAccepted ] );
if ( isResolving ) {
return null;

View File

@ -75,7 +75,7 @@ export const Setup: React.FC< SetupProps > = ( {
return;
}
setPluginsToActivate( remainingPlugins );
}, [ activePlugins ] );
}, [ activePlugins, pluginsToActivate.length ] );
const nextStep = () => {
setStepIndex( stepIndex + 1 );

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix location settings not updated in tax task