diff --git a/includes/class-integration-siigo-wc.php b/includes/class-integration-siigo-wc.php index 41f8a49..f963b63 100644 --- a/includes/class-integration-siigo-wc.php +++ b/includes/class-integration-siigo-wc.php @@ -193,7 +193,11 @@ public static function generate_invoice($order_id, $previous_status, $next_statu $city = $order->get_billing_city() ?: $order->get_shipping_city(); $states_dane = include(dirname(__FILE__) . '/states-dane.php'); $state_code = $states_dane[$state] ?? null; + $state_code = apply_filters('wc_siigo_integration_state_code', $state_code); $city_code = self::get_code_city($state, $city); + $city_code = apply_filters('wc_siigo_integration_city_code', $city_code); + $address = $order->get_billing_address_1() ?: $order->get_shipping_address_1(); + $address = apply_filters('wc_siigo_integration_address', $address); if(!$state_code) throw new Exception('Departamento no encontrado'); if(!$city_code) throw new Exception('Ciudad no encontrada'); @@ -230,7 +234,7 @@ public static function generate_invoice($order_id, $previous_status, $next_statu ] ], "address" => [ - "address" => $order->get_billing_address_1() ?: $order->get_shipping_address_1(), + "address" => $address, "city" => [ "country_code" => $order->get_billing_country() ?: $order->get_shipping_country(), "state_code" => $state_code, diff --git a/integration-siigo-woo.php b/integration-siigo-woo.php index fe058b8..5d81ab9 100644 --- a/integration-siigo-woo.php +++ b/integration-siigo-woo.php @@ -2,7 +2,7 @@ /** * Plugin Name: Integration Siigo Woocommerce * Description: IntegraciĆ³n del sistama contable y de facturaciĆ³n Siigo para Woocoommerce - * Version: 0.0.14 + * Version: 0.0.15 * Author: Saul Morales Pacheco * Author URI: https://saulmoralespa.com * License: GNU General Public License v3.0 @@ -17,7 +17,7 @@ } if(!defined('INTEGRATION_SIIGO_WC_SMP_VERSION')){ - define('INTEGRATION_SIIGO_WC_SMP_VERSION', '0.0.14'); + define('INTEGRATION_SIIGO_WC_SMP_VERSION', '0.0.15'); } add_action( 'plugins_loaded', 'integration_siigo_wc_smp_init'); diff --git a/readme.txt b/readme.txt index 8b022b1..5525cef 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: commerce, e-commerce, commerce, WordPress ecommerce, store, sales, sell, s Requires at least: 6.0 Tested up to: 6.6.1 Requires PHP: 8.1 -Stable tag: 0.0.14 +Stable tag: 0.0.15 License: GNU General Public License v3.0 License URI: https://www.gnu.org/licenses/gpl-3.0.html