WordPress at Your Fingertips
function is not described

WC_Product::get_availability_class() protected WC 1.0

Get availability classname based on stock status.

{} It's a method of the class: WC_Product{}

Hooks from the method

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_availability_class();

Code of WC_Product::get_availability_class() WC 5.8.0

protected function get_availability_class() {
	if ( ! $this->is_in_stock() ) {
		$class = 'out-of-stock';
	} elseif ( ( $this->managing_stock() && $this->is_on_backorder( 1 ) ) || ( ! $this->managing_stock() && $this->is_on_backorder( 1 ) ) ) {
		$class = 'available-on-backorder';
	} else {
		$class = 'in-stock';
	}
	return apply_filters( 'woocommerce_get_availability_class', $class, $this );
}