Automattic\WooCommerce\Internal\PushNotifications\Triggers

StockNotificationRecoveryHandler::clear_metaprivateWC 1.0

Clears the namespaced sent-meta for a given product and event subtype.

Метод класса: StockNotificationRecoveryHandler{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->clear_meta( $product_id, $event_type ): void;
$product_id(int) (обязательный)
The product ID.
$event_type(строка) (обязательный)
One of the StockNotification::EVENT_* constants.

Код StockNotificationRecoveryHandler::clear_meta() 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 );
}