Automattic\WooCommerce\Internal\PushNotifications\Notifications
StockNotification::meta_key
Scopes a delivery state meta key to this notification's stock event.
The same product can have low_stock, out_of_stock and on_backorder notifications in flight at once, so each event type needs its own claimed, sent and triggered markers.
Method of the class: StockNotification{}
No Hooks.
Returns
string.
Usage
// private - for code of main (parent) class only $result = $this->meta_key( $key ): string;
- $key(string) (required)
- The unscoped meta key.
Changelog
| Since 11.2.0 | Introduced. |
StockNotification::meta_key() StockNotification::meta key code WC 11.3.0
private function meta_key( string $key ): string {
return $key . '_' . $this->event_type;
}