Automattic\WooCommerce\Internal\PushNotifications\Notifications

NewOrderNotification::write_metapublicWC 1.0

{@inheritDoc}

Method of the class: NewOrderNotification{}

No Hooks.

Returns

null. Nothing (null).

Usage

$NewOrderNotification = new NewOrderNotification();
$NewOrderNotification->write_meta( $key ): void;
$key(string) (required)
The meta key.

NewOrderNotification::write_meta() code WC 10.9.1

public function write_meta( string $key ): void {
	$order = WC()->call_function( 'wc_get_order', $this->get_resource_id() );

	if ( $order instanceof WC_Order ) {
		$order->update_meta_data( $key, (string) time() );
		$order->save_meta_data();
	}
}