You are here

function uc_tax_calculate in Ubercart 8.4

Calculates the taxes for an order based on enabled tax modules.

Parameters

\Drupal\uc_order\OrderInterface $order: The full order object for the order want to calculate taxes for.

Return value

array An array of taxes for the order.

4 calls to uc_tax_calculate()
PayPalExpressCheckout::orderSubmit in payment/uc_paypal/src/Plugin/Ubercart/PaymentMethod/PayPalExpressCheckout.php
Called when an order is being submitted with this payment method.
PayPalPaymentsStandard::buildRedirectForm in payment/uc_paypal/src/Plugin/Ubercart/PaymentMethod/PayPalPaymentsStandard.php
Form constructor.
TaxDisplay::display in uc_tax/src/Plugin/Ubercart/LineItem/TaxDisplay.php
uc_tax_uc_order_update in uc_tax/uc_tax.module
Implements hook_uc_order_update().

File

uc_tax/uc_tax.module, line 402
Ubercart Tax module.

Code

function uc_tax_calculate(OrderInterface $order) {

  // Find any taxes specified by enabled modules.
  $taxes = \Drupal::moduleHandler()
    ->invokeAll('uc_calculate_tax', [
    $order,
  ]);
  return $taxes;
}