Skip to content

Commit

Permalink
[not verified] Boost: On premium upgrade (if image guide is enabled),…
Browse files Browse the repository at this point in the history
… request an ISA report (#31888)

* Update purchase flow to request a new ISA report if image guide is on

* add changelog

* Revert linter update after merging with trunk

* [not verified] Revert linter update after merging with trunk

* Remove critical css regen code, as it happens in the back-end now
  • Loading branch information
dilirity authored and haqadn committed Jul 19, 2023
1 parent 0f55785 commit 9cd5215
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { __ } from '@wordpress/i18n';
import ReactComponent from '../../elements/ReactComponent.svelte';
import TemplatedString from '../../elements/TemplatedString.svelte';
import { requestImageAnalysis } from '../../modules/image-size-analysis/store/isa-summary';
import { modulesState } from '../../stores/modules';
import Logo from '../../svg/jetpack-green.svg';
import externalLinkTemplateVar from '../../utils/external-link-template-var';
Expand All @@ -14,9 +15,17 @@
// svelte-ignore unused-export-let - Ignored values supplied by svelte-navigator.
export let location, navigate;
onMount( () => {
onMount( async () => {
// Enable cloud css module on upgrade.
$modulesState.cloud_css.active = true;
// If image guide is enabled, request a new ISA report.
if ( $modulesState.image_guide.active ) {
// Check if images can be resized.
if ( false !== Jetpack_Boost.site.canResizeImages ) {
await requestImageAnalysis();
}
}
} );
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: added
Comment: Update premium purchase flow to request an ISA report if Image Guide is enabled.


0 comments on commit 9cd5215

Please sign in to comment.