invp_is_wholesale( int|null $post_ID = null )

Returns true if this vehicle is marked wholesale.


Parameters Parameters

$post_ID

(int|null) (Optional) The post ID of a vehicle. Must be passed when using this method outside the loop.

Default value: null


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/template-tags.php

function invp_is_wholesale( $post_ID = null ) {
	if ( empty( $post_ID ) ) {
		$post_ID = get_the_ID();
	}
	return false !== strpos( strtolower( INVP::get_meta( 'availability', $post_ID ) ) ?? '', 'wholesale' );
}