noptin_get_optin_stats()

Returns opt-in forms stats.


Return Return

(array)


Top ↑

Source Source

File: includes/functions.php

function noptin_get_optin_stats() {
	global $wpdb;
	$table = get_noptin_subscribers_meta_table_name();
	$sql   = "SELECT `meta_value`, COUNT( DISTINCT `noptin_subscriber_id`) AS stats FROM `$table` WHERE `meta_key`='_subscriber_via' GROUP BY `meta_value`";
	$stats = $wpdb->get_results( $sql );

	if ( ! $stats ) {
		$stats = array();
	}

	return wp_list_pluck( $stats, 'stats', 'meta_value' );

}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.0.7Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation