Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableDataStore::set_email_sent
Stores information about whether email was sent.
Method of the class: OrdersTableDataStore{}
No Hooks.
Returns
null
. Nothing (null).
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() OrdersTableDataStore::set email sent code WC 9.9.5
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(); }