Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter knms5525

    (@knms5525)

    Thanks to some help from a member of the Woocommerce Community Slack group this helped me identify Tax Items by Label.

    // Get all applied tax items
    // $cart is passed via my function for the woocommerce_cart_calculate_fees add_action
    $bs_tax_totals = $cart->get_tax_totals();
    $bs_duty_exists = false;
    // Check each tax item
    foreach ( $bs_tax_totals as $bs_tax ) {
    // Compare tax label (case-sensitive exact match)
    if ( ‘Duty’ === $bs_tax->label ) {
    $bs_duty_exists = true;
    break;
    }
    }

    Thread Starter knms5525

    (@knms5525)

    Just following up on this topic. Wondering what Im missing re Connectivity: Not Connected? Thoughts would be greatly appreciated here, and thank you in advance for time and input.

Viewing 2 replies - 1 through 2 (of 2 total)