function uc_weightquote_admin_method_confirm_delete_submit in Ubercart 7.3
Same name and namespace in other branches
- 5 shipping/uc_weightquote/uc_weightquote.module \uc_weightquote_admin_method_confirm_delete_submit()
- 6.2 shipping/uc_weightquote/uc_weightquote.admin.inc \uc_weightquote_admin_method_confirm_delete_submit()
Form submission handler for uc_weightquote_admin_method_confirm_delete().
See also
uc_weightquote_admin_method_confirm_delete()
File
- shipping/
uc_weightquote/ uc_weightquote.admin.inc, line 127 - Weight quote shipping method administration menu items.
Code
function uc_weightquote_admin_method_confirm_delete_submit($form, &$form_state) {
$mid = $form_state['values']['mid'];
db_delete('uc_weightquote_methods')
->condition('mid', $mid)
->execute();
db_delete('uc_weightquote_products')
->condition('mid', $mid)
->execute();
rules_config_delete(array(
'get_quote_from_weightquote_' . $mid,
));
drupal_set_message(t('Weight quote shipping method deleted.'));
$form_state['redirect'] = 'admin/store/settings/quotes/methods';
}