Automattic\WooCommerce\Internal\Admin\Settings

PaymentsRestController::set_country()protectedWC 1.0

Set the country for the payment providers.

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

Хуков нет.

Возвращает

WP_Error|WP_REST_Response.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->set_country( $request );
$request(WP_REST_Request) (обязательный)
The request object.

Код PaymentsRestController::set_country() WC 9.6.1

protected function set_country( WP_REST_Request $request ) {
	$location = $request->get_param( 'location' );

	$result = $this->payments->set_country( $location );

	return rest_ensure_response( array( 'success' => $result ) );
}