JITM: Correct the namespace and class in the add_filter() calls.#13720
Merged
JITM: Correct the namespace and class in the add_filter() calls.#13720
Conversation
Collaborator
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: November 5, 2019. |
jeherve
reviewed
Oct 15, 2019
PHPCS comment errors in the 'get_messages()' method.
f9a8d16 to
d101760
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
add_filter()calls in theget_message()method are using an old class name,Jetpack_JITM. When a JITM that uses one of these filters is displayed, the JITM's CTA does not work properly and the following PHP warning is generated:PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Jetpack_JITM'Changes proposed in this Pull Request:
add_filter()calls by adding the correct namespace and class name.get_messages()method.Is this a new feature or does it add/remove features to an existing part of Jetpack?
This fixes a bug in an existing feature.
Testing instructions:
call_user_func_array().call_user_func_array()should not be generated.Proposed changelog entry for your changes: