---
title: Ignore shipping price when using Shipping Restrictions feature for Cost by Region
description: "By default the plugin checks the order total when validating the [Shipping Restrictions feature](https://lpacwp.com/docs/shipping/#shipping-restrictions) of Cost by Region. This includes the shipping cost for the order. To ignore the shipping or create more dynamic calculations you can use the filter…"
url: "https://lpacwp.com/docs/ignore-shipping-price-when-using-shipping-restrictions-feature-for-cost-by-region/"
updated: "2025-02-04"
category: Custom Code Samples
---

# Ignore shipping price when using Shipping Restrictions feature for Cost by Region

By default the plugin checks the order total when validating the [Shipping Restrictions feature](https://lpacwp.com/docs/shipping/#shipping-restrictions) of Cost by Region. This includes the shipping cost for the order.

To ignore the shipping or create more dynamic calculations you can use the filter `lpac_region_restrictions_order_total_value`.

In the snippet below we will only take into account the cart subtotal when validating the shipping restrictions:

 PHP

```
function sl_cc_region_restrictions_use_subtotal($order_total, $wc_instance){

return $wc_instance->cart->get_subtotal();

}
add_filter('lpac_region_restrictions_order_total_value', 'sl_cc_region_restrictions_use_subtotal', 10, 2);
```
