Merge pull request #27723 from alexstewartja/master

Introduced fine-grained cultural adaptation for Jamaican-based WooCommerce stores
This commit is contained in:
Rodrigo Primo 2020-10-24 14:44:07 -03:00 committed by GitHub
commit 92153ac3b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 0 deletions

View File

@ -153,6 +153,15 @@ return array(
'weight_unit' => 'kg',
'dimension_unit' => 'cm',
),
'JM' => array(
'currency_code' => 'JMD',
'currency_pos' => 'left',
'thousand_sep' => ',',
'decimal_sep' => '.',
'num_decimals' => 2,
'weight_unit' => 'lbs',
'dimension_unit' => 'in',
),
'JP' => array(
'currency_code' => 'JPY',
'currency_pos' => 'left',

View File

@ -752,6 +752,22 @@ return array(
),
'IL' => array(),
'IM' => array(),
'JM' => array( // Jamaica's Parishes. Ref: https://en.wikipedia.org/wiki/ISO_3166-2:JM.
'JM-01' => __( 'Kingston', 'woocommerce' ),
'JM-02' => __( 'Saint Andrew', 'woocommerce' ),
'JM-03' => __( 'Saint Thomas', 'woocommerce' ),
'JM-04' => __( 'Portland', 'woocommerce' ),
'JM-05' => __( 'Saint Mary', 'woocommerce' ),
'JM-06' => __( 'Saint Ann', 'woocommerce' ),
'JM-07' => __( 'Trelawny', 'woocommerce' ),
'JM-08' => __( 'Saint James', 'woocommerce' ),
'JM-09' => __( 'Hanover', 'woocommerce' ),
'JM-10' => __( 'Westmoreland', 'woocommerce' ),
'JM-11' => __( 'Saint Elizabeth', 'woocommerce' ),
'JM-12' => __( 'Manchester', 'woocommerce' ),
'JM-13' => __( 'Clarendon', 'woocommerce' ),
'JM-14' => __( 'Saint Catherine', 'woocommerce' ),
),
/**
* Japan States.

View File

@ -520,6 +520,7 @@ class WC_Countries {
'IN' => "{company}\n{name}\n{address_1}\n{address_2}\n{city} {postcode}\n{state}, {country}",
'IS' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
'IT' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode}\n{city}\n{state_upper}\n{country}",
'JM' => "{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode_upper}\n{country}",
'JP' => "{postcode}\n{state} {city} {address_1}\n{address_2}\n{company}\n{last_name} {first_name}\n{country}",
'TW' => "{company}\n{last_name} {first_name}\n{address_1}\n{address_2}\n{state}, {city} {postcode}\n{country}",
'LI' => "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}",
@ -1069,6 +1070,19 @@ class WC_Countries {
'label' => __( 'Province', 'woocommerce' ),
),
),
'JM' => array(
'city' => array(
'label' => __( 'Town / City / Post Office', 'woocommerce' ),
),
'postcode' => array(
'required' => false,
'label' => __( 'Postal Code', 'woocommerce' ),
),
'state' => array(
'required' => true,
'label' => __( 'Parish', 'woocommerce' ),
),
),
'JP' => array(
'last_name' => array(
'class' => array( 'form-row-first' ),