Plugin Directory

Changeset 3099889


Ignore:
Timestamp:
06/08/2024 10:17:13 PM (21 months ago)
Author:
saulmorales
Message:

tagging version 2.0.19

Location:
departamentos-y-ciudades-de-colombia-para-woocommerce
Files:
7 edited
9 copied

Legend:

Unmodified
Added
Removed
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/departamentos-y-ciudades-de-colombia-para-woocommerce.php

    r3084279 r3099889  
    33 * Plugin Name: Departamentos y Ciudades de Colombia para Woocommerce
    44 * Description: Plugin modificado con los departamentos y ciudades de Colombia
    5  * Version: 2.0.18
     5 * Version: 2.0.19
    66 * Author: Saul Morales Pacheco
    77 * Author URI: https://saulmoralespa.com
    88 * License: GNU General Public License v3.0
    9  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
     9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1010 * Text Domain: departamentos-y-ciudades-de-colombia-para-woocommerce
    1111 * Domain Path: /languages
    12  * WC tested up to: 8.5.1
     12 * WC tested up to: 8.9.2
    1313 * WC requires at least: 6.0
     14 * Requires Plugins: woocommerce
    1415 */
    1516
     
    4041        FALSE, dirname(plugin_basename(__FILE__)) . '/languages');
    4142
    42     if(!departamentos_ciudades_colombia_para_woocommerce_requirements()) return;
    43 
    4443    if (!class_exists('WC_States_Places_Colombia')) require_once ('includes/states-places.php');
    4544
     
    4948     * Instantiate class
    5049     */
    51     $GLOBALS['wc_states_places'] = new WC_States_Places_Colombia(__FILE__);
     50    new WC_States_Places_Colombia(__FILE__);
    5251
    5352    add_filter( 'woocommerce_shipping_methods', function ($methods){
     
    6766    add_action( 'woocommerce_shipping_init', 'filters_by_cities_method' );
    6867}
    69 
    70 function departamentos_ciudades_colombia_para_woocommerce_requirements(){
    71 
    72     if ( ! function_exists( 'is_plugin_active' ) ) require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
    73 
    74     if ( ! is_plugin_active(
    75         'woocommerce/woocommerce.php'
    76     ) ) {
    77         if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
    78             add_action(
    79                 'admin_notices',
    80                 function() {
    81                     states_places_colombia_smp_notices( 'Departamentos y Ciudades de Colombia para Woocommerce requiere que se encuentre instalado y activo el plugin: Woocommerce' );
    82                 }
    83             );
    84         }
    85         return false;
    86     }
    87 
    88     return true;
    89 }
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/includes/filter-by-cities.php

    r2977702 r3099889  
    188188
    189189                foreach ($zones as $zone){
    190                     if (strpos($zone->code, ':') !== false){
     190                    if (str_contains($zone->code, ':')){
    191191                        $place = explode(':', $zone->code );
    192192                        $states = WC_States_Places_Colombia::get_places( $place[0] );
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/includes/states-places.php

    r3084279 r3099889  
    44{
    55
    6     const VERSION = '2.0.18';
     6    const VERSION = '2.0.19';
    77    const CODE_COUNTRY = 'CO';
    88    private static $places;
     
    5353    /**
    5454     * Implement WC States
    55      * @param mixed $states
    56      * @return mixed
    57      */
    58     public function wc_states($states)
     55     * @param array $states
     56     * @return array
     57     */
     58    public function wc_states(array $states): array
    5959    {
    6060        if (file_exists(self::get_plugin_path() . '/states/' . self::CODE_COUNTRY . '.php')) {
    61             include(self::get_plugin_path() . '/states/' . self::CODE_COUNTRY . '.php');
     61            $states[self::CODE_COUNTRY] = include(self::get_plugin_path() . '/states/' . self::CODE_COUNTRY . '.php');
    6262        }
    6363
     
    156156            if ( $current_sc ) {
    157157                $dropdown_places = $places[ $current_sc ];
    158             } else if ( is_array($places) &&  isset($places[0])) {
     158            } else if (isset($places[0])) {
    159159                $dropdown_places = array_reduce( $places, 'array_merge', array() );
    160160                sort( $dropdown_places );
     
    200200
    201201        if ( ! is_null( $p_code ) ) {
    202             return isset( self::$places[ $p_code ] ) ? self::$places[ $p_code ] : false;
     202            return self::$places[$p_code] ?? false;
    203203        } else {
    204204            return self::$places;
     
    229229        if ( $is_page ) {
    230230            $city_select_path = self::get_plugin_url() . 'js/place-select.js';
    231             wp_enqueue_script( 'wc-city-select', $city_select_path, array( 'jquery', 'wc-country-select'), self::VERSION, true );
     231            wp_enqueue_script( 'wc-city-select', $city_select_path, array( 'jquery', 'wc-country-select'), self::VERSION, ['strategy' => 'defer'] );
    232232
    233233            $places = json_encode( self::get_places() );
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/js/place-select.js

    r3084279 r3099889  
    8787
    8888    elBodyDPWoo.on( 'change', 'select.state_select, #calc_shipping_state', function() {
    89     var $container = $( this ).closest( 'div.woocommerce-billing-fields, div.woocommerce-shipping-fields, form.woocommerce-shipping-calculator, form.woocommerce-checkout, form.mvx_shop_settings_form' );
     89    var $container = $( this ).closest( 'div.woocommerce-billing-fields, div.woocommerce-shipping-fields, form.woocommerce-shipping-calculator, form.mvx_shop_settings_form' );
    9090    var country = $container.find( '#billing_country, #shipping_country, #calc_shipping_country, #vendor_country' ).val();
    9191    var state = $( this ).val();
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/places/CO.php

    r3084279 r3099889  
    55 *
    66 * @author   Saul Morales Pacheco <moralespachecopablo@gmail.com>
    7  * @version  2.0.18
    8  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     7 * @version  2.0.19
     8 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU Public License
    99 */
    1010global $places;
    1111
    12 $places['CO'] = array(
    13     'AMZ' => array(
     12$places[ 'CO' ] = array(
     13    'AMZ' => array(
    1414        "El encanto",
    1515        "La Chorrera",
     
    2323        "Puerto Santander",
    2424        "Tarapacá"
    25         ),
    26     'ANT' => array(
     25    ),
     26    'ANT' => array(
    2727        "Abejorral",
    2828        "Abriaqui",
     
    177177        "Zaragoza",
    178178        "Zungo carretera"
    179         ),
    180     'ARU' => array(
     179    ),
     180    'ARU' => array(
    181181        "Arauca",
    182182        "Arauquita",
     
    189189        "Saravena",
    190190        "Tame"
    191         ),
    192     'ATL' => array(
     191    ),
     192    'ATL' => array(
    193193        "Arroyo de piedra",
    194194        "Baranoa",
     
    224224        "Tubara",
    225225        "Usiacuri"
    226         ),
    227     'BOG' => array(
    228         'Bogotá'
    229     ),
    230     'BOL' => array(
     226    ),
     227    'BOG' => array(
     228        'Bogotá'
     229    ),
     230    'BOL' => array(
    231231        "Achi",
    232232        "Arenal",
     
    280280        "Villanueva",
    281281        "Zambrano"
    282         ),
    283     'BOY' => array(
     282    ),
     283    'BOY' => array(
    284284        "Almeida",
    285285        "Aquitania",
     
    410410        "Viracacha",
    411411        "Zetaquira"
    412         ),
    413     'CAL' => array(
     412    ),
     413    'CAL' => array(
    414414        "Aguadas",
    415415        "Anserma",
     
    454454        "Villamaria",
    455455        "Viterbo"
    456         ),
    457     'CAQ' => array(
     456    ),
     457    'CAQ' => array(
    458458        "Albania",
    459459        "Belen de los andaquies",
     
    471471        "Solita",
    472472        "Valparaiso"
    473         ),
    474     'CAS' => array(
     473    ),
     474    'CAS' => array(
    475475        "Aguaclara",
    476476        "Aguazul",
     
    497497        "Villanueva",
    498498        "Yopal"
    499         ),
    500     'CAU' => array(
     499    ),
     500    'CAU' => array(
    501501        "Almaguer",
    502502        "Argelia",
     
    540540        "Totoró",
    541541        "Villa Rica"
    542         ),
    543     'CES' => array(
     542    ),
     543    'CES' => array(
    544544        "Aguachica",
    545545        "Arjona",
     
    573573        "Tamalameque",
    574574        "Valledupar"
    575         ),
    576     'CHO' => array(
     575    ),
     576    'CHO' => array(
    577577        "Acandi",
    578578        "Alto baudo",
     
    602602        "Unguia",
    603603        "Yuto"
    604         ),
    605     'COR' => array(
     604    ),
     605    'COR' => array(
    606606        "Ayapel",
    607607        "Buena vista",
     
    642642        "Valencia",
    643643        "Villa fatima"
    644         ),
    645     'CUN' => array(
     644    ),
     645    'CUN' => array(
    646646        "Agua de dios",
    647647        "Alban",
     
    781781        "Zipacon",
    782782        "Zipaquira"
    783         ),
    784     'GUA' => array(
     783    ),
     784    'GUA' => array(
    785785        "Cacahual",
    786786        "Guaviare",
     
    790790        "Puerto Colombia",
    791791        "San Felipe"
    792         ),
    793     'GUV' => array(
     792    ),
     793    'GUV' => array(
    794794        "Calamar",
    795795        "El Retorno",
    796796        "Miraflores",
    797797        "San jose del guaviare"
    798         ),
    799     'HUI' => array(
     798    ),
     799    'HUI' => array(
    800800        "Acevedo",
    801801        "Agrado",
     
    838838        "Villa vieja",
    839839        "Yaguara"
    840         ),
    841     'GUJ' => array(
     840    ),
     841    'GUJ' => array(
    842842        "Albania",
    843843        "Barrancas",
     
    856856        "Urumita",
    857857        "Villanueva"
    858         ),
    859     'MAG' => array(
     858    ),
     859    'MAG' => array(
    860860        "Algarrobo",
    861861        "Aracataca",
     
    899899        "Tenerife",
    900900        "Tucurinca"
    901         ),
    902     'MET' => array(
     901    ),
     902    'MET' => array(
    903903        "Acacias",
    904904        "Apiay",
     
    923923        "Villavicencio",
    924924        "Vista hermosa"
    925         ),
    926     'NAR' => array(
     925    ),
     926    'NAR' => array(
    927927        "Aldana",
    928928        "Altaquer",
     
    10101010        "Tuquerres",
    10111011        "Yacuanquer"
    1012         ),
    1013     'NOR' => array(
     1012    ),
     1013    'NOR' => array(
    10141014        "Ábrego",
    10151015        "Arboledas",
     
    10501050        "Villa Caro",
    10511051        "Villa del Rosario"
    1052         ),
    1053     'PUT' => array(
     1052    ),
     1053    'PUT' => array(
    10541054        "Colon",
    10551055        "El tigre",
     
    10681068        "Sibundoy",
    10691069        "Villagarzon"
    1070         ),
    1071     'QUI' => array(
     1070    ),
     1071    'QUI' => array(
    10721072        "Armenia",
    10731073        "Barcelona",
     
    10831083        "Quimbaya",
    10841084        "Salento"
    1085         ),
    1086     'RIS' => array(
     1085    ),
     1086    'RIS' => array(
    10871087        "Apia",
    10881088        "Balboa",
     
    11011101        "Santa Rosa de Cabal",
    11021102        "Santuario"
    1103         ),
    1104     'SAP' => array(
     1103    ),
     1104    'SAP' => array(
    11051105        "Providencia",
    11061106        "San andres isla",
    11071107        "Santa catalina"
    1108         ),
    1109     'SAN' => array(
     1108    ),
     1109    'SAN' => array(
    11101110        "Acapulco",
    11111111        "Aguada",
     
    11801180        "Villanueva",
    11811181        "Zapatoca"
    1182         ),
    1183     'SUC' => array(
     1182    ),
     1183    'SUC' => array(
    11841184        "Caimito",
    11851185        "Corozal",
     
    12021202        "Tolu",
    12031203        "Tolu viejo"
    1204         ),
    1205     'TOL' => array(
     1204    ),
     1205    'TOL' => array(
    12061206        "Alpujarra",
    12071207        "Alvarado",
     
    12841284        "Villarestrepo",
    12851285        "Villa rica"
    1286         ),
    1287     'VAC' => array(
     1286    ),
     1287    'VAC' => array(
    12881288        "Alcala",
    12891289        "Andalucía",
     
    13301330        "Yumbo",
    13311331        "Zarzal"
    1332         ),
    1333     'VAU' => array(
     1332    ),
     1333    'VAU' => array(
    13341334        "Acaricuara",
    13351335        "Carurú",
     
    13391339        "Tío barbas",
    13401340        "Yavaraté"
    1341         ),
    1342     'VIC' => array(
     1341    ),
     1342    'VIC' => array(
    13431343        "Cumaribo",
    13441344        "La primavera",
    13451345        "Puerto carreño",
    13461346        "Santa rosalia"
    1347         )
    1348     );
     1347    )
     1348);
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/readme.txt

    r3084279 r3099889  
    22Contributors: saulmorales
    33Donate link: https://saulmoralespa.com/donation
    4 Tags: woocommerce, Colombia, departamentos, ciudades, states cities,woocommerce departamentos de Colombia, woocommerce ciudades de Colombia, desplegable, departamentos desplegables, ciudades desplegables, city dropdown, state dropdown, city select, cities select,
    5 seleccionar ciudades,seleccionar departamentos
    6 Requires PHP: 7.3
     4Tags: Colombia, departamentos, ciudades,woocommerce departamentos de Colombia, woocommerce ciudades de Colombia
     5Requires PHP: 8.0
    76Requires at least: 6.0
    8 Tested up to: 6.5.3
    9 Stable tag: 2.0.18
    10 License: GNU General Public License v3.0
    11 License URI: http://www.gnu.org/licenses/gpl-3.0.html
     7Tested up to: 6.5.4
     8Stable tag: 2.0.19
     9License: GPLv3
     10License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1211
    1312WordPress plugin that shows dropdowns for State and City Select for WooCommerce
     
    8584
    8685== Changelog ==
    87 = 1.0 =
    88 * 24/10/2016 First release.
    89 = 1.1 =
    90 * Added Bogotá D.C as state and localities.
    91 = 1.1.2 =
    92 * Eliminated localities of Bogotá D.C
    93 = 1.1.3 =
    94 * Added method shipping filter for city
    95 = 1.1.4 =
    96 * added languages Spanish Colombia and fixed state
    97 = 1.1.7 =
    98 * added cost of shipping class
    99 = 1.1.17 =
    100 * added new cities
    101 = 1.1.18 =
    102 * fixed delete other methods shipping
    103 = 1.1.19 =
    104 * added optional single method
    105 = 1.1.20 =
    106 * added order of fields state and city
    107 = 1.1.21 =
    108 * update readme version Woocommerce
    109 = 1.1.22 =
    110 * update readme version
    111 = 1.1.23 =
    112 * update cities
    113 = 1.1.24 =
    114 * update notices
    115 = 1.1.25 =
    116 * update city Codazzi, Cesar
    117 = 1.1.26 =
    118 * fixed class cost
    119 = 1.1.27 =
    120 *  Updated wp compatible version
    121 = 1.1.28 =
    122 *  Updated priority states and places
    123 = 1.1.29 =
    124 *  compatibility with version 5.5  of WordPress
    125 = 1.1.30 =
    126 *  Added cities in Antioquia and Casanare
    127 = 1.1.31 =
    128 *  Updated cities in Cauca and Valle del Cauca
    129 = 1.1.32 =
    130 * Updated readme version WordPress
    131 = 1.1.33 =
    132 * Updated readme version WordPress
    13386= 2.0.0 =
    13487* Added Bogotá D.C as state and localities
     
    170123= 2.0.18 =
    171124* Updated compatibility with FunnelKit Checkout
     125= 2.0.19 =
     126* Fixed load states
     127* Fixed load selectWoo, used strategy defer
  • departamentos-y-ciudades-de-colombia-para-woocommerce/tags/2.0.19/states/CO.php

    r3084279 r3099889  
    44 *
    55 * @author   Saul Morales Pacheco <moralespachecopablo@gmail.com>
    6  * @version  2.0.18
    7  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     6 * @version  2.0.19
     7 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU Public License
    88 */
    99
    10 global $states;
    11 
    12 $states ['CO' ] = array (
    13     'AMZ' => 'Amazonas',
    14     'ANT' => 'Antioquia',
    15     'ARU' => 'Arauca',
    16     'ATL' => 'Atlántico',
    17     'BOG' => 'Bogotá',
    18     'BOL' => 'Bolívar',
    19     'BOY' => 'Boyacá',
    20     'CAL' => 'Caldas',
    21     'CAQ' => 'Caquetá',
    22     'CAS' => 'Casanare',
    23     'CAU' => 'Cauca',
    24     'CES' => 'Cesar',
    25     'CHO' => 'Chocó',
    26     'COR' => 'Córdoba',
    27     'CUN' => 'Cundinamarca',
    28     'GUA' => 'Guainía',
    29     'GUV' => 'Guaviare',
    30     'HUI' => 'Huila',
    31     'GUJ' => 'La Guajira' ,
    32     'MAG' => 'Magdalena',
    33     'MET' => 'Meta',
    34     'NAR' => 'Nariño',
    35     'NOR' => 'Norte de Santander',
    36     'PUT' => 'Putumayo',
    37     'QUI' => 'Quindío',
    38     'RIS' => 'Risaralda',
    39     'SAP' => 'San Andrés y Providencia',
    40     'SAN' => 'Santander',
    41     'SUC' => 'Sucre',
    42     'TOL' => 'Tolima',
    43     'VAC' => 'Valle del Cauca',
    44     'VAU' => 'Vaupés',
    45     'VIC' => 'Vichada'
    46     );
     10return array (
     11    'AMZ' => 'Amazonas',
     12    'ANT' => 'Antioquia',
     13    'ARU' => 'Arauca',
     14    'ATL' => 'Atlántico',
     15    'BOG' => 'Bogotá',
     16    'BOL' => 'Bolívar',
     17    'BOY' => 'Boyacá',
     18    'CAL' => 'Caldas',
     19    'CAQ' => 'Caquetá',
     20    'CAS' => 'Casanare',
     21    'CAU' => 'Cauca',
     22    'CES' => 'Cesar',
     23    'CHO' => 'Chocó',
     24    'COR' => 'Córdoba',
     25    'CUN' => 'Cundinamarca',
     26    'GUA' => 'Guainía',
     27    'GUV' => 'Guaviare',
     28    'HUI' => 'Huila',
     29    'GUJ' => 'La Guajira' ,
     30    'MAG' => 'Magdalena',
     31    'MET' => 'Meta',
     32    'NAR' => 'Nariño',
     33    'NOR' => 'Norte de Santander',
     34    'PUT' => 'Putumayo',
     35    'QUI' => 'Quindío',
     36    'RIS' => 'Risaralda',
     37    'SAP' => 'San Andrés y Providencia',
     38    'SAN' => 'Santander',
     39    'SUC' => 'Sucre',
     40    'TOL' => 'Tolima',
     41    'VAC' => 'Valle del Cauca',
     42    'VAU' => 'Vaupés',
     43    'VIC' => 'Vichada'
     44);
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/departamentos-y-ciudades-de-colombia-para-woocommerce.php

    r3084279 r3099889  
    33 * Plugin Name: Departamentos y Ciudades de Colombia para Woocommerce
    44 * Description: Plugin modificado con los departamentos y ciudades de Colombia
    5  * Version: 2.0.18
     5 * Version: 2.0.19
    66 * Author: Saul Morales Pacheco
    77 * Author URI: https://saulmoralespa.com
    88 * License: GNU General Public License v3.0
    9  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
     9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1010 * Text Domain: departamentos-y-ciudades-de-colombia-para-woocommerce
    1111 * Domain Path: /languages
    12  * WC tested up to: 8.5.1
     12 * WC tested up to: 8.9.2
    1313 * WC requires at least: 6.0
     14 * Requires Plugins: woocommerce
    1415 */
    1516
     
    4041        FALSE, dirname(plugin_basename(__FILE__)) . '/languages');
    4142
    42     if(!departamentos_ciudades_colombia_para_woocommerce_requirements()) return;
    43 
    4443    if (!class_exists('WC_States_Places_Colombia')) require_once ('includes/states-places.php');
    4544
     
    4948     * Instantiate class
    5049     */
    51     $GLOBALS['wc_states_places'] = new WC_States_Places_Colombia(__FILE__);
     50    new WC_States_Places_Colombia(__FILE__);
    5251
    5352    add_filter( 'woocommerce_shipping_methods', function ($methods){
     
    6766    add_action( 'woocommerce_shipping_init', 'filters_by_cities_method' );
    6867}
    69 
    70 function departamentos_ciudades_colombia_para_woocommerce_requirements(){
    71 
    72     if ( ! function_exists( 'is_plugin_active' ) ) require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
    73 
    74     if ( ! is_plugin_active(
    75         'woocommerce/woocommerce.php'
    76     ) ) {
    77         if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
    78             add_action(
    79                 'admin_notices',
    80                 function() {
    81                     states_places_colombia_smp_notices( 'Departamentos y Ciudades de Colombia para Woocommerce requiere que se encuentre instalado y activo el plugin: Woocommerce' );
    82                 }
    83             );
    84         }
    85         return false;
    86     }
    87 
    88     return true;
    89 }
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/includes/filter-by-cities.php

    r2977702 r3099889  
    188188
    189189                foreach ($zones as $zone){
    190                     if (strpos($zone->code, ':') !== false){
     190                    if (str_contains($zone->code, ':')){
    191191                        $place = explode(':', $zone->code );
    192192                        $states = WC_States_Places_Colombia::get_places( $place[0] );
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/includes/states-places.php

    r3084279 r3099889  
    44{
    55
    6     const VERSION = '2.0.18';
     6    const VERSION = '2.0.19';
    77    const CODE_COUNTRY = 'CO';
    88    private static $places;
     
    5353    /**
    5454     * Implement WC States
    55      * @param mixed $states
    56      * @return mixed
    57      */
    58     public function wc_states($states)
     55     * @param array $states
     56     * @return array
     57     */
     58    public function wc_states(array $states): array
    5959    {
    6060        if (file_exists(self::get_plugin_path() . '/states/' . self::CODE_COUNTRY . '.php')) {
    61             include(self::get_plugin_path() . '/states/' . self::CODE_COUNTRY . '.php');
     61            $states[self::CODE_COUNTRY] = include(self::get_plugin_path() . '/states/' . self::CODE_COUNTRY . '.php');
    6262        }
    6363
     
    156156            if ( $current_sc ) {
    157157                $dropdown_places = $places[ $current_sc ];
    158             } else if ( is_array($places) &&  isset($places[0])) {
     158            } else if (isset($places[0])) {
    159159                $dropdown_places = array_reduce( $places, 'array_merge', array() );
    160160                sort( $dropdown_places );
     
    200200
    201201        if ( ! is_null( $p_code ) ) {
    202             return isset( self::$places[ $p_code ] ) ? self::$places[ $p_code ] : false;
     202            return self::$places[$p_code] ?? false;
    203203        } else {
    204204            return self::$places;
     
    229229        if ( $is_page ) {
    230230            $city_select_path = self::get_plugin_url() . 'js/place-select.js';
    231             wp_enqueue_script( 'wc-city-select', $city_select_path, array( 'jquery', 'wc-country-select'), self::VERSION, true );
     231            wp_enqueue_script( 'wc-city-select', $city_select_path, array( 'jquery', 'wc-country-select'), self::VERSION, ['strategy' => 'defer'] );
    232232
    233233            $places = json_encode( self::get_places() );
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/js/place-select.js

    r3084279 r3099889  
    8787
    8888    elBodyDPWoo.on( 'change', 'select.state_select, #calc_shipping_state', function() {
    89     var $container = $( this ).closest( 'div.woocommerce-billing-fields, div.woocommerce-shipping-fields, form.woocommerce-shipping-calculator, form.woocommerce-checkout, form.mvx_shop_settings_form' );
     89    var $container = $( this ).closest( 'div.woocommerce-billing-fields, div.woocommerce-shipping-fields, form.woocommerce-shipping-calculator, form.mvx_shop_settings_form' );
    9090    var country = $container.find( '#billing_country, #shipping_country, #calc_shipping_country, #vendor_country' ).val();
    9191    var state = $( this ).val();
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/places/CO.php

    r3084279 r3099889  
    55 *
    66 * @author   Saul Morales Pacheco <moralespachecopablo@gmail.com>
    7  * @version  2.0.18
    8  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     7 * @version  2.0.19
     8 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU Public License
    99 */
    1010global $places;
    1111
    12 $places['CO'] = array(
    13     'AMZ' => array(
     12$places[ 'CO' ] = array(
     13    'AMZ' => array(
    1414        "El encanto",
    1515        "La Chorrera",
     
    2323        "Puerto Santander",
    2424        "Tarapacá"
    25         ),
    26     'ANT' => array(
     25    ),
     26    'ANT' => array(
    2727        "Abejorral",
    2828        "Abriaqui",
     
    177177        "Zaragoza",
    178178        "Zungo carretera"
    179         ),
    180     'ARU' => array(
     179    ),
     180    'ARU' => array(
    181181        "Arauca",
    182182        "Arauquita",
     
    189189        "Saravena",
    190190        "Tame"
    191         ),
    192     'ATL' => array(
     191    ),
     192    'ATL' => array(
    193193        "Arroyo de piedra",
    194194        "Baranoa",
     
    224224        "Tubara",
    225225        "Usiacuri"
    226         ),
    227     'BOG' => array(
    228         'Bogotá'
    229     ),
    230     'BOL' => array(
     226    ),
     227    'BOG' => array(
     228        'Bogotá'
     229    ),
     230    'BOL' => array(
    231231        "Achi",
    232232        "Arenal",
     
    280280        "Villanueva",
    281281        "Zambrano"
    282         ),
    283     'BOY' => array(
     282    ),
     283    'BOY' => array(
    284284        "Almeida",
    285285        "Aquitania",
     
    410410        "Viracacha",
    411411        "Zetaquira"
    412         ),
    413     'CAL' => array(
     412    ),
     413    'CAL' => array(
    414414        "Aguadas",
    415415        "Anserma",
     
    454454        "Villamaria",
    455455        "Viterbo"
    456         ),
    457     'CAQ' => array(
     456    ),
     457    'CAQ' => array(
    458458        "Albania",
    459459        "Belen de los andaquies",
     
    471471        "Solita",
    472472        "Valparaiso"
    473         ),
    474     'CAS' => array(
     473    ),
     474    'CAS' => array(
    475475        "Aguaclara",
    476476        "Aguazul",
     
    497497        "Villanueva",
    498498        "Yopal"
    499         ),
    500     'CAU' => array(
     499    ),
     500    'CAU' => array(
    501501        "Almaguer",
    502502        "Argelia",
     
    540540        "Totoró",
    541541        "Villa Rica"
    542         ),
    543     'CES' => array(
     542    ),
     543    'CES' => array(
    544544        "Aguachica",
    545545        "Arjona",
     
    573573        "Tamalameque",
    574574        "Valledupar"
    575         ),
    576     'CHO' => array(
     575    ),
     576    'CHO' => array(
    577577        "Acandi",
    578578        "Alto baudo",
     
    602602        "Unguia",
    603603        "Yuto"
    604         ),
    605     'COR' => array(
     604    ),
     605    'COR' => array(
    606606        "Ayapel",
    607607        "Buena vista",
     
    642642        "Valencia",
    643643        "Villa fatima"
    644         ),
    645     'CUN' => array(
     644    ),
     645    'CUN' => array(
    646646        "Agua de dios",
    647647        "Alban",
     
    781781        "Zipacon",
    782782        "Zipaquira"
    783         ),
    784     'GUA' => array(
     783    ),
     784    'GUA' => array(
    785785        "Cacahual",
    786786        "Guaviare",
     
    790790        "Puerto Colombia",
    791791        "San Felipe"
    792         ),
    793     'GUV' => array(
     792    ),
     793    'GUV' => array(
    794794        "Calamar",
    795795        "El Retorno",
    796796        "Miraflores",
    797797        "San jose del guaviare"
    798         ),
    799     'HUI' => array(
     798    ),
     799    'HUI' => array(
    800800        "Acevedo",
    801801        "Agrado",
     
    838838        "Villa vieja",
    839839        "Yaguara"
    840         ),
    841     'GUJ' => array(
     840    ),
     841    'GUJ' => array(
    842842        "Albania",
    843843        "Barrancas",
     
    856856        "Urumita",
    857857        "Villanueva"
    858         ),
    859     'MAG' => array(
     858    ),
     859    'MAG' => array(
    860860        "Algarrobo",
    861861        "Aracataca",
     
    899899        "Tenerife",
    900900        "Tucurinca"
    901         ),
    902     'MET' => array(
     901    ),
     902    'MET' => array(
    903903        "Acacias",
    904904        "Apiay",
     
    923923        "Villavicencio",
    924924        "Vista hermosa"
    925         ),
    926     'NAR' => array(
     925    ),
     926    'NAR' => array(
    927927        "Aldana",
    928928        "Altaquer",
     
    10101010        "Tuquerres",
    10111011        "Yacuanquer"
    1012         ),
    1013     'NOR' => array(
     1012    ),
     1013    'NOR' => array(
    10141014        "Ábrego",
    10151015        "Arboledas",
     
    10501050        "Villa Caro",
    10511051        "Villa del Rosario"
    1052         ),
    1053     'PUT' => array(
     1052    ),
     1053    'PUT' => array(
    10541054        "Colon",
    10551055        "El tigre",
     
    10681068        "Sibundoy",
    10691069        "Villagarzon"
    1070         ),
    1071     'QUI' => array(
     1070    ),
     1071    'QUI' => array(
    10721072        "Armenia",
    10731073        "Barcelona",
     
    10831083        "Quimbaya",
    10841084        "Salento"
    1085         ),
    1086     'RIS' => array(
     1085    ),
     1086    'RIS' => array(
    10871087        "Apia",
    10881088        "Balboa",
     
    11011101        "Santa Rosa de Cabal",
    11021102        "Santuario"
    1103         ),
    1104     'SAP' => array(
     1103    ),
     1104    'SAP' => array(
    11051105        "Providencia",
    11061106        "San andres isla",
    11071107        "Santa catalina"
    1108         ),
    1109     'SAN' => array(
     1108    ),
     1109    'SAN' => array(
    11101110        "Acapulco",
    11111111        "Aguada",
     
    11801180        "Villanueva",
    11811181        "Zapatoca"
    1182         ),
    1183     'SUC' => array(
     1182    ),
     1183    'SUC' => array(
    11841184        "Caimito",
    11851185        "Corozal",
     
    12021202        "Tolu",
    12031203        "Tolu viejo"
    1204         ),
    1205     'TOL' => array(
     1204    ),
     1205    'TOL' => array(
    12061206        "Alpujarra",
    12071207        "Alvarado",
     
    12841284        "Villarestrepo",
    12851285        "Villa rica"
    1286         ),
    1287     'VAC' => array(
     1286    ),
     1287    'VAC' => array(
    12881288        "Alcala",
    12891289        "Andalucía",
     
    13301330        "Yumbo",
    13311331        "Zarzal"
    1332         ),
    1333     'VAU' => array(
     1332    ),
     1333    'VAU' => array(
    13341334        "Acaricuara",
    13351335        "Carurú",
     
    13391339        "Tío barbas",
    13401340        "Yavaraté"
    1341         ),
    1342     'VIC' => array(
     1341    ),
     1342    'VIC' => array(
    13431343        "Cumaribo",
    13441344        "La primavera",
    13451345        "Puerto carreño",
    13461346        "Santa rosalia"
    1347         )
    1348     );
     1347    )
     1348);
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/readme.txt

    r3084279 r3099889  
    22Contributors: saulmorales
    33Donate link: https://saulmoralespa.com/donation
    4 Tags: woocommerce, Colombia, departamentos, ciudades, states cities,woocommerce departamentos de Colombia, woocommerce ciudades de Colombia, desplegable, departamentos desplegables, ciudades desplegables, city dropdown, state dropdown, city select, cities select,
    5 seleccionar ciudades,seleccionar departamentos
    6 Requires PHP: 7.3
     4Tags: Colombia, departamentos, ciudades,woocommerce departamentos de Colombia, woocommerce ciudades de Colombia
     5Requires PHP: 8.0
    76Requires at least: 6.0
    8 Tested up to: 6.5.3
    9 Stable tag: 2.0.18
    10 License: GNU General Public License v3.0
    11 License URI: http://www.gnu.org/licenses/gpl-3.0.html
     7Tested up to: 6.5.4
     8Stable tag: 2.0.19
     9License: GPLv3
     10License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1211
    1312WordPress plugin that shows dropdowns for State and City Select for WooCommerce
     
    8584
    8685== Changelog ==
    87 = 1.0 =
    88 * 24/10/2016 First release.
    89 = 1.1 =
    90 * Added Bogotá D.C as state and localities.
    91 = 1.1.2 =
    92 * Eliminated localities of Bogotá D.C
    93 = 1.1.3 =
    94 * Added method shipping filter for city
    95 = 1.1.4 =
    96 * added languages Spanish Colombia and fixed state
    97 = 1.1.7 =
    98 * added cost of shipping class
    99 = 1.1.17 =
    100 * added new cities
    101 = 1.1.18 =
    102 * fixed delete other methods shipping
    103 = 1.1.19 =
    104 * added optional single method
    105 = 1.1.20 =
    106 * added order of fields state and city
    107 = 1.1.21 =
    108 * update readme version Woocommerce
    109 = 1.1.22 =
    110 * update readme version
    111 = 1.1.23 =
    112 * update cities
    113 = 1.1.24 =
    114 * update notices
    115 = 1.1.25 =
    116 * update city Codazzi, Cesar
    117 = 1.1.26 =
    118 * fixed class cost
    119 = 1.1.27 =
    120 *  Updated wp compatible version
    121 = 1.1.28 =
    122 *  Updated priority states and places
    123 = 1.1.29 =
    124 *  compatibility with version 5.5  of WordPress
    125 = 1.1.30 =
    126 *  Added cities in Antioquia and Casanare
    127 = 1.1.31 =
    128 *  Updated cities in Cauca and Valle del Cauca
    129 = 1.1.32 =
    130 * Updated readme version WordPress
    131 = 1.1.33 =
    132 * Updated readme version WordPress
    13386= 2.0.0 =
    13487* Added Bogotá D.C as state and localities
     
    170123= 2.0.18 =
    171124* Updated compatibility with FunnelKit Checkout
     125= 2.0.19 =
     126* Fixed load states
     127* Fixed load selectWoo, used strategy defer
  • departamentos-y-ciudades-de-colombia-para-woocommerce/trunk/states/CO.php

    r3084279 r3099889  
    44 *
    55 * @author   Saul Morales Pacheco <moralespachecopablo@gmail.com>
    6  * @version  2.0.18
    7  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     6 * @version  2.0.19
     7 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU Public License
    88 */
    99
    10 global $states;
    11 
    12 $states ['CO' ] = array (
    13     'AMZ' => 'Amazonas',
    14     'ANT' => 'Antioquia',
    15     'ARU' => 'Arauca',
    16     'ATL' => 'Atlántico',
    17     'BOG' => 'Bogotá',
    18     'BOL' => 'Bolívar',
    19     'BOY' => 'Boyacá',
    20     'CAL' => 'Caldas',
    21     'CAQ' => 'Caquetá',
    22     'CAS' => 'Casanare',
    23     'CAU' => 'Cauca',
    24     'CES' => 'Cesar',
    25     'CHO' => 'Chocó',
    26     'COR' => 'Córdoba',
    27     'CUN' => 'Cundinamarca',
    28     'GUA' => 'Guainía',
    29     'GUV' => 'Guaviare',
    30     'HUI' => 'Huila',
    31     'GUJ' => 'La Guajira' ,
    32     'MAG' => 'Magdalena',
    33     'MET' => 'Meta',
    34     'NAR' => 'Nariño',
    35     'NOR' => 'Norte de Santander',
    36     'PUT' => 'Putumayo',
    37     'QUI' => 'Quindío',
    38     'RIS' => 'Risaralda',
    39     'SAP' => 'San Andrés y Providencia',
    40     'SAN' => 'Santander',
    41     'SUC' => 'Sucre',
    42     'TOL' => 'Tolima',
    43     'VAC' => 'Valle del Cauca',
    44     'VAU' => 'Vaupés',
    45     'VIC' => 'Vichada'
    46     );
     10return array (
     11    'AMZ' => 'Amazonas',
     12    'ANT' => 'Antioquia',
     13    'ARU' => 'Arauca',
     14    'ATL' => 'Atlántico',
     15    'BOG' => 'Bogotá',
     16    'BOL' => 'Bolívar',
     17    'BOY' => 'Boyacá',
     18    'CAL' => 'Caldas',
     19    'CAQ' => 'Caquetá',
     20    'CAS' => 'Casanare',
     21    'CAU' => 'Cauca',
     22    'CES' => 'Cesar',
     23    'CHO' => 'Chocó',
     24    'COR' => 'Córdoba',
     25    'CUN' => 'Cundinamarca',
     26    'GUA' => 'Guainía',
     27    'GUV' => 'Guaviare',
     28    'HUI' => 'Huila',
     29    'GUJ' => 'La Guajira' ,
     30    'MAG' => 'Magdalena',
     31    'MET' => 'Meta',
     32    'NAR' => 'Nariño',
     33    'NOR' => 'Norte de Santander',
     34    'PUT' => 'Putumayo',
     35    'QUI' => 'Quindío',
     36    'RIS' => 'Risaralda',
     37    'SAP' => 'San Andrés y Providencia',
     38    'SAN' => 'Santander',
     39    'SUC' => 'Sucre',
     40    'TOL' => 'Tolima',
     41    'VAC' => 'Valle del Cauca',
     42    'VAU' => 'Vaupés',
     43    'VIC' => 'Vichada'
     44);
Note: See TracChangeset for help on using the changeset viewer.