WPCafe by Themewinter - Apply discount for only base price not for addons

Apply discounts only on base price, not addons, for WPCafe by Themewinter.

add_filter('advanced_woo_discount_rules_product_price_on_before_calculate_discount', function($product_price, $product, $quantity, $cart_item){
    global $awdr_addon_commpatible_products;
    if(!empty($cart_item)){
        if (method_exists($product, 'get_id') && function_exists('wc_get_product')) {
            $product_id = $product->get_id();
            if(isset($awdr_addon_commpatible_products[$product_id])){
                $product = $awdr_addon_commpatible_products[$product_id];
            } else {
                $awdr_addon_commpatible_products[$product_id] = $product = wc_get_product($product_id);
            }
            if (method_exists($product, 'get_price')) {
                $product_price =  $product->get_price();
            }
        }
    }
    return $product_price;
}, 10, 4);