Automattic\WooCommerce\Internal\PushNotifications\Services
NotificationStepLogger::log_suppressed_step
Records a step for the tokens a notification was not sent to.
Goes to one store-wide source rather than a source per token, so the file count follows the notification types rather than every token the store holds. The tokens themselves are named in the context.
Метод класса: NotificationStepLogger{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$NotificationStepLogger = new NotificationStepLogger(); $NotificationStepLogger->log_suppressed_step( $notification, $step, $outcome, $context ): void;
- $notification(Notification) (обязательный)
- The notification the step belongs to.
- $step(строка) (обязательный)
- Machine-readable step name, e.g.
token_excluded. - $outcome(строка) (обязательный)
- Machine-readable outcome, e.g.
notifications_off. - $context(массив)
- Extra fields to store with the line.
По умолчанию:array()
Список изменений
| С версии 11.3.0 | Введена. |
Код NotificationStepLogger::log_suppressed_step() NotificationStepLogger::log suppressed step WC 11.3.0
public function log_suppressed_step( Notification $notification, string $step, string $outcome, array $context = array() ): void {
$this->write( $notification, $step, $outcome, $context, true );
}