WC_Product::is_purchasable()

Returns false if the product cannot be bought.


Description Description


Return Return

(bool)


Top ↑

Source Source

File: includes/abstracts/abstract-wc-product.php

	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 );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.