function _uc_coupon_match_sku in Ubercart Discount Coupons 7.2
Same name and namespace in other branches
- 6 uc_coupon.module \_uc_coupon_match_sku()
- 7.3 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 963
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;
}