Automattic\WooCommerce\Internal\Orders

MobileMessagingHandler::get_closer_mobile_usage_date()private staticWC 1.0

Returns the closest date of last usage of any mobile app platform.

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

Хуков нет.

Возвращает

?DateTime.

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

$result = MobileMessagingHandler::get_closer_mobile_usage_date(): ?DateTime;

Код MobileMessagingHandler::get_closer_mobile_usage_date() WC 7.1.0

private static function get_closer_mobile_usage_date(): ?DateTime {
	$mobile_usage = WC_Tracker::get_woocommerce_mobile_usage();

	if ( ! $mobile_usage ) {
		return null;
	}

	$last_ios_used     = self::get_last_used_or_null( 'ios', $mobile_usage );
	$last_android_used = self::get_last_used_or_null( 'android', $mobile_usage );

	return max( $last_android_used, $last_ios_used );
}