Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableRefundDataStore::create
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() OrdersTableRefundDataStore::create code WC 10.3.6
public function create( &$refund ) {
$refund->set_status( 'completed' ); // Refund are always marked completed.
$this->persist_save( $refund );
}