Minileven: add options back as they still exist on sites#14756
Minileven: add options back as they still exist on sites#14756
Conversation
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: March 3, 2020. |
This is a follow-up to #14714. After removing those options, we started seeing errors like this one on sites: PHP Warning: Invalid Jetpack option name: wp_mobile_excerpt Since these Jetpack options are still valid options even if the feature is gone, let's keep them around.
8021449 to
523f4ed
Compare
|
Following your testing instructions, I did get a bunch of notices: |
|
It looks like the problem is that the three These options were originally in the array returned by Jetpack_Options::get_all_wp_options() The options in that array aren’t managed by Jetpack_Options. I think we need to call core’s get_option() and delete_option() functions to get and delete these options in Jetpack::plugin_upgrade(). |
|
Thank you. That makes sense now, I was confused. I updated the calls, this should be ready for another review now. |
|
As discussed in Slack, we need to take into account the spun-out plugin so need to gate this to only delete options if the plugin is not active. |
I gave this a try in 0060167. Let me know if this is what you had in mind! |
kbrown9
left a comment
There was a problem hiding this comment.
This looks good to me! The PHP warnings are no longer generated.
* Minileven: add options back as they still exist on sites This is a follow-up to #14714. After removing those options, we started seeing errors like this one on sites: PHP Warning: Invalid Jetpack option name: wp_mobile_excerpt Since these Jetpack options are still valid options even if the feature is gone, let's keep them around. * Those options are not stored as Jetpack options. See Automattic/jetpack#14756 (comment) * Remove unneeded options See https://github.com/Automattic/jetpack/pull/14756/files#r383413182 * Only delete options if the standalone plugin is not in use
Changes proposed in this Pull Request:
This is a follow-up to #14714.
After removing those options, we started seeing errors like this one on sites:
PHP Warning: Invalid Jetpack option name: wp_mobile_excerpt
Since these Jetpack options are still valid options even if the feature is gone, let's keep them around.
Testing instructions:
Proposed changelog entry for your changes: