action_scheduler_claim_actions_order_by filter-hookWC 3.4.0

Sets the order-by clause used in the action claim query.

Usage

add_filter( 'action_scheduler_claim_actions_order_by', 'wp_kama_action_scheduler_claim_actions_order_by_filter', 10, 4 );

/**
 * Function for `action_scheduler_claim_actions_order_by` filter-hook.
 * 
 * @param string $order_by_sql           
 * @param        $attempts ASC           
 * @param        $scheduled_date_gmt ASC 
 * @param        $action_id ASC          
 *
 * @return string
 */
function wp_kama_action_scheduler_claim_actions_order_by_filter( $order_by_sql, $attempts ASC, $scheduled_date_gmt ASC, $action_id ASC ){

	// filter...
	return $order_by_sql;
}
$order_by_sql(string)
-
$attempts ASC
-
$scheduled_date_gmt ASC
-
$action_id ASC
-

Changelog

Since 3.4.0 Introduced.

Where the hook is called

ActionScheduler_DBStore::claim_actions()
action_scheduler_claim_actions_order_by
woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php 932
$order    = apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC' );

Where the hook is used in WooCommerce

Usage not found.