Hello,
We are sorry about that. We did make some optimizations related to the notifications in this recent update:
Fixed: Notification code was causing errors on some installations
Could you please record a screencast using loom.com showing this issue so we can check?
We look forward to hearing back from you.
it does not work at all. at least for me!
خطای Commands out of sync; you can't run this command now در پایگاه‌داده وردپرس برای دستور SELECT autoload FROM wp_options WHERE option_name = 'rank_math_notifications' ساخته شده توسط shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, MyThemeShop\Notification_Center->update_storage, delete_option
I had to change
add_action( 'shutdown', array( $this, 'update_storage' ) );
to
add_action( 'wp_after_admin_bar_render', array( $this, 'update_storage' ) );
Hello,
We are sorry but we cannot replicate this issue from our end so we cannot include an update. We have discussed this internally as well and since this is only happening for you – you have to use the code we offered you until you can replace this and fix it internally.
Please use the solution we offered and in the meantime, we will work on a more permanent solution.
Thank you.
Hello,
As my colleague mentioned it, this issue seems to happen only on your site. I also mentioned in the other ticket that we thoroughly checked the related code line by line, and the code is all correct, so the issue must be related to something on your site, or something about your server configuration.
Nevertheless, we have made a small change in the recent update, which should make this error happen less often.
Other than that, what you can try is placing the following code in the functions.php file of your theme or child theme:
add_action( 'init', 'rm_move_callback' );
function rm_move_callback() {
$class = rank_math()->container['notification'];
remove_action( 'shutdown', array( $class, 'update_storage' ) );
add_action( 'wp_after_admin_bar_render', array( $class, 'update_storage' ) );
}
This code does the same thing as if you change the add_action
line in the plugin code, to move the callback function to a different hook. The benefit of this method is that this code will stay there even if you update the plugin, so you won’t lose the changes.
Hope that helps.
thanks. it works like a charm!
Hello,
Glad that helped.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.