Automattic\WooCommerce\Internal\PushNotifications\Notifications
NewOrderNotification::delete_meta
{@inheritDoc}
Method of the class: NewOrderNotification{}
No Hooks.
Returns
null. Nothing (null).
Usage
$NewOrderNotification = new NewOrderNotification(); $NewOrderNotification->delete_meta( $key ): void;
- $key(string) (required)
- The meta key.
NewOrderNotification::delete_meta() NewOrderNotification::delete meta code WC 10.9.1
public function delete_meta( string $key ): void {
$order = WC()->call_function( 'wc_get_order', $this->get_resource_id() );
if ( $order instanceof WC_Order ) {
$order->delete_meta_data( $key );
$order->save_meta_data();
}
}