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.
Method of the class: NotificationStepLogger{}
No Hooks.
Returns
void. Nothing (null).
Usage
$NotificationStepLogger = new NotificationStepLogger(); $NotificationStepLogger->log_suppressed_step( $notification, $step, $outcome, $context ): void;
- $notification(Notification) (required)
- The notification the step belongs to.
- $step(string) (required)
- Machine-readable step name, e.g.
token_excluded. - $outcome(string) (required)
- Machine-readable outcome, e.g.
notifications_off. - $context(array)
- Extra fields to store with the line.
Default:array()
Changelog
| Since 11.3.0 | Introduced. |
NotificationStepLogger::log_suppressed_step() NotificationStepLogger::log suppressed step code 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 );
}