Automattic\WooCommerce\Internal\PushNotifications\Triggers
StockNotificationRecoveryHandler::clear_meta
Clears the namespaced sent-meta for a given product and event subtype.
Method of the class: StockNotificationRecoveryHandler{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->clear_meta( $product_id, $event_type ): void;
- $product_id(int) (required)
- The product ID.
- $event_type(string) (required)
- One of the StockNotification::EVENT_* constants.
StockNotificationRecoveryHandler::clear_meta() StockNotificationRecoveryHandler::clear meta code WC 10.9.1
private function clear_meta( int $product_id, string $event_type ): void {
( new StockNotification( $product_id, $event_type ) )->delete_meta( NotificationProcessor::SENT_META_KEY );
}