diff --git a/includes/class-integration-siigo-wc.php b/includes/class-integration-siigo-wc.php index 559ad11..f90f5c5 100644 --- a/includes/class-integration-siigo-wc.php +++ b/includes/class-integration-siigo-wc.php @@ -181,13 +181,13 @@ public static function generate_invoice($order_id, $previous_status, $next_statu $classic_type_document = get_post_meta( $order_id, '_billing_type_document', true ) ?: get_post_meta( $order_id, '_shipping_type_document', true ); - $classic_dni = get_post_meta( $order_id, '_billing_dni', true ) ?: get_post_meta( $order_id, '_shipping_dni', true ); + $classic_dni = get_post_meta( $order_id, self::$integration_settings->dni_field, true ) ?: get_post_meta( $order_id, '_billing_dni', true ) ?: get_post_meta( $order_id, '_shipping_dni', true ); $billing_dni = $checkout_fields->get_field_from_object( $field_dni, $order, 'billing' ); $shipping_dni = $checkout_fields->get_field_from_object( $field_dni, $order, 'shipping' ); $type_document = $billing_type_document ?: $shipping_type_document ? : $classic_type_document; - $dni = self::$integration_settings->dni_field ?: $billing_dni ?: $shipping_dni ?: $classic_dni; + $dni = $billing_dni ?: $shipping_dni ?: $classic_dni; $state = $order->get_billing_state() ?: $order->get_shipping_state(); $city = $order->get_billing_city() ?: $order->get_shipping_city(); diff --git a/integration-siigo-woo.php b/integration-siigo-woo.php index a8abe69..e368a9a 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.12 + * Version: 0.0.13 * 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.12'); + define('INTEGRATION_SIIGO_WC_SMP_VERSION', '0.0.13'); } add_action( 'plugins_loaded', 'integration_siigo_wc_smp_init'); diff --git a/readme.txt b/readme.txt index 29a06a7..b372512 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.12 +Stable tag: 0.0.13 License: GNU General Public License v3.0 License URI: https://www.gnu.org/licenses/gpl-3.0.html