Skip to content

Commit

Permalink
Fixed field dni_field
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul Morales committed Sep 10, 2024
1 parent d00726a commit ac76609
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions includes/class-integration-siigo-wc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions integration-siigo-woo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ac76609

Please sign in to comment.