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        $claim_id      
 * @param        $hooks         
 * @param        $action_id ASC 
 *
 * @return string
 */
function wp_kama_action_scheduler_claim_actions_order_by_filter( $order_by_sql, $claim_id, $hooks, $action_id ASC ){

	// filter...
	return $order_by_sql;
}
$order_by_sql(string)
-
$claim_id
-
$hooks
-
$action_id ASC
-

Changelog

Since 3.4.0 Introduced.
Since 3.8.3 Made $claim_id and $hooks available.

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 1006
$order    = apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC', $claim_id, $hooks );

Where the hook is used in WooCommerce

Usage not found.