You are here

function _uc_coupon_match_sku in Ubercart Discount Coupons 7.3

Same name and namespace in other branches
  1. 6 uc_coupon.module \_uc_coupon_match_sku()
  2. 7.2 uc_coupon.module \_uc_coupon_match_sku()
1 call to _uc_coupon_match_sku()
uc_coupon_calculate_discounts in ./uc_coupon.module
Find items that a coupon will apply to and calculate the discounts.

File

./uc_coupon.module, line 1079
Provides discount codes and gift certificates for Ubercart.

Code

function _uc_coupon_match_sku($model, $skus) {
  foreach ($skus as $match) {
    if (preg_match('/^' . str_replace('\\*', '.*?', preg_quote($match, '/')) . '$/', $model)) {
      return TRUE;
    }
  }
  return FALSE;
}