Automattic\WooCommerce\Internal\Orders
MobileMessagingHandler::get_last_used_or_null()
Returns last used date of specified mobile app platform.
Method of the class: MobileMessagingHandler{}
No Hooks.
Return
?DateTime
. last used date of specified mobile app
Usage
$result = MobileMessagingHandler::get_last_used_or_null(;
MobileMessagingHandler::get_last_used_or_null() MobileMessagingHandler::get last used or null code WC 9.5.1
private static function get_last_used_or_null( string $platform, array $mobile_usage ): ?DateTime { try { if ( array_key_exists( $platform, $mobile_usage ) ) { return new DateTime( $mobile_usage[ $platform ]['last_used'] ); } else { return null; } } catch ( Exception $e ) { return null; } }