Skip to content

Commit

Permalink
Added field dni_field in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul Morales committed Sep 10, 2024
1 parent 38bfb29 commit d00726a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions includes/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ function toggleFields() {
'default' => '',
'description' => __( 'Vendedor asociado a la factura' ),
'desc_tip' => false
),
'dni_field' => array(
'title' => __( 'Meta clave campo dni' ),
'type' => 'text',
'placeholder' => 'dni',
'description' => __( 'El campo que hace referencia al documento del cliente' ),
'desc_tip' => true
)
]
]);
2 changes: 1 addition & 1 deletion includes/class-integration-siigo-wc.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static function generate_invoice($order_id, $previous_status, $next_statu
$shipping_dni = $checkout_fields->get_field_from_object( $field_dni, $order, 'shipping' );

$type_document = $billing_type_document ?: $shipping_type_document ? : $classic_type_document;
$dni = $billing_dni ?: $shipping_dni ?: $classic_dni;
$dni = self::$integration_settings->dni_field ?: $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.11
* Version: 0.0.12
* 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.11');
define('INTEGRATION_SIIGO_WC_SMP_VERSION', '0.0.12');
}

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.11
Stable tag: 0.0.12
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down

0 comments on commit d00726a

Please sign in to comment.