Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::set_email_sent()publicWC 1.0

Stores information about whether email was sent.

Method of the class: OrdersTableDataStore{}

No Hooks.

Return

null. Nothing.

Usage

$OrdersTableDataStore = new OrdersTableDataStore();
$OrdersTableDataStore->set_email_sent( $order, $set );
$order(\WC_Order) (required)
Order object.
$set(true|false) (required)
True or false.

OrdersTableDataStore::set_email_sent() code WC 7.1.0

public function set_email_sent( $order, $set ) {
	if ( is_int( $order ) ) {
		$order = wc_get_order( $order );
	}
	$order->set_new_order_email_sent( $set );
	$order->save();
}