Product::availability()

Summary

Get the availability for the product


Return

(string)


Source

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

	public function availability() {
		$terms = get_the_terms( $this->post_id, Availability::NAME );
		if ( ! $terms || is_wp_error( $terms ) ) {
			return Availability::AVAILABLE;
		}

		return reset( $terms )->slug;
	}




User Contributed Notes

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