Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.2.11 dev ma #196

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 209 additions & 0 deletions trunk/places/MA.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
<?php

/**
* $country places/cities/municipalities/districts
* - $count places/cities/municipalities/districts
*
* Source:
* - [Please add the source(s) link(s) to check the list of places]
*
* @author Your Name Here <[email protected]> | https://yourwebsite.com
* @version 1.0.0
* @license http://www.gnu.org/licenses/gpl-2.0.html
*/

global $places;

// Replace 'XX' code for your Country Code. E.g. 'NG' for Nigeria, 'CO' for Colombia, 'VE' for Venezuela, etc.
// Please refer to WooCommerce country codes : https://github.com/woocommerce/woocommerce/blob/master/i18n/countries.php
$places['MA'] = array(
// Replace 'AA' code with the code of the State you want to mapping this places
'06' => array( // Casablanca-Settat
'Casablanca',
'Mohammedia',
'El Jadid',
'Settat',
'Barrechid',
'Bouskoura',
'Moulay Abdallah',
'Aïn Harrouda',
'Benslimane',
'Sidi Bennour',
'Beni Yakhlef',
'Ad Darwa',
'Azemmour',
'Bouznika',
'Mediouna',
'Bou Ahmed',
'Tit Mellil',
'Douar Oulad Hssine',
'Sidi Smaïl',
'Oulad Hammou',
'Oulad Said',
'Douar Olad. Salem',
'Douar Ouled Ayad',
'Zawyat an Nwaçer'
),
'05' => array( // Béni Mellal-Khénifra
'Kouribga',
'Béni Mellal',
'Khénifra',
'Al Fqih Ben Salah',
'Oued Zem',
'Qasbat Tadla',
'Boujad',
'Mrirt',
'Aziylal',
'Aguelmous',
'Oulad Zemam',
'Dar Ould Zidouh',
'Demnat',
'Douar Oulad Aj-jabri',
'Oulad Yaïch',
'Zawyat ech Cheïkh',
'Ouaoula',
'Ayt Mohamed'
),
'08' => array( // Drâa-Tafilalet
'Errachidia',
'Warzat',
'Midalt',
'Tineghir',
'Zagora',
'Arfoud',
'Skoura'
),
'03' => array( // Fès-Meknès
'Fès',
'Meknès',
'Taza',
'Sefrou',
'Azrou',
'Taounate',
'El Hajeb',
'Fritissa',
'Aïn Taoujdat',
'Tahla',
'Sabaa Aiyoun',
'Bourdoud',
'Missour',
'Ain Aicha',
'Oulad Tayeb',
'Douar ’Ayn Dfali',
'Bni Frassen'
),
'10' => array( // Guelmim-Oued Noun
'Guelmim',
'Tan-Tan'
),
'02' => array( // Oriental
'Oujda-Angad',
'Taourirt',
'Nador',
'Berkane',
'Guercif',
'Beni Enzar',
'Al Aaroui',
'Jerada',
'El Aïoun',
'Zaïo',
'Zeghanghane',
'Bou Arfa'
),
'07' => array( // Marrakech-Safi
'El Kelaa des Srarhna',
'Marrakech',
'Safi',
'Ben Guerir',
'Essaouira',
'Youssoufia',
'Sa’ada',
'Ait Ourir',
'Loudaya',
'Tameslouht',
'Chichaoua',
'Aït Faska',
'Lamzoudia',
'El Ghiate',
'Echemmaia Est',
'Setti Fatma',
'Oulad Hassoune'
),
'04' => array( // Rabat-Salé-Kénitra
'Sale',
'Rabat',
'Kenitra',
'Temara',
'Al Khmissat',
'Sidi Slimane',
'Tiflet',
'Sidi Kacem',
'Skhirate',
'Sidi Yahya Zaer',
'Ain El Aouda',
'Sidi Mohamed Lahmar',
'Sidi Yahia El Gharb',
'Arbaoua',
'Bahharet Oulad Ayyad',
'Mechraa Bel Ksiri',
'Mograne',
'Lalla Mimouna',
'Souk et Tnine Jorf el Mellah',
'Mehdya',
'Dar Bel Hamri',
'Ksebia',
'Moulay Bousselham',
'Bouknadel',
'Safsaf',
'Khenichet-sur Ouerrha'
),
'' => array( // Souss-Massa
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that you forgot to add the state code here: 09

'Agadir',
'Ait Melloul',
'Inezgane',
'Oulad Teïma',
'Wislane',
'Lqoliaa',
'Taroudannt',
'Ait Ali',
'Tiznit',
'Temsia',
'Sidi Bibi',
'Biougra',
'Aourir',
'Bellaa',
'Oulad Barhil',
'Zawit Al Bour'
),
'01' => array( // Tanger-Tétouan-Al Hoceïma
'Tangier',
'Tétouan',
'Ksar El Kebir',
'Larache',
'Fnidq',
'Martil',
'Ouezzane',
'Al Hoceïma',
'M’diq',
'Chefchaouene',
'Zoumi',
'Laouamra',
'Mnasra',
'Imzouren',
'Asilah',
'Taza',
'Tamorot',
'Boureït',
'Gueznaia'
),
'12'=> array( // Dakhla-Oued Ed-Dahab
'Ad Dakhla'
),
'11'=> array( // Laâyoune-Sakia El Hamra
'Semara',
'Laâyoune',
'Tifariti',
'Boujdour',
'Aousserd'
)
);
42 changes: 42 additions & 0 deletions trunk/states/MA.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

/**
* $country states/provinces/regions
* - $count states/provinces/regions
*
* Source:
* - [Please add the source(s) link(s) to check the list of places]
*
* @author Your Name Here <[email protected]> | https://yourwebsite.com
* @version 1.0.0
* @license http://www.gnu.org/licenses/gpl-2.0.html
*/

global $states;

// Replace 'XX' code for your Country Code. E.g. 'NG' for Nigeria, 'CO' for Colombia, 'VE' for Venezuela, etc.
// Please refer to WooCommerce country codes : https://github.com/woocommerce/woocommerce/blob/master/i18n/countries.php
$states['MA'] = array(
// Some countries like Denmark or Belgium do not use the state field,
// if your country doesn't use it either, leave the array empty.
// E.g. $states['DK'] = array();

// Otherwise, if the state field is used in your country:
// Add a State Code to each State Name using a logic sense.
// E.g. 'FA' => 'Florida'
// You can use any standar like ISO, ANSI, etc. There is no an mandatory standar or system and you can use your own.
// Please see the U.S. state abbreviations to see an example:
// https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations
'05' => 'Béni Mellal-Khénifra',
'06' => 'Casablanca-Settat',
'12' => 'Dakhla-Oued Ed-Dahab', //TO BE ADDED
'08' => 'Drâa-Tafilalet',
'03' => 'Fès-Meknès',
'10' => 'Guelmim-Oued Noun',
'02' => "L'Oriental",
'11' => 'Laâyoune-Sakia El Hamra', //TO BE ADDED
'07' => 'Marrakech-Safi',
'04' => 'Rabat-Salé-Kénitra',
'09' => 'Souss-Massa',
'01' => 'Tanger-Tétouan-Al Hoceïma'
);