Automattic\WooCommerce\Admin

WCAdminHelper::is_wc_admin_active_for()public staticWC 1.0

Test how long WooCommerce Admin has been active.

{} Это метод класса: WCAdminHelper{}

Хуков нет.

Возвращает

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

Использование

$result = WCAdminHelper::is_wc_admin_active_for( $seconds );
$seconds(int) (обязательный)
Time in seconds to check.

Код WCAdminHelper::is_wc_admin_active_for() WC 6.4.1

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 );
}