1
0
mirror of synced 2025-01-29 22:31:42 +03:00

Delete option 'Do not transmit the cost of delivery'

This commit is contained in:
Dima Uryvskiy 2021-08-16 11:14:53 +03:00 committed by GitHub
parent 6a77e02e89
commit 07aab1078e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 25 deletions

View File

@ -226,9 +226,6 @@ msgstr "Activar la transferencia de números en Simla.com"
msgid "Transferring the order number"
msgstr "Transferencia de un número de pedido"
msgid "Do not transmit the cost of delivery"
msgstr "No transferir el costo de envío"
msgid "Corporate customers support"
msgstr "Soporte a clientes corporativos"

View File

@ -235,9 +235,6 @@ msgstr "Активировать передачу номера в Simla.com"
msgid "Transferring the order number"
msgstr "Передача номера заказа"
msgid "Do not transmit the cost of delivery"
msgstr "Не передавать себестоимости доставки"
msgid "Corporate customers support"
msgstr "Поддержка корпоративных клиентов"

View File

@ -124,15 +124,6 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration
'id' => 'api_options'
);
$this->form_fields['send_delivery_net_cost'] = array(
'title' => __( 'Do not transmit the cost of delivery', 'retailcrm' ),
'label' => ' ',
'description' => '',
'class' => 'checkbox',
'type' => 'checkbox',
'desc_tip' => true
);
$this->form_fields['corporate_enabled'] = array(
'title' => __('Corporate customers support', 'retailcrm'),
'label' => __('Enabled'),

View File

@ -287,9 +287,7 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) :
$shipping->set_total($order['delivery']['cost']);
}
$activeNetCost = $this->retailcrmSettings['send_delivery_net_cost'];
if (isset($order['delivery']['netCost']) && wc_tax_enabled() && $activeNetCost != 'yes') {
if (!empty($order['delivery']['netCost']) && wc_tax_enabled()) {
$shipping->set_total($order['delivery']['netCost']);
}

View File

@ -363,13 +363,7 @@ if ( ! class_exists( 'WC_Retailcrm_Orders' ) ) :
$order_data['delivery']['cost'] = $shipping_cost;
}
$activeNetCost = null;
if (isset($this->retailcrm_settings['send_delivery_net_cost'])){
$activeNetCost = $this->retailcrm_settings['send_delivery_net_cost'];
}
if ($shipping['total'] && $activeNetCost != 'yes') {
if (!empty($shipping['total'])) {
$order_data['delivery']['netCost'] = $shipping['total'];
}
}

Binary file not shown.

Binary file not shown.