Allows developers to modify the time limit (in seconds) for processing each batch of scheduled actions in Paid Memberships Pro.

apply_filters( 'pmpro_action_scheduler_time_limit_seconds', $time_limit );

By default, Action Scheduler will only process actions for a maximum of 30 seconds in each request. This time limit minimizes the risk of a script timeout on unknown hosting environments, some of which enforce 30-second timeouts.

If you know your host supports longer than this time limit for web requests, you can increase this time limit. This allows more actions to be processed in each request and reduces the lag between processing each queue, greatly speeding up the processing rate of scheduled actions.

We increase this for hosts like Pantheon to 120 and WP Engine to 60 automatically.

Parameters

$time_limit
int; The maximum time, in seconds, allowed for processing an Action Scheduler batch (default is 30 unless overridden).

Source

File: https://github.com/strangerstudios/paid-memberships-pro/blob/master/classes/class-pmpro-action-scheduler.php

View in Source Code

About Actions and Filters in PMPro

Hooks allow you to extend Paid Memberships Pro without editing any core plugin files. You can use a hook to program custom code that interacts with or modifies code in our plugin, Add Ons, your theme, and even WordPress itself.

There are two kinds of hooks: actions and filters.

  • Action hooks allow you to run new custom code at pre-defined locations.
  • Filter hooks allow you to change or extend existing code by modifying the data and returning it back to the software.

Click here to browse the full database of action and filter hooks available in Paid Memberships Pro. For help extending our Add Ons, refer to the individual Add On's documentation page for a list of available hooks.

For more developer-focused information about Paid Memberships Pro, check out the advanced developer topics documentation.

Was this article helpful?
YesNo