function commerce_shipping_set_default_quotes_values in Commerce Shipping 7
Util function to add a set of default values to quote plugins.
Parameters
$plugin: The quote plugin array passed by reference.
2 calls to commerce_shipping_set_default_quotes_values()
- commerce_shipping_plugin_get_plugin in ./
commerce_shipping.module - Util function to get shipping plugins.
- commerce_shipping_plugin_get_plugins in ./
commerce_shipping.module - Get commerce_shipping plugins of a specific type
File
- ./
commerce_shipping.module, line 396 - Defines the shipping system and checkout integration.
Code
function commerce_shipping_set_default_quotes_values(&$plugin) {
if (!isset($plugin['display_title'])) {
$plugin['display_title'] = $plugin['title'];
}
if (!isset($plugin['create_rule'])) {
$plugin['create_rule'] = TRUE;
}
if (!isset($plugin['settings'])) {
$plugin['settings'] = array();
}
if (!isset($plugin['shipping_label'])) {
$plugin['settings'] = '';
}
if (!isset($plugin['price_component'])) {
$plugin['price_component'] = array();
}
}