# Disable rules while API request

```php
function woo_discount_rules_apply_rules_method($status){
  if(isset($_REQUEST['consumer_key']) && isset($_REQUEST['consumer_secret'])){
	if(!empty($_REQUEST['consumer_key']) && !empty($_REQUEST['consumer_secret'])){
	  $status = false;
	}
  }
  return $status;
}
add_filter('woo_discount_rules_apply_rules', 'woo_discount_rules_apply_rules_method');
```
