woocommerce_is_purchasable хук-фильтрWC 1.0

Returns false if the product cannot be bought.

Использование

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

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

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

Где вызывается хук

WC_Product_External::is_purchasable()
woocommerce_is_purchasable
WC_Product::is_purchasable()
woocommerce_is_purchasable
WC_Product_Grouped::is_purchasable()
woocommerce_is_purchasable
woocommerce/includes/class-wc-product-external.php 151
return apply_filters( 'woocommerce_is_purchasable', false, $this );
woocommerce/includes/abstracts/abstract-wc-product.php 1612
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-grouped.php 82
return apply_filters( 'woocommerce_is_purchasable', false, $this );

Где используется хук в WooCommerce

Использование не найдено.