This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cities = array( | |
array('name' => 'ACHAO', 'code' => 'ACHA'), | |
array('name' => 'ALGARROBO', 'code' => 'ALGA'), | |
array('name' => 'ALTO HOSPICIO', 'code' => 'AHOS'), | |
array('name' => 'ALTO JAHUEL', 'code' => 'AJAH'), | |
array('name' => 'ANCUD', 'code' => 'ANCU'), | |
array('name' => 'ANDACOLLO', 'code' => 'ANDA'), | |
array('name' => 'ANGOL', 'code' => 'ANGO'), | |
array('name' => 'ANTOFAGASTA', 'code' => 'ANTO'), | |
array('name' => 'ARAUCO', 'code' => 'ARAU'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Check if WooCommerce is active | |
*/ | |
$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) ); | |
if ( in_array( 'woocommerce/woocommerce.php', $active_plugins) ) { | |
add_filter( 'woocommerce_shipping_methods', 'add_chilexpress_shipping_method' ); | |
function add_chilexpress_shipping_method( $methods ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WC_Chilexpress_Shipping_Method extends WC_Shipping_Method{ | |
public function __construct(){ | |
$this->id = 'chilexpress_shipping_method'; | |
$this->method_title = __( 'Envíos vía Chilexpress (Chile)', 'woocommerce' ); | |
// Load the settings. |