Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_cuba_provinces() {
- return array(
- 'CU-01' => 'Pinar del Río',
- 'CU-15' => 'Artemisa',
- 'CU-03' => 'La Habana',
- 'CU-16' => 'Mayabeque',
- 'CU-04' => 'Matanzas',
- 'CU-06' => 'Cienfuegos',
- 'CU-05' => 'Villa Clara',
- 'CU-07' => 'Sancti Spíritus',
- 'CU-08' => 'Ciego de Ávila',
- 'CU-09' => 'Camagüey',
- 'CU-10' => 'Las Tunas',
- 'CU-12' => 'Granma',
- 'CU-11' => 'Holguín',
- 'CU-13' => 'Santiago de Cuba',
- 'CU-14' => 'Guantánamo',
- 'CU-99' => 'Isla de la Juventud',
- );
- }
- add_filter('woocommerce_states', function($states) {
- $states['CU'] = get_cuba_provinces();
- return $states;
- });
- add_action('wcfmmp_store_lists_before_sidebar_location_filter', function(){
- ?>
- <style>
- .wcfmmp-store-lists-location-filter #wcfmmp_store_country + .select2 {
- display: none;
- }
- </style>
- <?php
- });
- add_action('before_wcfm_marketplace_settings', function() {
- ?>
- <style>
- .wcfm_marketplace_store_location_settings p.country,
- .wcfm_marketplace_store_location_settings select#country + .select2 {
- display: none;
- }
- </style>
- <?php
- });
- add_filter('wcfm_marketplace_settings_fields_address', function($fields, $vendor_id) {
- if(isset($fields['country'])) {
- $fields['country']['value'] = 'CU';
- }
- return $fields;
- }, 10, 2);
- add_filter('wcfmmp_stores_search_data', function($data) {
- $data['wcfmmp_store_country'] = 'CU';
- $_GET['wcfmmp_store_country'] = 'CU';
- return $data;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement