woocommerce_is_purchasable filter-hookWC 1.0

Returns false if the product cannot be bought.

Usage

add_filter( 'woocommerce_is_purchasable', 'wp_kama_woocommerce_is_purchasable_filter', 10, 2 );

/**
 * Function for `woocommerce_is_purchasable` filter-hook.
 * 
 * @param  $condition 
 * @param  $that      
 *
 * @return 
 */
function wp_kama_woocommerce_is_purchasable_filter( $condition, $that ){

	// filter...
	return $condition;
}
$condition
-
$that
-

Where the hook is called

WC_Product::is_purchasable()
woocommerce_is_purchasable
WC_Product_External::is_purchasable()
woocommerce_is_purchasable
WC_Product_Grouped::is_purchasable()
woocommerce_is_purchasable
woocommerce/includes/abstracts/abstract-wc-product.php 1624
return apply_filters( 'woocommerce_is_purchasable', $this->exists() && ( 'publish' === $this->get_status() || current_user_can( 'edit_post', $this->get_id() ) ) && '' !== $this->get_price(), $this );
woocommerce/includes/class-wc-product-external.php 151
return apply_filters( 'woocommerce_is_purchasable', false, $this );
woocommerce/includes/class-wc-product-grouped.php 82
return apply_filters( 'woocommerce_is_purchasable', false, $this );

Where the hook is used in WooCommerce

Usage not found.