function uc_flatrate_admin_method_confirm_delete_submit in Ubercart 7.3
Same name and namespace in other branches
- 5 shipping/uc_flatrate/uc_flatrate.module \uc_flatrate_admin_method_confirm_delete_submit()
- 6.2 shipping/uc_flatrate/uc_flatrate.admin.inc \uc_flatrate_admin_method_confirm_delete_submit()
Form submission handler for uc_flatrate_admin_method_confirm_delete().
See also
uc_flatrate_admin_method_confirm_delete()
File
- shipping/
uc_flatrate/ uc_flatrate.admin.inc, line 126 - Flat rate shipping method administration menu items.
Code
function uc_flatrate_admin_method_confirm_delete_submit($form, &$form_state) {
$mid = $form_state['values']['mid'];
db_delete('uc_flatrate_methods')
->condition('mid', $mid)
->execute();
db_delete('uc_flatrate_products')
->condition('mid', $mid)
->execute();
rules_config_delete(array(
'get_quote_from_flatrate_' . $mid,
));
drupal_set_message(t('Flat rate shipping method deleted.'));
$form_state['redirect'] = 'admin/store/settings/quotes/methods';
}