Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableRefundDataStore::createpublicWC 1.0

Method to create a refund in the database.

Method of the class: OrdersTableRefundDataStore{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

OrdersTableRefundDataStore::create() code WC 10.3.6

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