How to Run Huge Queries with Action Scheduler

[ad_1]

If you were, say, querying all orders in the last year and trying to output a certain sum from the query, does Action Scheduler keep the variable during the large query?

For example:

$data = [];
$huge_number_of_orders = wc_get_orders( $args );
foreach( $huge_number_of_orders as $order ) {
$data[] = $order[‘item’]; // example
}
print_r($data);

Action Scheduler says it times out after 30 seconds. Does it keep the variable populated between each iteration–even if it takes like an hour?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer