shopp_fedex_total

filters the total net charge for each fedex rate.

add_filter( 'shopp_fedex_total', [callback] )

@param float $total the total net charge for each fedex rate
@param Object $details the FedEx Rates response object for the current method

Description

filters the total net charge for each fedex rate.

Examples

Add 5% to the returned FedEx Rates

// register filter callback
add_filter('shopp_fedex_total', 'shopp_fedex_total_fltr', 10, 2);

// create filter function
function shopp_fedex_total_fltr( $total, $details ) {
    // buffer the Fedex Rate response 5%
    return $total * 1.05;
}

Return List Price Adjusted Rate (if applicable)

add_filter('shopp_fedex_total','add_shopp_fedex_total_list_difference', 10, 2);

// EffectiveNetDiscount is the difference between Account and List estimate
add_shopp_fedex_total_list_difference ( $total, $rate_detail ) {
    if ( isset($rate_detail->EffectiveNetDiscount->Total) && $rate_detail->EffectiveNetDiscount->Total > 0 )
        $total += $rate_detail->EffectiveNetDiscount->Total;
    return $total;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar