"Exclude removing specific (start with) coupons from woocommerce while disabling woocommerce coupon

Exclude specific coupons from WooCommerce.

add_filter('advanced_woo_discount_rules_exclude_coupon_while_remove_third_party_coupon', function($status, $coupon_code) {
    if (strpos(strtolower($coupon_code), 'mil-') !== false) {
        $status = true;
    }
    return $status;
}, 100, 2);