Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableRefundDataStore::set_refund_props()privateWC 1.0

Helper method to set refund props.

Метод класса: OrdersTableRefundDataStore{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->set_refund_props( $refund );
$refund(\WC_Order) (required)
Refund object.

Code of OrdersTableRefundDataStore::set_refund_props() WC 7.1.0

private function set_refund_props( $refund ) {
	$refund->set_props(
		array(
			'amount'           => $refund->get_meta( '_refund_amount', true ),
			'refunded_by'      => $refund->get_meta( '_refunded_by', true ),
			'refunded_payment' => wc_string_to_bool( $refund->get_meta( '_refunded_payment', true ) ),
			'reason'           => $refund->get_meta( '_refund_reason', true ),
		)
	);
}