WordPress filter hook

woocommerce_json_search_limit

Defined by WooCommerce and fired by 17 plugins in total, running on 7.1M+ sites between them.

“Filters the number of results returned by the JSON search endpoints.”

How to use woocommerce_json_search_limit

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_json_search_limit', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

17 plugins that fire woocommerce_json_search_limit

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/class-wc-ajax.php:1973
  2. Checkout Field Manager (Checkout Manager) for WooCommerce icon Checkout Field Manager (Checkout Manager) for WooCommerce80,000+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) lib/class-backend.php:40
  3. Dokan: AI Powered WooCommerce Multivendor Marketplace Solution icon Dokan: AI Powered WooCommerce Multivendor Marketplace Solution30,000+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/Order/Ajax.php:39
  4. Shoppable Images (Lookbook) for WooCommerce icon Shoppable Images (Lookbook) for WooCommerce5,000+ installs apply_filters( 'woocommerce_json_search_limit', 10 ) code/controllers/class-admin-controller.php:115
  5. BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor icon BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor1,000+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) front-end/products/brikpanel-product-editor.php:454
  6. Simple Countdown Timer icon Simple Countdown Timer1,000+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/Settings/SettingsBase/Settings.php:204
  7. Checkout Gateway for Paddle icon Checkout Gateway for Paddle80+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/Settings/SettingsBase/Settings.php:284
  8. Best Seller for WooCommerce icon Best Seller for WooCommerce70+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/Settings/SettingsBase/Settings.php:199
  9. Image Converter & Optimizer icon Image Converter & Optimizer60+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/Settings/SettingsBase/Settings.php:208
  10. C4D Shoppable Images icon C4D Shoppable Images10+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/product-search.php:19
  11. Product Upsells & Add-Ons for WooCommerce by WPRaptor icon Product Upsells & Add-Ons for WooCommerce by WPRaptor10+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) admin/class-admin-ajax.php:1195
  12. Manual Orders for Woocommerce icon Manual Orders for Woocommerce10+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/class-woo-manual-order-ajax.php:57
  13. Cart Validation for WooCommerce icon Cart Validation for WooCommerce10+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) admin/class-cvfw-admin.php:759
  14. Increase average cart value with Cross-Sell icon Increase average cart value with Cross-Sell10+ installs apply_filters( 'woocommerce_json_search_limit', 30 ) src/Plugin/Plugin.php:998
  15. Invoice management for Woocommerce icon Invoice management for WoocommerceFewer than 10 installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/class-wc-ajax.php:1690
  16. Advanced Captcha Hub icon Advanced Captcha HubFewer than 10 installs apply_filters( 'woocommerce_json_search_limit', 30 ) includes/Settings/SettingsBase/Settings.php:281
  17. Revenue Booster for WooCommerce icon Revenue Booster for WooCommerceFewer than 10 installs apply_filters( 'woocommerce_json_search_limit', 30 ) admin/class-revenue-booster-for-woocommerce-admin.php:843

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.