Fix notice in wc_postcode_location_matcher

This commit is contained in:
Mike Jolley 2016-05-26 15:09:03 +01:00
parent ddae9d3722
commit 690cd0804b
1 changed files with 2 additions and 2 deletions

View File

@ -1276,8 +1276,8 @@ function wc_postcode_location_matcher( $postcode, $objects, $object_id_key, $obj
// If the postcode is non-numeric, make it numeric.
if ( ! is_numeric( $min ) || ! is_numeric( $max ) ) {
$compare = wc_make_numeric_postcode( $compare );
$min = str_pad( wc_make_numeric_postcode( $min ), strlen( $encoded_postcode ), '0' );
$max = str_pad( wc_make_numeric_postcode( $max ), strlen( $encoded_postcode ), '0' );
$min = str_pad( wc_make_numeric_postcode( $min ), strlen( $compare ), '0' );
$max = str_pad( wc_make_numeric_postcode( $max ), strlen( $compare ), '0' );
}
if ( $compare >= $min && $compare <= $max ) {