{"id":173,"date":"2017-01-30T13:04:55","date_gmt":"2017-01-30T19:04:55","guid":{"rendered":"https:\/\/easydigitaldownloads.com\/development\/?p=173"},"modified":"2021-12-15T15:31:17","modified_gmt":"2021-12-15T21:31:17","slug":"version-2-7-beta-1-now-available","status":"publish","type":"post","link":"https:\/\/easydigitaldownloads.com\/development\/2017\/01\/30\/version-2-7-beta-1-now-available\/","title":{"rendered":"Version 2.7 beta 1 now available"},"content":{"rendered":"<p>Easy Digital Downloads version 2.7 is getting close to being ready. Today we&#8217;re happy to announce the first beta version of the release.<\/p>\n<p>There are numerous significant improvements in 2.7 and we would like to encourage all theme and plugin developers, as well as store owners, to test the beta version as soon as possible so that we can ensure the final release goes smoothly.<\/p>\n<p>To ensure that the update to version 2.7 goes smoothly, we need as many people as possible to help test the beta. This release includes more than 550 commits, so there is a ton to test. Every bug that we catch between now and the final release is one less problem for live sites.<\/p>\n<h3>Testing the beta<\/h3>\n<p>To ensure that the update to version 2.7 goes smoothly, we need as many people as possible to help test the beta. Every bug that we catch between now and the final release is one less problem for live sites.<\/p>\n<p><strong>Please do not test this beta on a live site. We highly recommend using a <a href=\"https:\/\/easydigitaldownloads.com\/blog\/staging-site-e-commerce\/\">staging site<\/a>. You can find our guide to set up a\u00a0local testing environment <a href=\"https:\/\/easydigitaldownloads.com\/blog\/a-testing-server-the-easy-way\/\">here<\/a>.<\/strong><\/p>\n<p>The latest version of the beta may be <a href=\"https:\/\/github.com\/easydigitaldownloads\/easy-digital-downloads\/archive\/2.7-beta1.zip\" target=\"_blank\" rel=\"noopener\">downloaded from GitHub<\/a>.<\/p>\n<h3>Important changes<\/h3>\n<p><strong>Cart API<\/strong><\/p>\n<p>We&#8217;ve introduced a new API\u00a0for the cart which handles\u00a0all the cart actions and functions. \u00a0It has been designed to be significantly\u00a0more efficient\u00a0than our previous\u00a0implementation of the cart.<\/p>\n<p>The EDD_Cart API provides a centralized way to manipulate the cart; prior to 2.7, all interactions\u00a0with the cart occurred via <code>edd_cart_<\/code>\u00a0functions. We have always provided many ways for extensions to filter cart data, though each call to an edd_cart_ function resulted in those filters being run repeatedly. The EDD_Cart API has been built to minimize those calls, ensuring that filters only need to be run once.\u00a0This led to significant improvement to the page load time for the checkout from\u00a02.6865 seconds to\u00a00.8456\u00a0seconds.<\/p>\n<p><strong>Significantly faster reporting and querying<\/strong><\/p>\n<p>In 2.7 we have\u00a0completely\u00a0rewritten the way reports are queried. \u00a0Previously, we\u00a0were creating a\u00a0lot of unnecessary objects resulting in extremely high memory usage and slow load time. \u00a0This release introduces\u00a0queries made directly to\u00a0the database hence requiring very little\u00a0processing of data.<\/p>\n<p>On our own\u00a0site, running a report from Jan 1 2012 to Jan 1 2017 took over three minutes previously, now the entire report\u00a0and page loads in 1-2 seconds with\u00a0a fraction of the database queries and memory usage.<\/p>\n<p><strong>Introduction of edd_get_payment()<\/strong><\/p>\n<p>A new\u00a0function\u00a0has been introduced to\u00a0act as a wrapper method for retrieving an instance of an <code>EDD_Payment<\/code>\u00a0object in lieu of\u00a0creating an instance\u00a0by accessing the class directly.<\/p>\n<p>The <code>edd_get_payment()<\/code>\u00a0function works with the object cache\u00a0to\u00a0improve performance of\u00a0retrieving payments. \u00a0The new function accepts the same\u00a0parameters as the constructor of <code>EDD_Payment<\/code>\u00a0but also returns <code>false<\/code> if a payment was not found (i.e. incorrect payment ID was specified).<\/p>\n<p><strong>Redesigned View Order Details Page<\/strong><\/p>\n<p>The View Order Details page that can be accessed from Downloads \u2192 Payment History has received a major overhaul to simplify changing the customer on a payment and allowing individual item price manipulation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-228\" src=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.50.36.png\" alt=\"\" width=\"1438\" height=\"529\" srcset=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.50.36.png 1438w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.50.36-300x110.png 300w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.50.36-768x283.png 768w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.50.36-1024x377.png 1024w\" sizes=\"auto, (max-width: 1438px) 100vw, 1438px\" \/><\/p>\n<p>The redesigned screen allows alteration of the item\u00a0price, tax, and quantities (if enabled). \u00a0It has been redesigned to\u00a0allow alteration of the data in a more structured way.<\/p>\n<p>We have\u00a0made\u00a0UX improvements for the way a customer\u00a0on a payment record is changed. \u00a0We&#8217;ve added a link &#8220;Assign to another\u00a0customer&#8221; which displays a dropdown of\u00a0customers the payment can switched over to or the user can choose &#8220;New Customer&#8221; where they would enter the name and email address of the customer.<\/p>\n<p><strong>CSV Earnings Report<\/strong><\/p>\n<p>EDD 2.7 introduces a new CSV Earnings Report which replaces our old Sales and Earnings PDF\u00a0Report. The new report details sales and refunds, as well as revoked, abandoned, failed, and cancelled payments over a period of time.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-183\" src=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.47.43.png\" alt=\"\" width=\"915\" height=\"242\" srcset=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.47.43.png 915w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.47.43-300x79.png 300w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.47.43-768x203.png 768w\" sizes=\"auto, (max-width: 915px) 100vw, 915px\" \/><\/p>\n<p><strong>Discounts API<\/strong><\/p>\n<p>Another new API we are introducing in 2.7 is the <code>EDD_Discount<\/code> API. \u00a0It has been designed to simplify handling\u00a0discount codes and follows the same model to that of <code>EDD_Payment<\/code>\u00a0making\u00a0altering a discount\u00a0simple too. Previously, all discount interaction was handled through the <code>edd_discount_<\/code> functions, resulting in the creation of a new object each time a function was called. \u00a0Now, a single\u00a0instance of <code>EDD_Discount<\/code>\u00a0holds everything about that discount code making discounts more efficient in general.<\/p>\n<p><strong>Variable Pricing\u00a0for Bundles<\/strong><\/p>\n<p>Variable pricing for bundles works the same way that it does for regular downloads.\u00a0Previously,\u00a0variable pricing was not an option for bundles. This new feature in 2.7 also allows for download variants to be tied to bundle variants.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-180\" src=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.03.51-1024x737.png\" alt=\"\" width=\"722\" height=\"520\" srcset=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.03.51-1024x737.png 1024w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.03.51-300x216.png 300w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.03.51-768x552.png 768w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.03.51.png 1133w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/p>\n<p>With the configuration above, we\u00a0have a download named Download Bundle which consists of three variable prices: Regular, Plus, and Business. We have three\u00a0separate downloads: Download [D1], Download [D2] and Download [D3]. \u00a0Bundle variation pricing allows\u00a0Download [D1]\u00a0to only be accessible to customers who purchase the Plus variant of the bundle.<\/p>\n<p>If a customer purchased the Business variant of the bundle,\u00a0viewing the order details on Purchase History would look like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-223\" src=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.41.46.png\" alt=\"\" width=\"585\" height=\"280\" srcset=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.41.46.png 737w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-17.41.46-300x144.png 300w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/p>\n<p>Notice that Download [D3] &#8211; Business is also displayed and the business variant of Download [D3]\u00a0has the price assignment set to All meaning that download will be\u00a0available regardless of the variant chosen.<\/p>\n<p>It\u00a0should be noted that to allow for this to work, template changes have been made to <code>shortcode-receipt.php<\/code>\u00a0to display bundle variations and the download files correctly. \u00a0As bundles work\u00a0differently than regular downloads,\u00a0this template change was necessary.<\/p>\n<p>The lines altered in the template file are <a href=\"https:\/\/github.com\/easydigitaldownloads\/easy-digital-downloads\/blob\/release\/2.7\/templates\/shortcode-receipt.php#L174-L202\">here<\/a>.<\/p>\n<p><strong>Complete Abandoned\/Pending Purchases<\/strong><\/p>\n<p>EDD 2.7 allows users to resume incomplete purchases on subsequent visits. This includes both completing abandoned purchases and resubmitting purchases which may not have completed successfully when initially submitted.<\/p>\n<p>An example scenario is as follows:<\/p>\n<ul>\n<li>Customer adds items\u00a0to their cart<\/li>\n<li>Customer goes\u00a0through the checkout with PayPal, but does not complete it on the PayPal end (and does not click &#8216;Cancel and Return to Site&#8217;)<\/li>\n<li>Customer visits their &#8216;Purchase History&#8217; page and finds the newly added pending payment<\/li>\n<li>A &#8216;Complete Purchase&#8217; button will appear allowing the\u00a0customer to checkout with PayPal and\u00a0complete the transaction.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-191\" src=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-16.12.01.png\" alt=\"\" width=\"621\" height=\"370\" srcset=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-16.12.01.png 735w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-16.12.01-300x179.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p><strong>Exporting\u00a0Logs<\/strong><\/p>\n<p>EDD makes heavy usage of logs when\u00a0specific actions are triggered. \u00a0EDD 2.7\u00a0allows you to export sales, downloads and API request logs across a period of time.<\/p>\n<p>The logs can be exported from the Downloads \u2192 Report \u2192 Export page<\/p>\n<figure id=\"attachment_186\" aria-describedby=\"caption-attachment-186\" style=\"width: 896px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-186 size-full\" src=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.52.50.png\" width=\"896\" height=\"625\" srcset=\"https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.52.50.png 896w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.52.50-300x209.png 300w, https:\/\/easydigitaldownloads.com\/development\/files\/2017\/01\/Screen-Shot-2017-01-30-at-15.52.50-768x536.png 768w\" sizes=\"auto, (max-width: 896px) 100vw, 896px\" \/><figcaption id=\"caption-attachment-186\" class=\"wp-caption-text\">An example of a log showing API requests<\/figcaption><\/figure>\n<p><strong>Other notable improvements<\/strong><\/p>\n<p>The\u00a0changes above are the primary features we&#8217;d like to highlight, but there are other important improvements\u00a0as well.<\/p>\n<ul>\n<li>The applied tax rate is now saved in the payment meta and displayed on the View Order Details screen<\/li>\n<li>Selected image size is now inserted into File URL field in Download Files box<\/li>\n<li>Messages registered with <code>edd_set_error<\/code> are now output via a hook<\/li>\n<li>Improved WP-CLI payment creation to support a date range<\/li>\n<li>Quantity fields can now be disabled on individual download products<\/li>\n<li><code>EDD_Payment<\/code> and <code>edd_get_payment<\/code> now accept a payment transaction ID<\/li>\n<li>Introduced a more EDD-specific downloads shortcode <code>[[edd_downloads]]<\/code><\/li>\n<li>Moved edd-ajax.min script to footer to allow async loading of jQuery<\/li>\n<li>Added a &#8216;Refresh Reports&#8217; button to the graph view<\/li>\n<li>Switched to using new IPN endpoints for PayPal Standard<\/li>\n<li>Zip \/ postal code now included in tax calculation function<\/li>\n<li>Improved the fault tolerance and error handling of creating discount codes<\/li>\n<li>The HTML markup of the profile editor has been updated to match other forms in EDD<\/li>\n<\/ul>\n<p><strong>Notable bugs fixed<\/strong><\/p>\n<ul>\n<li>EDD_License did not properly support <code>item_id<\/code><\/li>\n<li>Earnings by Category estimates were not correct<\/li>\n<li>Stopped redirect to PayPal on Buy Now buttons if PayPal gateway is disabled<\/li>\n<li>Amazon Gateway settings are now checked before loading the scripts for Amazon Payments<\/li>\n<li>The <code>edd_download_redirect_to_checkout<\/code> filter wasn&#8217;t respecting the desired outcome in some configurations<\/li>\n<li>The payment notes were included in normal comment count<\/li>\n<li>Disabling API request logging was not working<\/li>\n<li>The <code>history-downloads.php<\/code> template was not properly showing variable price names<\/li>\n<li>When adding fee to cart, we now preserve the decimal precision<\/li>\n<li>Recounting store stats now resets the report transients<\/li>\n<li>Multi-option purchase mode and variable prices work better with buy now buttons<\/li>\n<\/ul>\n<p>As with any release, there are always bugs to fix. In 2.7 beta 1 we have fixed 26 bugs.<\/p>\n<p>At this time, we hope to release version 2.7 on or near <strong>13th February 2017<\/strong>.<\/p>\n<p><strong>Translators note:\u00a0<\/strong>2.7 has been pushed to trunk on WordPress.org and is now available for translation updates via <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/easy-digital-downloads\">translate.wordress.org<\/a>.<\/p>\n<p>Have a question or comment? Think you found a bug? Let us know by leaving a comment below!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Easy Digital Downloads version 2.7 is getting close to being ready. Today we&#8217;re happy to announce the first beta version of the release.<\/p>\n<p>There are numerous significant improvements in 2.7 and we would like to encourage all theme and plugin developers, as well as store owners, to test the beta version as soon as possible so that we can ensure the final release goes smoothly.<\/p>\n","protected":false},"author":650,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-173","post","type-post","status-publish","format-standard","hentry","category-core"],"_links":{"self":[{"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts\/173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/users\/650"}],"replies":[{"embeddable":true,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":10,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts\/173\/revisions"}],"predecessor-version":[{"id":1110,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts\/173\/revisions\/1110"}],"wp:attachment":[{"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/media?parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/categories?post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/tags?post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}