disabling your plugin completelly on other plugin admin page

#251708
  • Resolved Alberto M. Rubio
    Rank Math free

    Hi,

    Your plugin is conflicting with other plugins and I want to disable RankMath on that plugin admin page and is not working due this error:

    Fatal error: Uncaught Error: Call to undefined method MyThemeShop\Notification_Center::has_notification()
    in /home/xxxx/public_html/wp-content/plugins/seo-by-rank-math/includes/helpers/class-api.php on line 58

    Pila de llamadas:

    RankMath\Helper::has_notification()
    wp-content/plugins/seo-by-rank-math/includes/admin/class-ask-review.php:91
    RankMath\A\Ask_Review::review_notice_js()
    wp-includes/class-wp-hook.php:303
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:327
    WP_Hook::do_action()
    wp-includes/plugin.php:470
    do_action()
    wp-admin/admin-footer.php:78
    require_once()
    wp-admin/admin.php:297

    So how can I disable your plugin for that page… I tried all and nothing works:

    add_filter( ‘option_active_plugins’, function( $plugins ){
    foreach ($plugins as $key => $value) {
    if(stripos( $value, ‘rank_math’) !== false)unset($plugins[$key]);
    }
    return $plugins;
    });
    remove_all_actions( ‘rank_math/head’ );
    add_filter(‘rank_math/Helper’, “__return_false”);
    add_filter( ‘rank_math/auto_update_send_email’, ‘__return_false’ );
    add_filter( ‘rank_math/A/Ask_Review’, ‘__return_false’ );

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    You can use Plugin Organizer to disable plugins on specific post types or WordPress managed URL.: https://wordpress.org/plugins/plugin-organizer/

    Let us know how that goes. Looking forward to helping you.

    I don´t think that hacking WordPress with other plugins is a solution. Your plugin should not do that.

    Commenting on seo-by-rank-math/includes/admin/class-ask-review.php all the “Add inline JS” related to the review notice in your plugin works. And that shouldn’t either be the solution.

    If your plugin is disabled should be disabled, and that Class “Ask user to review Rank Math on wp.org, in the meta box after 2 weeks.” shouldn’t be doing that.

    So, please update your plugin to don´t do that as may be breaking a lot of plugins out there, or provide a method to disable it programtely without hacking the code.

    Hello,

    Can you please explain the issue you are facing when Rank Math is active and also share the name of the plugin it’s conflicting with?

    If your plugin is disabled should be disabled, and that Class “Ask user to review Rank Math on wp.org, in the meta box after 2 weeks.” shouldn’t be doing that.

    If you have deactivated the plugin completely from your site it shouldn’t show the notice to ask for a review. And if the plugin is completely disabled it shouldn’t even throw an error.

    It will be helpful if you can record a screencast using a tool like https://loom.com and share it here with us. It will help us understand the issue and assist you further.

    Looking forward to helping you.

    Thanks.

    The problem is this:

    Your plugin and any other plugin youl´d be disabled like this if anded on and admin page:

    add_filter( ‘option_active_plugins’, function( $plugins ){
    foreach ($plugins as $key => $value) {
    if(stripos( $value, ‘rank_math’) !== false)unset($plugins[$key]);
    }
    return $plugins;
    });

    But, your´s don´t disable completely since some actions still look for your class designed to spam alerts asking comments all over every single admin page of wordpress. (Same method used by other SEO Plugin)

    And thourghs this error:

    Fatal error: Uncaught Error: Call to undefined method MyThemeShop\Notification_Center::has_notification()
    in /home/xxxx/public_html/wp-content/plugins/seo-by-rank-math/includes/helpers/class-api.php on line 58

    because your plugin calls on helpers/class-api.php on line 58

    public static function has_notification( $notification_id ) {
    return rank_math()->notification->has_notification( $notification_id );
    }

    That calls even when the plugin is disabled by code, this function Helper::has_notification() on
    wp-content/plugins/seo-by-rank-math/includes/admin/class-ask-review.php:91on

    /**
    * Add inline JS related to the review notice.
    *
    * @return void
    */
    public function review_notice_js() {
    if (
    ! Helper::has_notification( ‘rank_math_review_plugin_notice’ ) &&
    ! Helper::has_notification( ‘rank_math_pro_notice’ )
    ) {
    return;
    }
    ?>

    And the only purpose of this function is to spam all admin pages showing to leave a review on your plugin…

    Hello,

    We might need to take a closer look at your admin settings or you can create a staging website for us and replicate the error there so we won’t be worrying about troubleshooting your live site.

    Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Is not necessary, you can try this on Askimed and will have the same result when your plugin is on

    Just add to askimed.php (like if you would like to deactivate all plugins on that page only) and you will see the error

    if(stripos($_SERVER[‘REQUEST_URI’], ‘page=akismet-key-config’) !== false)
    {

    add_filter( ‘option_active_plugins’, function( $plugins ){
    foreach ($plugins as $key => $value) {
    if(stripos( $value, ‘akismet’) == false)unset($plugins[$key]);
    }
    return $plugins;
    });
    }

    Hello,

    There is no way to disable the review notice when Rank Math is active. The filter doesn’t deactivate the plugins completely from your backend. Since the plugin is only disabled on a particular page, the review notification function is still active and throws an error.

    There is no filter to disable that while the plugin is active in the backend. However, if you are disabling Rank Math due to some conflict then please let us know so we can help in resolving that.

    Looking forward to helping you.

    Yes, I´m disabling it because that function causes conflicts with a lot of plugins that disable other plugins on their own plugin page to avoid conflicts… So you are causing a conflict for not disabling that function together with your plugin as it should. And is a bad practice just to put your marketing messages all over WordPress, not to mention to force them like that. If I like to have updates from a plugin I go to the plugins page or worst to the all plugins page, but have updates of all plugins on just every page is perceived at least for me as spam.

    Hello,

    We totally understand that, but this is a common practice done by all big plugins that include a free and paid subscription.

    These messages are generic WordPress notifications and shouldn’t cause absolutely any issues or problems on any website. If you don’t want to show those messages you can use a plugin such as this one that should help hide the messages: https://wordpress.org/plugins/disable-wp-notification/

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘disabling your plugin completelly on other plugin admin page’ is closed to new replies.