Automattic\WooCommerce\Admin\RemoteInboxNotifications
SpecRunner::get_actions
Get the actions for a note.
Метод класса: SpecRunner{}
Хуков нет.
Возвращает
Массив. The actions.
Использование
$result = SpecRunner::get_actions( $spec );
- $spec(объект) (обязательный)
- The spec.
Код SpecRunner::get_actions() SpecRunner::get actions WC 11.0.1
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();
}