Automattic\WooCommerce\Admin

WCAdminHelper::is_wc_admin_active_for()public staticWC 1.0

Test how long WooCommerce Admin has been active.

Method of the class: WCAdminHelper{}

No Hooks.

Return

true|false. Whether or not WooCommerce admin has been active for $seconds.

Usage

$result = WCAdminHelper::is_wc_admin_active_for( $seconds );
$seconds(int) (required)
Time in seconds to check.

WCAdminHelper::is_wc_admin_active_for() code WC 7.3.0

public static function is_wc_admin_active_for( $seconds ) {
	$wc_admin_active_for = self::get_wcadmin_active_for_in_seconds();

	return ( $wc_admin_active_for >= $seconds );
}