Automattic\WooCommerce\StoreApi\Routes\V1\Agentic

CheckoutSessionsComplete::get_complete_paramsprotectedWC 1.0

Get the parameters for completing a checkout session.

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

Хуков нет.

Возвращает

Массив. Parameters array.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_complete_params();

Код CheckoutSessionsComplete::get_complete_params() WC 10.5.0

protected function get_complete_params() {
	$shared_params = AgenticCheckoutUtils::get_shared_params();

	return [
		'buyer'        => $shared_params['buyer'],
		'payment_data' => [
			'description' => __( 'Payment data including token and provider.', 'woocommerce' ),
			'type'        => 'object',
			'properties'  => [
				'token'           => [
					'description' => __( 'Payment token from the payment provider.', 'woocommerce' ),
					'type'        => 'string',
				],
				'provider'        => [
					'description' => __( 'Payment provider identifier.', 'woocommerce' ),
					'type'        => 'string',
					'enum'        => [ 'stripe' ],
				],
				'billing_address' => $shared_params['fulfillment_address'],
			],
			'required'    => [ 'token', 'provider' ],
		],
	];
}