Undefined variable

#455585
  • Resolved Bheem
    Rank Math free

    Hi,

    I get this error and tried deleting any pending past due pending actions in PHPMyAdmin.

    Still, I see this error in the WordPress dashboard.

    Undefined variable: num_pastdue_actions in /home/axdkprgt/nrh/wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php on line 189

    Notice: Undefined variable: num_pastdue_actions in /home/axdkprgt/nrh/wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php on line 194

    Kindly help.

    regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Anas
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience caused.

    The notice is not an error but a message stating that there are pending Action Scheduler actions that were not completed.

    You can follow either of the following steps to remove the warning:

    1. Please add the following filter to remove the warning:

    
    add_filter( 'action_scheduler_pastdue_actions_check_pre', '__return_false' );
    

    1.1 Here is a tutorial on how to do it:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    2. Open the Action Scheduler page, click on the Pending tab, Select all and delete them using the Bulk Action dropdown:
    https://i.rankmath.com/XBucZ8
    Normal WordPress installation path:
    /wp-admin/admin.php?page=wc-status&tab=action-scheduler

    WordPress installation with WooCommerce in it:
    /wp-admin/admin.php?page=wc-status&tab=action-scheduler

    3. You can set up a real cron job for the same:
    https://www.siteground.com/tutorials/wordpress/real-cron-job/
    https://www.google.com/search?q=wp+cron+replace+with+real+cron

    Please stay advised that the Action Scheduler will not run if there are no visitors to the site (just like WP’s own cron).

    Even Action Scheduler, the library that is used in the RM plugin, states that “Actions that are past-due have missed their scheduled date; because of how WP Cron works, it is normal to have some past-due actions.”

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

    Bheem
    Rank Math free

    Hi, I have tried the above methods but again error appears.

    Any other way.

    regards

    Andreas
    Rank Math business

    same here – also we have a multisite installation (without woocommerce) so i cannot access the url to the action scheduler.

    Bheem
    Rank Math free

    hi,
    for me the issue was due to wpforms plugin.
    i could rectify the problem.

    thanks for support.

    Hello @bheemnr,

    I am glad that we could be of help. Please do not hesitate to let us know if you need our assistance with anything else.


    @andreas-0310
    ,

    Thank you for contacting us. The scheduled actions page must be relocated due to a plugin that has also a “tools” page. Like @bheemnr’s experience, the scheduled actions might have been relocated to WPForm’s tools page.

    Let us know.

    Looking forward to helping you.

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

You must be logged in to reply to this ticket.