Repository navigation
Social: Fix upgrade nudges not showing - #30101
Conversation
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Social plugin:
|
We had to revert #29910 in #30101 because the review prompt state was stamping on the rest of the initial state object that's used by Social/Publicize. This change adds the Post Publish panel with the review prompt to the publicize-components package and merges the required state in the Social plugin, so that if both plugins are active the review prompt is still shown in Jetpack.
…31456) * Social Review Prompt: Ensure it is still shown with Jetpack Active We had to revert #29910 in #30101 because the review prompt state was stamping on the rest of the initial state object that's used by Social/Publicize. This change adds the Post Publish panel with the review prompt to the publicize-components package and merges the required state in the Social plugin, so that if both plugins are active the review prompt is still shown in Jetpack. * Fix the package versions * Add the @wordpress/edit-post dependency * Fix package versions * Fix package version * Update the script handle
Jetpack Social's paid features are broken on the trunk branch currently. When you don't have a paid plan, the upgrade nudges don't show up. Along with that, the initial state of the plugin isn't set up correctly. This was inadvertently introduced in #29910 through this bit of code https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/social/src/class-jetpack-social.php#L361-L372, which overrides the initial state in https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/social/src/class-jetpack-social.php#L316.
This is the PR which originally added the review prompts. But this line sets the state for the Social plugin only if the Jetpack plugin is not active which leads to #29910 being created, I presume. That accidentally stomped over the plugin's initial state.
I am not entirely sure how to go about fixing the review prompts when both the plugins are active, requires a bit of thinking I would reckon, but to restore the plugin to a working state I have the code that enqueues the review prompt-related script. I wonder if we can revert #29910 to reinstate the user reviews at least in the case where only the social plugin is active.
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: