-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshipping-rd.php
68 lines (59 loc) · 1.62 KB
/
shipping-rd.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
Plugin Name: Shipping RD
Plugin URI: https://anton.agency/woocommerce-envios-por-provincia-republica-dominicana/
Description: Zonas de envíos por provincia en República Dominicana.
Version: 0.0.1
Author: Anton Agency
Author URI: https://anton.agency
Text Domain: sr
Generated By: http://ensuredomains.com
*/
// If this file is called directly, abort. //
if ( ! defined( 'WPINC' ) ) {die;} // end if
// Let's Initialize Everything
if ( file_exists( plugin_dir_path( __FILE__ ) . 'core-init.php' ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'core-init.php' );
}
/**
* STATE ZONES LIST FOR DOMINICAN REPUBLIC
*/
add_filter( 'woocommerce_states', 'srd_add_custom_states_for_rd' );
function srd_add_custom_states_for_rd( $states ) {
$states['DO'] = array(
'DO1' => 'Distrito Nacional',
'DO2' => 'Azua',
'DO3' => 'Bahoruco',
'DO4' => 'Barahona',
'DO5' => 'Dajabón',
'DO6' => 'Duarte',
'DO7' => 'Elías Piña',
'DO8' => 'El Seibo',
'DO9' => 'Espaillat',
'DO10' => 'Hato Mayor',
'DO11' => 'Hermanas Mirabal',
'DO12' => 'Independencia',
'DO13' => 'La Altagracia',
'DO14' => 'La Romana',
'DO15' => 'La Vega',
'DO16' => '
María Trinidad Sánchez',
'DO17' => 'Monseñor Nouel',
'DO18' => 'Monte Cristi',
'DO19' => 'Monte Plata',
'DO20' => 'Pedernales',
'DO21' => 'Peravia',
'DO22' => 'Puerto Plata',
'DO23' => 'Samaná',
'DO24' => 'Sánchez Ramírez',
'DO25' => 'San Cristóbal',
'DO26' => 'San José de Ocoa',
'DO27' => 'San Juan',
'DO28' => 'San Pedro de Macorís',
'DO29' => 'Santiago',
'DO30' => 'Santiago Rodríguez',
'DO31' => 'Santo Domingo',
'DO32' => 'Valverde',
);
return $states;
}