Automattic\WooCommerce\Admin
WCAdminHelper::get_wcadmin_active_for_in_seconds
Get the number of seconds that the store has been active.
Method of the class: WCAdminHelper{}
No Hooks.
Returns
number. Number of seconds.
Usage
$result = WCAdminHelper::get_wcadmin_active_for_in_seconds();
WCAdminHelper::get_wcadmin_active_for_in_seconds() WCAdminHelper::get wcadmin active for in seconds code WC 10.4.3
public static function get_wcadmin_active_for_in_seconds() {
$install_timestamp = get_option( self::WC_ADMIN_TIMESTAMP_OPTION );
if ( ! is_numeric( $install_timestamp ) ) {
$install_timestamp = time();
update_option( self::WC_ADMIN_TIMESTAMP_OPTION, $install_timestamp );
}
return time() - $install_timestamp;
}