Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh the site's modules and settings after successful product activation #21886

Merged
merged 4 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion projects/plugins/jetpack/_inc/client/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
updateLicensingActivationNoticeDismiss as updateLicensingActivationNoticeDismissAction,
updateUserLicensesCounts as updateUserLicensesCountsAction,
} from 'state/licensing';
import { fetchModules as fetchModulesAction } from 'state/modules';
import {
getSiteConnectionStatus,
isCurrentUserLinked,
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -674,6 +683,12 @@ export default connect(
fetchSitePurchases: () => {
return dispatch( fetchSitePurchasesAction() );
},
fetchModules: () => {
return dispatch( fetchModulesAction() );
},
fetchSettings: () => {
return dispatch( fetchSettingsAction() );
},
} )
)(
withDispatch( dispatch => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Refresh the site's modules and settings after successful product activation.