LLMS_Query::exclude_hidden_llms_products( $where )

Avoid showing hidden products in the previous/next post queries.


Parameters Parameters

$where

(Required)


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class.llms.query.php

	public function exclude_hidden_llms_products( $where ) {
		global $wpdb;

		$where .= " AND p.ID NOT IN (
		SELECT object_id
		FROM {$wpdb->term_relationships} AS tr
		INNER JOIN {$wpdb->term_taxonomy} AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
		INNER JOIN {$wpdb->terms} AS t ON tt.term_id = t.term_id
		WHERE tt.taxonomy = 'llms_product_visibility'
		AND t.slug IN ('hidden')
	)";

		return $where;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
9.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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