Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableRefundDataStore::create()publicWC 1.0

Method to create a refund in the database.

{} It's a method of the class: OrdersTableRefundDataStore{}

No Hooks.

Return

null. Nothing.

Usage

$OrdersTableRefundDataStore = new OrdersTableRefundDataStore();
$OrdersTableRefundDataStore->create( $refund );
$refund(\WC_Abstract_Order) (required) (passed by reference — &)
Refund object.

Code of OrdersTableRefundDataStore::create() WC 7.1.0

public function create( &$refund ) {
	$refund->set_status( 'completed' ); // Refund are always marked completed.
	$this->persist_save( $refund );
}