Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableRefundDataStore::create()
Method to create a refund in the database.
Method of the class: OrdersTableRefundDataStore{}
No Hooks.
Return
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 9.3.3
public function create( &$refund ) { $refund->set_status( 'completed' ); // Refund are always marked completed. $this->persist_save( $refund ); }