woocommerce_is_purchasable

woocommerce_is_purchasable

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_is_purchasable') is found 3 times:

  • /includes/abstracts/abstract-wc-product.php line 1624
    	 *
    	 * @return bool
    	 */
    	public function is_purchasable() {
    		return apply_filters( 'woocommerce_is_purchasable', $this->exists() && ( 'publish' === $this->get_status() || current_user_can( 'edit_post', $this->get_id() ) ) && '' !== $this->get_price(), $this );
    	}
    
    	/**
    	 * Returns whether or not the product is on sale.
    	 *
    	 * @param  string $context What the value is for. Valid values are view and edit.
    
  • /includes/class-wc-product-external.php line 151
    	 * @access public
    	 * @return bool
    	 */
    	public function is_purchasable() {
    		return apply_filters( 'woocommerce_is_purchasable', false, $this );
    	}
    
    	/**
    	 * Get the add to url used mainly in loops.
    	 *
    	 * @access public
    
  • /includes/class-wc-product-grouped.php line 82
    	 *
    	 * @return bool
    	 */
    	public function is_purchasable() {
    		return apply_filters( 'woocommerce_is_purchasable', false, $this );
    	}
    
    	/**
    	 * Returns the price in html format.
    	 *
    	 * @param string $price (default: '').
    

See this hook used in plugins:

Examples using woocommerce_is_purchasable