WC_Product::is_purchasable()
Returns false if the product cannot be bought.
Description Description
Return Return
(bool)
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 ); }