{"id":908,"date":"2020-06-30T10:00:00","date_gmt":"2020-06-30T15:00:00","guid":{"rendered":"https:\/\/easydigitaldownloads.com\/development\/?p=908"},"modified":"2020-06-30T10:50:40","modified_gmt":"2020-06-30T15:50:40","slug":"easy-digital-downloads-3-0-development-update-2","status":"publish","type":"post","link":"https:\/\/easydigitaldownloads.com\/development\/2020\/06\/30\/easy-digital-downloads-3-0-development-update-2\/","title":{"rendered":"Easy Digital Downloads 3.0 &#8211; Development Update"},"content":{"rendered":"\n<p>The most significant update to Easy Digital Downloads is nearing its initial beta phase. The team has been focused on finalizing the last issues related to data integrity, backwards compatibility, and migration accuracy. We\u2019ve made some updates recently that apply significant improvements to performance and compatibility with our extensions and the migration alike.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Taxes<\/h3>\n\n\n\n<p>In a previous update we showed some improvements to our Tax UI. Since then we\u2019ve made a few more significant changes and fixes that should be noted.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Deprecated the \u201cDefault Tax Rate\u201d<\/h4>\n\n\n\n<p>As we moved forward with the improvements to the tax features of Easy Digital Downloads, we realized that the \u2018Default Tax Rate\u2019 was a setting that ultimately caused problems with our new method of reporting on taxes. It also proved to be a concern as taxes should be applied to a region, but a default tax rate has no region. As such, if Easy Digital Downloads detects a \u2018Default Tax Rate\u2019, we are letting stores know this is no longer supported and a region specific tax rate should be identified.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Tax rate improvements<\/h4>\n\n\n\n<p>We\u2019ve worked towards making managing tax rates easier in 3.0. On top of the new UI for managing taxes we\u2019ve fixed a few cases where users could add multiple active tax rates for an entire country both in the UI as well as during the migration process.<\/p>\n\n\n\n<p>We\u2019re also planning to include auto-saving tax rates, negating the need to \u2018save changes\u2019 after each tax rate modification. This will be done in our Post-Alpha phase.<\/p>\n\n\n\n<p>We\u2019ve also identified and fixed a bug in the migration where a tax rate was being incorrectly rounded up or down to meet the currency decimal point defined by the store&#8217;s default currency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reporting updates<\/h3>\n\n\n\n<p>One of the most improved features of Easy Digital Downloads 3.0 is the reporting system. Thanks to a large amount of database changes and custom tables, the team has been able to improve reporting. The most recent focus was finalizing the UI around reports to make things consistent and accurate no matter what report you are viewing.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Gross\/Net status functions<\/h4>\n\n\n\n<p>To assist in the accurate reporting in all aspects of Easy Digital Downloads, we\u2019ve introduced two functions which return statuses of orders that would be considered to affect gross and net statistics.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">edd_get_gross_order_statuses()<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">edd_get_net_order_statuses()<\/pre>\n\n\n\n<p>These two functions also include filters to allow extension developers to include their own statuses in these calculations, if they are needed. The goal with these two functions is to use a Don\u2019t Repeat Yourself (DRY) method of when to include an order when calculating statistics.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Date ranges in reports<\/h4>\n\n\n\n<p>As any developer knows, dates can be difficult. We\u2019ve put some significant effort over the last couple months making sure that when viewing reports, that it is clear that the date ranges are clear and match the expected outcomes. This has caused us to make some significant updates to the filter handlers for reporting.<\/p>\n\n\n\n<p>We\u2019ve also worked on fixing some inconsistencies in the reports that caused the edges of date ranges to not be included in the requested reports. This was a bug that presented itself in current versions of EDD, and thanks to the new reporting APIs, was an easy fix with the new 3.0 data structure.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Improved customer statistics<\/h4>\n\n\n\n<p>In previous versions of EDD, our customer reporting statistics for lifetime value and lifetime purchase counts were all ledger based. As new orders were placed or refunded we would simply take the existing value, and add or subtract the modified amount. This could lead to inaccurate reporting and forced us to introduce a tool to \u2018recalculate stats\u2019 that needed to be used more frequently than we liked to see.<\/p>\n\n\n\n<p>In 3.0, again thanks to the new database structure, it is an insignificant process for us to quickly, and accurately calculate a customer\u2019s statistics without needing a ledger. When an order is modified for a customer, we quickly recalculate the entire lifetime value and purchase count of the customer, avoiding inaccuracies due to ledger inconsistencies.<\/p>\n\n\n\n<p>The above change, however, does remove the ability to directly affect a customer\u2019s lifetime value or purchase count. <strong>As of 3.0, the methods to increase a customer\u2019s value or purchase count by an arbitrary amount are deprecated.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Customer updates<\/h3>\n\n\n\n<p>One of the most significant changes to the customer feature of Easy Digital Downloads comes in how both physical addresses and email addresses are managed. Both email addresses and physical addresses have custom tables instead of storing this data in meta, which significantly improves the performance of looking up customers.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Physical address improvements<\/h4>\n\n\n\n<p>In recent changes, we\u2019ve introduced the concept of physical address \u2018types\u2019 as well as a way to identify what the \u2018primary\u2019 physical address is. While Easy Digital Downloads core only supports the billing address out of the box, extensions like Simple Shipping can add in shipping addresses, which will allow each customer to have multiple types of primary addresses, for use in future updates to both EDD and extensions.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Avoid duplicate address data<\/h4>\n\n\n\n<p>Our previous methods of storing physical address data resulted in a large number of duplicated addresses for customers. We\u2019ve made some drastic improvements to the address validation before inserting new addresses into the customer record so that we don\u2019t fill your database with duplicate data, including during the migration process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">UI and accessibility updates<\/h3>\n\n\n\n<p>After all of the work that was done in an effort to improve the performance and data structures, we needed to make some significant updates to the UI to reflect these changes. With that, we took the opportunity to improve not just the overall UI, but the mobile-friendly access, as well as accessibility. While we aren\u2019t done yet we\u2019ll be making further improvements as we near the 3.0 release, and shortly after it. Some of the areas where we\u2019ve put in the most effort to improve the UI are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Order details<\/li><li>Order list tables<\/li><li>Tax rates<\/li><li>Settings<\/li><li>Download Post Type Metaboxes<\/li><\/ul>\n\n\n\n<p>While we aren\u2019t fully done with improving the accessibility of the UI and making things more semantic when it comes to our form inputs, you can follow along <a href=\"https:\/\/github.com\/easydigitaldownloads\/easy-digital-downloads\/wiki\/Form-Input-Markup\">here<\/a>. Note this is a living document and is subject to change.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is next\u2026<\/h3>\n\n\n\n<p>We\u2019ve split the last part of this development into two projects:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Pre-Alpha<\/li><li>Post-Alpha<\/li><\/ul>\n\n\n\n<p>At Sandhills development, we like to use our software internally prior to any beta release. This is so we can identify any issues we find internally before releasing them to our customers, even in a beta phase.<\/p>\n\n\n\n<p>Our project for Pre-Alpha are changes that we have to complete prior to when we start internally testing on our sites, and getting all of our extensions updated to support Easy Digital Downloads 3.0. Upon completion of the Pre-Alpha project we\u2019ll shift our focus to extension releases that make them compatible with 3.0 ahead of release, so you shouldn\u2019t have to worry about your extensions working with 3.0 after release.<\/p>\n\n\n\n<p>Once we\u2019re running an alpha on our own data sets, we\u2019ll be shifting our focus to Post-Alpha project issues, after which, we will be publishing our first beta for public testing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The most significant update to Easy Digital Downloads is nearing its initial beta phase. The team has been focused on finalizing the last issues related to data integrity, backwards compatibility, and migration accuracy. We\u2019ve made&#8230;<\/p>\n<p class=\"continue-reading\"><a class=\"more-link\" href=\"https:\/\/easydigitaldownloads.com\/development\/2020\/06\/30\/easy-digital-downloads-3-0-development-update-2\/\">Continue reading &rarr;<\/a><\/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":[17],"class_list":["post-908","post","type-post","status-publish","format-standard","hentry","category-core","tag-3dd"],"_links":{"self":[{"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts\/908","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=908"}],"version-history":[{"count":7,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts\/908\/revisions"}],"predecessor-version":[{"id":918,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/posts\/908\/revisions\/918"}],"wp:attachment":[{"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/media?parent=908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/categories?post=908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easydigitaldownloads.com\/development\/wp-json\/wp\/v2\/tags?post=908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}