WordPress at Your Fingertips
function is not described

WC_REST_Taxes_Controller::adjust_cities_and_postcodes() private WC 1.0

Convert array "cities" and "postcodes" parameters into semicolon-separated strings "city" and "postcode".

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->adjust_cities_and_postcodes( $request );
$request(WP_REST_Request) (required) (passed by reference — &)
The request to adjust.

Code of WC_REST_Taxes_Controller::adjust_cities_and_postcodes() WC 5.7.0

private function adjust_cities_and_postcodes( &$request ) {
	if ( isset( $request['cities'] ) ) {
		$request['city'] = join( ';', $request['cities'] );
	}
	if ( isset( $request['postcodes'] ) ) {
		$request['postcode'] = join( ';', $request['postcodes'] );
	}
}