Automattic\WooCommerce\Internal\Admin\Agentic

AgenticWebhookPayloadBuilder::build_refunds_dataprivateWC 1.0

Build refunds data for the order.

Method of the class: AgenticWebhookPayloadBuilder{}

No Hooks.

Returns

Array. Array of refunds.

Usage

// private - for code of main (parent) class only
$result = $this->build_refunds_data( $order ): array;
$order(WC_Order) (required)
Order object.

AgenticWebhookPayloadBuilder::build_refunds_data() code WC 10.7.0

private function build_refunds_data( WC_Order $order ): array {
	return array_map(
		array( $this, 'build_single_refund_data' ),
		$order->get_refunds()
	);
}