Plugin Directory

Changeset 2967250


Ignore:
Timestamp:
09/14/2023 08:11:34 PM (3 years ago)
Author:
advshipmgr
Message:

Updating new version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asm-manager/trunk/includes/asmplsww_query_live.php

    r2848702 r2967250  
    22/**
    33 * @package ASM Shipping Api
    4  * @version 1.2.5
     4 * @version 1.2.6
    55 */
    66global $woocommerce;
     
    5050if (isset($woocommerce->cart->get_applied_coupons()['0']) && $woocommerce->cart->get_applied_coupons()['0'] != "") {
    5151    $coupons_obj = new WC_Coupon($woocommerce->cart->get_applied_coupons()['0']);
    52     $coupons_amount = $woocommerce->cart->get_subtotal() * $coupons_obj->get_amount() / 100;
     52    $coupons_amount = $woocommerce->cart->get_discount_total();
    5353}
    5454
     
    7575                    <AccountIdentifier>BD8h3Dhs7qj18shr2p</AccountIdentifier>
    7676                    <StoreIndicator>" . $domainname . "</StoreIndicator>
    77                     <Total>" . $woocommerce->cart->cart_contents_total . "</Total>
     77                    <Total>" . ($woocommerce->cart->cart_contents_total + $coupons_amount) . "</Total>
    7878                    <TotalTaxable>" . $TotalTaxbaleProductPrice . "</TotalTaxable>
    7979                    <TotalNonTaxable>" . $NonTaxableProductPrice . "</TotalNonTaxable>
     
    110110    } else {
    111111        $colorSize = "";
     112    }
     113
     114    $product_tags = get_the_terms( $values['product_id'], 'product_tag' );
     115    $product_tags_array = array();
     116    if ( ! empty( $product_tags ) && ! is_wp_error( $product_tags ) ){
     117        foreach ( $product_tags as $product_tag ) {
     118            $product_tags_array[] = $product_tag->name;
     119        }
    112120    }
    113121
     
    147155                                <HazMat>" . (asmCap($getcmeta, 'asmplsww_addons_hazmat') == 1 ? 'Y' : 'N') . "</HazMat>
    148156                                <OptionsWeightPoints>" . asmCap($getcmeta, 'asmplsww_addons_options_weight_points') . "</OptionsWeightPoints>                             
     157                                <ProductTags>" . implode (", ", $product_tags_array) . "</ProductTags>                             
    149158                            </Attributes>
    150159                          </Product>";
Note: See TracChangeset for help on using the changeset viewer.