learndash_user_activity_query_tables

apply_filters( 'learndash_user_activity_query_tables',  string $sql_query_from,  array $query_args )

Filters tables and joins to be used for user activity query. The from part of the query with valid SQL syntax.


Description #


Parameters #

$sql_query_from

(string) The from part of the SQL query with valid SQL syntax.

$query_args

(array) An array of user query arguments.


Source #

File: includes/ld-reports.php


Examples #

 <?php
/**
 * Example usage for learndash_user_activity_query_tables filter.
 */
add_filter(
	'learndash_user_activity_query_tables',
	function( $sql_query_from, $query_args ) {
		// May add any custom logic using $sql_query_from, $query_args.

		// Always return $sql_query_from.
		return $sql_query_from;
	},
	10,
	2
);