function commerce_cop_payment_delete in Commerce Custom Offline Payments 7
Delete a checkout payment.
Parameters
array $payment:
1 call to commerce_cop_payment_delete()
File
- ./
commerce_cop.module, line 429 - Custom offline payment methods for Drupal Commerce.
Code
function commerce_cop_payment_delete($payment, $skip_reset = FALSE) {
$delete = db_delete('commerce_custom_offline_payment');
$delete
->condition('id', $payment['id']);
$delete
->execute();
// Clear the necessary caches.
if (!$skip_reset) {
entity_defaults_rebuild();
rules_clear_cache(TRUE);
}
}