Automattic\WooCommerce\Internal\PushNotifications\Notifications

StockNotification::delete_meta │ public │ WC 1.0

{@inheritDoc}

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

Хуков нет.

Возвращает

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

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

$StockNotification = new StockNotification();
$StockNotification->delete_meta( $key ): void;
$key(строка) (обязательный)
The meta key.

Код StockNotification::delete_meta() WC 11.3.0

public function delete_meta( string $key ): void {
	$product = WC()->call_function( 'wc_get_product', $this->get_resource_id() );

	if ( $product instanceof WC_Product ) {
		$product->delete_meta_data( $this->meta_key( $key ) );
		$product->save_meta_data();
	}
}