Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableRefundDataStore::updatepublicWC 1.0

Update refund in database.

Method of the class: OrdersTableRefundDataStore{}

Hooks from the method

Returns

null. Nothing (null).

Usage

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

OrdersTableRefundDataStore::update() code WC 10.8.1

public function update( &$refund ) {
	$this->persist_updates( $refund );
	$refund->apply_changes();

	// phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment
	/**
	 * This action is documented in woocommerce/includes/data-stores/class-wc-order-refund-data-store-cpt.php.
	 */
	do_action( 'woocommerce_update_order_refund', $refund->get_id(), $refund );
	// phpcs:enable
}