WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

Checkout::get_request_payment_data() private WC 1.0

Gets and formats payment request data.

{} It's a method of the class: Checkout{}

No Hooks.

Return

Array.

Usage

// private - for code of main (parent) class only
$result = $this->get_request_payment_data( $request );
$request(WP_REST_Request) (required)
Request object.

Code of Checkout::get_request_payment_data() WC 5.8.0

private function get_request_payment_data( \WP_REST_Request $request ) {
	static $payment_data = [];
	if ( ! empty( $payment_data ) ) {
		return $payment_data;
	}
	if ( ! empty( $request['payment_data'] ) ) {
		foreach ( $request['payment_data'] as $data ) {
			$payment_data[ sanitize_key( $data['key'] ) ] = wc_clean( $data['value'] );
		}
	}

	return $payment_data;
}