woocommerce_variation_is_purchasable

woocommerce_variation_is_purchasable

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_variation_is_purchasable') is found 1 times:

  • /includes/class-wc-product-variation.php line 550
    	 *
    	 * @return bool
    	 */
    	public function is_purchasable() {
    		return apply_filters( 'woocommerce_variation_is_purchasable', $this->variation_is_visible() && parent::is_purchasable() && ( 'publish' === $this->parent_data['status'] || current_user_can( 'edit_post', $this->get_parent_id() ) ), $this );
    	}
    
    	/**
    	 * Controls whether this particular variation will appear greyed-out (inactive) or not (active).
    	 * Used by extensions to make incompatible variations appear greyed-out, etc.
    	 * Other possible uses: prevent out-of-stock variations from being selected.