Undefined variable $num_pastdue_actions

#470235
  • Resolved Burak Sahin
    Rank Math free

    Hi there,

    I see these errors in my error.log.

    can we fix it?

    [28-Oct-2022 08:30:48 UTC] PHP Warning: Undefined variable $num_pastdue_actions in /srv/htdocs/wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php on line 191
    [28-Oct-2022 08:30:48 UTC] PHP Warning: Undefined variable $num_pastdue_actions in /srv/htdocs/wp-content/plugins/seo-by-rank-math/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php on line 194

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    That is a new feature of the ActionScheduler that is used by our plugin to generate the actions for the Analytics module.

    However, you can disable that by adding the following filter to the website:

    add_filter( 'action_scheduler_pastdue_actions_check_pre', '__return_false' );

    And here’s a link on how to apply a filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/#how-to-add-code-snippets-to-rank-math-php

    Hope that helps.

    Thank you.

    You get me wrong. I am not complaining about feature.
    The problem is your code creates PHP warning.
    Means something wrong with the code itself.

    Hello,

    Please add the filter shared by my colleague to get rid of the warnings.

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

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Undefined variable $num_pastdue_actions’ is closed to new replies.