Automattic\WooCommerce\Admin\RemoteInboxNotifications

SpecRunner::get_actions()public staticWC 1.0

Get the actions for a note.

{} Это метод класса: SpecRunner{}

Хуков нет.

Возвращает

Массив. The actions.

Использование

$result = SpecRunner::get_actions( $spec );
$spec(объект) (обязательный)
The spec.

Код SpecRunner::get_actions() WC 6.9.4

public static function get_actions( $spec ) {
	$note    = new Note();
	$actions = isset( $spec->actions ) ? $spec->actions : array();
	foreach ( $actions as $action ) {
		$action_locale = self::get_action_locale( $action->locales );

		$url = self::get_url( $action );

		$note->add_action(
			$action->name,
			( $action_locale === null || ! isset( $action_locale->label ) )
				? ''
				: $action_locale->label,
			$url,
			$action->status
		);
	}
	return $note->get_actions();
}