diff --git a/projects/plugins/jetpack/_inc/client/main.jsx b/projects/plugins/jetpack/_inc/client/main.jsx index 3ef2059aa9e71..1dc21d036ec02 100644 --- a/projects/plugins/jetpack/_inc/client/main.jsx +++ b/projects/plugins/jetpack/_inc/client/main.jsx @@ -22,6 +22,7 @@ import { updateLicensingActivationNoticeDismiss as updateLicensingActivationNoticeDismissAction, updateUserLicensesCounts as updateUserLicensesCountsAction, } from 'state/licensing'; +import { fetchModules as fetchModulesAction } from 'state/modules'; import { getSiteConnectionStatus, isCurrentUserLinked, @@ -55,7 +56,11 @@ import { fetchSiteData as fetchSiteDataAction, fetchSitePurchases as fetchSitePurchasesAction, } from 'state/site'; -import { areThereUnsavedSettings, clearUnsavedSettingsFlag } from 'state/settings'; +import { + areThereUnsavedSettings, + clearUnsavedSettingsFlag, + fetchSettings as fetchSettingsAction +} from 'state/settings'; import { getSearchTerm } from 'state/search'; import { Recommendations } from 'recommendations'; import ProductDescriptions from 'product-descriptions'; @@ -576,6 +581,10 @@ class Main extends React.Component { this.props.fetchSiteData(); // Update site products. this.props.fetchSitePurchases(); + // Update site modules (search, wordads, google-analytics, etc.) + this.props.fetchModules(); + // Update site settings (i.e. search, instant search, etc.) + this.props.fetchSettings(); } render() { @@ -674,6 +683,12 @@ export default connect( fetchSitePurchases: () => { return dispatch( fetchSitePurchasesAction() ); }, + fetchModules: () => { + return dispatch( fetchModulesAction() ); + }, + fetchSettings: () => { + return dispatch( fetchSettingsAction() ); + }, } ) )( withDispatch( dispatch => { diff --git a/projects/plugins/jetpack/changelog/add-fetch-settings-modules-after-license-activation b/projects/plugins/jetpack/changelog/add-fetch-settings-modules-after-license-activation new file mode 100644 index 0000000000000..791b025e854de --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-fetch-settings-modules-after-license-activation @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Refresh the site's modules and settings after successful product activation.