Automattic\WooCommerce\Admin

PluginsHelper::get_action_data()public staticWC 1.0

Gets the plugin data for the first action.

Метод класса: PluginsHelper{}

No Hooks.

Return

Array. Array of action data.

Usage

$result = PluginsHelper::get_action_data( $actions );
$actions(array) (required)
Array of AS actions.

Code of PluginsHelper::get_action_data() WC 7.1.0

public static function get_action_data( $actions ) {
	$data = [];

	foreach ( $actions as $action_id => $action ) {
		$store  = new \ActionScheduler_DBStore();
		$status = $store->get_status( $action_id );
		$args   = $action->get_args();
		$data[] = array(
			'job_id'  => $args[1],
			'plugins' => $args[0],
			'status'  => $store->get_status( $action_id ),
		);
	}

	return $data;
}