WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wc_get_wildcard_postcodes() WC 2.6.0

Return a list of potential postcodes for wildcard searching.

Хуков нет.

Возвращает

Строку[].

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

wc_get_wildcard_postcodes( $postcode, $country );
$postcode(строка) (обязательный)
Postcode.
$country(строка)
Country to format postcode for matching.
По умолчанию: ''

Список изменений

С версии 2.6.0 Введена.

Код wc get wildcard postcodes: woocommerce/includes/wc-core-functions.php WC 4.3.1

<?php
function wc_get_wildcard_postcodes( $postcode, $country = '' ) {
	$formatted_postcode = wc_format_postcode( $postcode, $country );
	$length             = function_exists( 'mb_strlen' ) ? mb_strlen( $formatted_postcode ) : strlen( $formatted_postcode );
	$postcodes          = array(
		$postcode,
		$formatted_postcode,
		$formatted_postcode . '*',
	);

	for ( $i = 0; $i < $length; $i ++ ) {
		$postcodes[] = ( function_exists( 'mb_substr' ) ? mb_substr( $formatted_postcode, 0, ( $i + 1 ) * -1 ) : substr( $formatted_postcode, 0, ( $i + 1 ) * -1 ) ) . '*';
	}

	return $postcodes;
}