function hook_commerce_cpc_coupon_attached in Commerce Cart Pane 7
Executes after coupon has been attached to the order on Coupon pane of cart page
Parameters
$order: The order object.
$coupon: The coupon object.
1 function implements hook_commerce_cpc_coupon_attached()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- commerce_cps_commerce_cpc_coupon_attached in modules/
shipping/ commerce_cps.module - Implements hook_commerce_cpc_coupon_attached().
1 invocation of hook_commerce_cpc_coupon_attached()
- commerce_cpc_coupon_add_form_submit in modules/
coupon/ commerce_cpc.module - Coupon form handler that is used on Cart form. Add coupon to order.
File
- modules/
coupon/ commerce_cpc.api.php, line 29 - This file contains no working PHP code; it exists to document hooks in the standard Drupal manner.
Code
function hook_commerce_cpc_coupon_attached($order, $coupon) {
// recalculate shipping after coupon has been attached to order.
// Works only of Coupon pane module is activated.
commerce_cps_add_order_shipping($order);
}