Product::is_purchasable( int $variant_id )

Summary

Checks if a product can be purchased, considering both the purchasability setting and inventory levels


Parameters

$variant_id

(int) (Required)


Return

(bool) If the product is out of stock


Source

File: src/BigCommerce/Post_Types/Product/Product.php

		if ( $availabilty === Availability::DISABLED ) {
			return false;
		}

		return ! $this->out_of_stock( $variant_id );
	}

	/**


User Contributed Notes

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