get_access_expires() public method

Get access_expires.
public get_access_expires ( string $context = 'view' ) : integer
$context string
return integer
 /**
  * Method to update a download in the database.
  *
  * @param WC_Customer_Download $download
  */
 public function update(&$download)
 {
     global $wpdb;
     $data = array('download_id' => $download->get_download_id(), 'product_id' => $download->get_product_id(), 'user_id' => $download->get_user_id(), 'user_email' => $download->get_user_email(), 'order_id' => $download->get_order_id(), 'order_key' => $download->get_order_key(), 'downloads_remaining' => $download->get_downloads_remaining(), 'access_granted' => date('Y-m-d', $download->get_access_granted()), 'download_count' => $download->get_download_count(), 'access_expires' => $download->get_access_expires() ? date('Y-m-d', $download->get_access_expires()) : 'NULL');
     $format = array('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d', '%s');
     $wpdb->update($wpdb->prefix . 'woocommerce_downloadable_product_permissions', $data, array('permission_id' => $download->get_id()), $format);
     $download->apply_changes();
 }
 /**
  * Check if the download has expired.
  * @param  WC_Customer_Download $download
  * @access private
  */
 private static function check_download_expiry($download)
 {
     if ($download->get_access_expires() > 0 && $download->get_access_expires() < strtotime('midnight', current_time('timestamp'))) {
         self::download_error(__('Sorry, this download has expired', 'woocommerce'), '', 403);
     }
 }