shopp_fedex_rates

the resulting shipping options to return for display on the cart/checkout from the FedExRates add-on shipping module.

add_filter( 'shopp_fedex_rates', [callback] )

@param mixed $results the resulting shipping options to return for display on the cart/checkout.
@param array $options array of all shipping method options from all shipping modules so far.
@param Order $Order the Order object for which the rates are being determined.

Description

the resulting shipping options to return for display on the cart/checkout from the FedExRates add-on shipping module.

Example

// register filter callback
add_filter('shopp_fedex_rates', 'shopp_fedex_rates_fltr', 10, 3);

// create filter function
function shopp_fedex_rates_fltr( $results, $options, $Order ) {
    // Add a default FedEx option if necessary
    if ( false === $results ) {
        $results = $options;
        $default = array(
            'name' => 'FedEx Shipping',
            'slug' => 'fedex',
            'amount' => '20.00',
            'delivery' => '2w-4w'
            );
        $results['fedex'] = $default;
    }

    return $results;
}

See Also

You must be logged in to post a comment.

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

Skip to toolbar