Skip to content

Commit e84403f

Browse files
committed
Rename function for better readability
1 parent 9e4851f commit e84403f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Config/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ public function getMaxTransactionValue(): float
254254
*
255255
* @return bool
256256
*/
257-
public function includeShippingInAdjustedTotal(): bool
257+
public function includeShippingInAdjustedValue(): bool
258258
{
259-
return (bool)$this->getModuleConfigValue('include_shipping_in_adjusted_total', false);
259+
return (bool)$this->getModuleConfigValue('include_shipping_in_adjusted_value', false);
260260
}
261261

262262
/**

Util/OrderTotals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getValueTotalAjusted(OrderInterface $order): float
4444
{
4545
$orderValue = (float)$order->getSubtotal() - abs((float)$order->getDiscountAmount());
4646

47-
if ($this->config->includeShippingInAdjustedTotal()) {
47+
if ($this->config->includeShippingInAdjustedValue()) {
4848
$orderValue += (float)$order->getShippingAmount() - (float)$order->getShippingDiscountAmount();
4949
}
5050

etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
<field id="enabled">1</field>
152152
</depends>
153153
</field>
154-
<field id="include_shipping_in_adjusted_total" type="select" translate="label" sortOrder="34" showInDefault="1" showInWebsite="1" showInStore="1">
154+
<field id="include_shipping_in_adjusted_value" type="select" translate="label" sortOrder="34" showInDefault="1" showInWebsite="1" showInStore="1">
155155
<label>Include Shipping in Adjusted Total</label>
156156
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
157157
<comment>If enabled, shipping costs will be included in the adjusted transaction value calculation. This setting works in conjunction with the Maximum Transaction Value setting.</comment>

etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<order_states_for_purchase_event>new,payment_review,pending_payment,holded,processing,complete</order_states_for_purchase_event>
2020
<use_base_currency>0</use_base_currency>
2121
<max_transaction_value>0</max_transaction_value>
22-
<include_shipping_in_adjusted_total>0</include_shipping_in_adjusted_total>
22+
<include_shipping_in_adjusted_value>0</include_shipping_in_adjusted_value>
2323
</settings>
2424
</googletagmanager2>
2525
</default>

0 commit comments

Comments
 (0)