WordPress filter hook
woocommerce_is_purchasable
Defined by WooCommerce and fired by 29 plugins in total, running on 7.1M+ sites between them.
“Filters whether a product is purchasable.”
How to use woocommerce_is_purchasable
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_is_purchasable', function( $purchasable, $object ) {
// Change $purchasable here.
return $purchasable;
}, 10, 2 );Argument names come from YITH WooCommerce Gift Cards's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
29 plugins that fire woocommerce_is_purchasable
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_is_purchasable', $this->exists() && $this->is_viewable() && '' !== $this->get_price(), $this )includes/abstracts/abstract-wc-product.php:1875 -
FunnelKit30,000+ installs
apply_filters( 'woocommerce_is_purchasable', $variation->exists() && ( 'publish' === $own_status || current_user_can( 'edit_post', $id ) ) && $has_price, $variation )modules/bundles/includes/products/repository.php:1202 -
YITH WooCommerce Gift Cards10,000+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/class-yith-wc-product-gift-card.php:106 -
Product Bundle Builder for WooCommerce6,000+ installs
apply_filters( 'woocommerce_is_purchasable', $this->exists() && ( 'publish' === $this->get_status() || current_user_can( 'edit_post', $this->get_id() ) ), $this )src/ProductBundle.php:711 -
WPS Bookings for WooCommerce3,000+ installs
apply_filters( 'woocommerce_is_purchasable', true, $this )includes/class-wc-product-mwb-booking.php:79 -
YITH WooCommerce Product Bundles3,000+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/objects/class.yith-wc-product-bundle.php:111 -
Subscriptions for WooCommerce Recurring Payments with Membership Content Restriction700+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )src/Features/SubscriptionBox/Services/ProductType.php:57 -
GIFT4U200+ installs
apply_filters( 'woocommerce_is_purchasable', $this->exists() && ( 'publish' === $this->get_status() || current_user_can( 'edit_post', $this->get_id() ) ) && $price_cond, $this )inc/classes/g4u-product-giftcard.php:27 -
Salevo Boost Sales for WooCommerce200+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/wbs_product_bundle.php:108 -
Store credit / Gift cards for woocommerce100+ installs
apply_filters( 'woocommerce_is_purchasable', $this->exists() && ( 'publish' === $this->get_status() || current_user_can( 'edit_post', $this->get_id() ) ), $this )admin/class-store-credit-product.php:34 -
BundleBoss80+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/class-bundle-boss-product-bundle.php:905 -
Stachethemes Seat Planner Lite60+ installs
apply_filters( 'woocommerce_is_purchasable', $condition, $this )includes/woocommerce/product/class.auditorium-product.php:43 -
Leat30+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )src/Infrastructure/WooCommerce/GiftcardProduct.php:145 -
Wallet Ready Gift Cards for WooCommerce by GiftRocketWP30+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )backend/class-wc-product-wxgiftcard.php:78 -
Presentero30+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/class-presentero-gc-product-gift-card.php:75 -
BookingHive10+ installs
apply_filters( 'woocommerce_is_purchasable', $this->exists() && 'publish' === $this->get_status(), $this )src/Modules/Addons/Hooks/Admin/Product/AddonProduct.php:96 -
MaxtDesign Product Bundles10+ installs
apply_filters( 'woocommerce_is_purchasable', $this->md_bnd_purchasable_memo, $this )src/Product/WC_Product_Bundle.php:176 -
Beacon Bookings10+ installs
apply_filters( 'woocommerce_is_purchasable', $ok, $this )includes/class-product.php:75 -
QODE Product Bundles for WooCommerce10+ installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )inc/bundle-product/woocommerce/class-wc-product-qode-bundle-product.php:128 -
Codeholt Bundles for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/class-cbfw-product-bundle.php:137 -
Comet LevelUp for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', true )includes/LiveTests/test_catalog_mode.php:28 -
GiftlarkFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $ok, $this )includes/class-gvgc-product-gift-card.php:55 -
BrainlessITC Gift Cards for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )src/Product/GiftCardProduct.php:101 -
RecurivaFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )packages/core/src/Integrations/WooCommerce/SubscriptionProduct.php:62 -
RT Auction Product for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $ok, $this )models/class-rtapw-auction-product.php:18 -
The Yeti Dev Bookings LiteFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $this->exists() && 'publish' === $this->get_status(), $this )includes/class-tydb-product.php:21 -
SlotNova Booking for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', true, $this )includes/class-wc-product-slotnova.php:68 -
Book’d by WooNinjasFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/product.php:82 -
OWH Domain WHOIS RDAPFewer than 10 installs
apply_filters( 'woocommerce_is_purchasable', $purchasable, $this )includes/class-wc-product-domain.php:279
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.