---
title: "Hooks: Filters"
description: "## Visibility & permissions | Filter | Arguments | Purpose | | --- | --- | --- | | `wcoffers_show_request_button` | `$show, $product` | Hide/show the request button per product. | | `wcoffers_offer_creator_roles` | `$roles` | Role slugs allowed to…"
url: "https://www.mswebarts.com/documentation/wc-custom-offers/wc-custom-offers-filter-hooks/"
updated: "2026-09-20"
category: WC Custom Offers
---

# Hooks: Filters

## Visibility & permissions

| Filter | Arguments | Purpose |
| --- | --- | --- |
| `wcoffers_show_request_button` | `$show, $product` | Hide/show the request button per product. |
| `wcoffers_offer_creator_roles` | `$roles` | Role slugs allowed to create offers (default `administrator`, `shop_manager`). Capability holders and active marketplace sellers pass regardless of this list. |
| `wcoffers_user_can_create_offers` | `$can, $user_id` | **Final say** on offer-creation permission. Can deny anyone, including admins. |
| `wcoffers_chat_message_moderator` | `$moderator, $user` | Who may delete offer/system chat messages (default: administrators). |
| `wcoffers_load_chat_ui` | `$load` | Whether the chat Create Offer UI loads at all. |

## Validation & limits

| Filter | Arguments | Purpose |
| --- | --- | --- |
| `wcoffers_validate_request` | `$errors, $data` | Add custom validation to request submissions (`WP_Error` accumulator). |
| `wcoffers_validate_offer` | `$errors, $offer` | Add custom send-time validation to offers. |
| `wcoffers_request_rate_limit` | `$limit, $customer_id` | Max requests per customer per rolling 10 minutes (default 10; return 0 to disable). |
| `wcoffers_offer_send_rate_limit` | `$limit, $seller_id` | Max offer sends per seller per rolling 10 minutes (default 20; return 0 to disable). |

## Checkout & money

| Filter | Arguments | Purpose |
| --- | --- | --- |
| `wcoffers_accept_redirect` | `$url, $offer` | Where the customer lands after clicking Accept. |
| `wcoffers_checkout_fees` | `$fees, $base` | Adjust the fee rows applied at offer checkout. |
| `wcoffers_package_rates` | `$offer_rates, $rates, $package` | Adjust the shipping rate that replaces store rates for an offer. |
| `wcoffers_order_status_map` | `$map, $order_status` | Change how order statuses map to offer statuses. |
| `wcoffers_offer_can_transition` | `$legal, $from, $to` | Override offer status-machine legality (use with care). |
| `wcoffers_request_can_transition` | `$legal, $from, $to` | Same, for requests. |

## Misc & advanced

| Filter | Arguments | Purpose |
| --- | --- | --- |
| `wcoffers_send_email` | `$send, $user_id, $subject, $body` | Suppress any plugin email (return `false`). |
| `wcoffers_setting` | `$value, $key` | Override any single plugin setting on the fly. |
| `wcoffers_product_search_args` | `$args, $term, $seller_id` | Adjust the `wc_get_products` query behind the popup product pickers. |
| `wcoffers_messaging_providers` | `$providers` | Register/replace messaging providers. See [Extending the Plugin](https://www.mswebarts.com/documentation/wc-custom-offers/wc-custom-offers-extending/). |
| `wcoffers_seller_resolvers` | `$resolvers` | Register/replace marketplace seller resolvers. |
| `wcoffers_template_paths` | `$paths` | Change the template override lookup locations. |

**Example: let vendors' staff send offers, but block one specific user**

```
add_filter( 'wcoffers_offer_creator_roles', function ( $roles ) {
	$roles[] = 'vendor_staff';
	return $roles;
} );

add_filter( 'wcoffers_user_can_create_offers', function ( $can, $user_id ) {
	return 999 === $user_id ? false : $can;
}, 10, 2 );
```

**Example: hide the request button on a whole category**

```
add_filter( 'wcoffers_show_request_button', function ( $show, $product ) {
	if ( has_term( 'gift-cards', 'product_cat', $product->get_id() ) ) {
		return false;
	}
	return $show;
}, 10, 2 );
```
