__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
namespace WPForms\Pro\Emails;

use WPForms\Pro\Reports\EntriesCount;
use WPForms\Emails\Summaries as BaseSummaries;

/**
 * Email Summaries.
 *
 * @since 1.8.8
 */
class Summaries extends BaseSummaries {

	/**
	 * Constructor for the class.
	 * Initializes the object and registers the Lite weekly entries count cron schedule.
	 *
	 * @since 1.8.8
	 */
	public function __construct() {

		parent::__construct();

		// Unregister it if scheduled.
		$this->maybe_unregister_entries_count_schedule();
	}

	/**
	 * Override Email Summaries cron callback.
	 *
	 * @since 1.8.8
	 */
	public function cron() {

		( new LicenseBanner() )->init();

		parent::cron();
	}

	/**
	 * Get form entries.
	 *
	 * @since 1.8.8
	 *
	 * @return array
	 */
	protected function get_entries(): array {

		return ( new EntriesCount() )->get_by( 'form_trends', 0, 7, 'previous sunday' );
	}

	/**
	 * Check if the weekly entries count cron schedule is registered and unregister it if scheduled.
	 * This function helps in managing the scheduled cron job for counting weekly entries.
	 *
	 * @since 1.8.8
	 */
	private function maybe_unregister_entries_count_schedule() {

		// Check if the cron job is scheduled.
		if ( false === wp_next_scheduled( 'wpforms_weekly_entries_count_cron' ) ) {
			// If not scheduled, return without performing any action.
			return;
		}

		// Clear the scheduled hook for the weekly entries count cron job.
		wp_clear_scheduled_hook( 'wpforms_weekly_entries_count_cron' );
	}
}

Filemanager

Name Type Size Permission Actions
Templates Folder 0750
LicenseBanner.php File 6.2 KB 0640
Summaries.php File 1.46 KB 0640
Filemanager