Checkout Restriction
Stop customers from paying with wallet on specific products or specific cart conditions.
Setting up?
Skip to Checkout Settings for the step-by-step admin tab walkthrough (gateway + discount + restriction in one page).
What It Does
| For | Means |
|---|---|
| Customer | Wallet just doesn't appear at checkout when restrictions apply. Other gateways (card, COD) still work |
| Admin | Per-product checkbox + global "no wallet on sale items" toggle. Useful for vendor-restricted SKUs, deposits, clearance items |

Per-Product Block
Best for individual SKUs.
- Products → [edit product] → Inventory tab
- Tick Exclude wallet payment
- Save
When any line item in the cart has this flag, the wallet gateway is hidden at checkout.
Variable products
The parent product's flag covers all variations. To exclude only specific variations, set the field at the variation level — variation flag wins.
Global "No Wallet on Sale Items"
Use this when you don't want store credit subsidising clearance prices.
Wallet → Settings → Checkout Restriction → Disable on sale items → ON.
When ON: any cart containing at least one sale-priced product hides the wallet gateway. Honours WC scheduled sale dates.
Common Scenarios
Block wallet on a single high-value SKU
Open the product → Inventory → Exclude wallet payment → Save. Done.
Block wallet on all clearance
Toggle "Disable on sale items" → ON in admin settings. WC's is_on_sale() flag drives the decision.
Allow wallet on sale items in some categories only
Use a custom filter (see dev section) — restrict by category, not just by sale flag.
Block wallet for specific user roles
Wholesalers / B2B accounts shouldn't use wallet? Filter by role (see dev section).
Block wallet for specific countries
Geo-restrict via the customer's billing country (see dev section).
How It Combines With KYC
| Order of checks | What's checked |
|---|---|
| 1 | KYC gate (if wallet_usage is in required features) |
| 2 | Per-product exclude flag |
| 3 | Global "disable on sale items" |
| 4 | Zero balance + "Show on zero" OFF |
| 5 | Otherwise → show |
First fail short-circuits — gateway hides.
When Something Goes Wrong
| Problem | Fix |
|---|---|
| Wallet visible despite excluded product | Confirm the meta is yes (not 1 or true); clear cart cache; check variation flag |
| Sale-item check missing | Sale dates expired? $product->is_on_sale() returns false for expired sales |
| Gateway hidden for everyone | A custom filter is returning false — check your custom code |
| KYC + restriction conflict | Resolve KYC first; restriction filters apply only when gateway is otherwise allowed |
For developers — extending the visibility filter
Per-user block
add_filter( 'wkwc_wallet_show_method_on_checkout', function( $show ) {
if ( get_user_meta( get_current_user_id(), '_wkwp_wallet_blocked', true ) === 'yes' ) {
return false;
}
return $show;
} );
Per-role block
add_filter( 'wkwc_wallet_show_method_on_checkout', function( $show ) {
$user = wp_get_current_user();
if ( in_array( 'wholesale_no_wallet', (array) $user->roles, true ) ) {
return false;
}
return $show;
} );
Per-country block
add_filter( 'wkwc_wallet_show_method_on_checkout', function( $show ) {
if ( WC()->customer->get_billing_country() === 'XX' ) {
return false;
}
return $show;
} );
Hooks
| Hook | Type | When |
|---|---|---|
wkwc_wallet_show_method_on_checkout | filter | gateway visibility decision |
wkwp_wallet_excluded_product_in_cart | action | when an excluded product detected |
wkwp_wallet_disable_on_sale_active | filter | mutate the global toggle decision per cart |
