Easy Digital Downloads - Version 2.6.7

Version Description

Download this release

Release Info

Developer cklosows
Plugin Icon 128x128 Easy Digital Downloads
Version 2.6.7
Comparing to
See all releases

Code changes from version 2.6.6 to 2.6.7

Files changed (49) hide show
  1. assets/css/edd-admin.css +5 -1
  2. assets/css/edd-admin.min.css +1 -1
  3. assets/js/edd-ajax.js +2 -2
  4. assets/js/edd-ajax.min.js +1 -1
  5. easy-digital-downloads.php +3 -3
  6. includes/EDD_SL_Plugin_Updater.php +9 -2
  7. includes/admin/customers/customer-actions.php +19 -3
  8. includes/admin/customers/customers.php +1 -2
  9. includes/admin/downloads/dashboard-columns.php +4 -4
  10. includes/admin/downloads/metabox.php +18 -6
  11. includes/admin/import/class-batch-import-downloads.php +13 -7
  12. includes/admin/import/import-functions.php +17 -2
  13. includes/admin/reporting/export/class-batch-export-payments.php +12 -11
  14. includes/admin/settings/display-settings.php +3 -2
  15. includes/admin/settings/register-settings.php +49 -33
  16. includes/admin/thickbox.php +1 -1
  17. includes/admin/tools.php +1 -0
  18. includes/admin/tools/class-edd-tools-recount-single-customer-stats.php +2 -2
  19. includes/admin/upgrades/upgrade-functions.php +2 -2
  20. includes/api/class-edd-api-v2.php +7 -7
  21. includes/api/class-edd-api.php +13 -13
  22. includes/cart/actions.php +9 -1
  23. includes/cart/functions.php +1 -1
  24. includes/checkout/template.php +1 -1
  25. includes/class-edd-fees.php +4 -0
  26. includes/class-edd-html-elements.php +15 -1
  27. includes/discount-functions.php +11 -6
  28. includes/emails/functions.php +1 -1
  29. includes/install.php +1 -1
  30. includes/payments/actions.php +42 -0
  31. includes/payments/class-edd-payment.php +26 -2
  32. includes/payments/functions.php +0 -6
  33. includes/plugin-compatibility.php +1 -1
  34. includes/post-types.php +4 -4
  35. includes/process-download.php +1 -1
  36. includes/scripts.php +6 -0
  37. includes/shortcodes.php +1 -1
  38. includes/tax-functions.php +1 -1
  39. includes/template-functions.php +5 -5
  40. languages/easy-digital-downloads.pot +5 -5
  41. readme.txt +96 -59
  42. templates/edd.css +4 -4
  43. templates/images/icons/amazon.png +0 -0
  44. templates/images/icons/americanexpress.png +0 -0
  45. templates/images/icons/discover.png +0 -0
  46. templates/images/icons/iphone.png +0 -0
  47. templates/images/icons/mastercard.png +0 -0
  48. templates/images/icons/paypal.png +0 -0
  49. templates/images/icons/visa.png +0 -0
assets/css/edd-admin.css CHANGED
@@ -554,6 +554,11 @@ textarea#edd-payment-note {
554
  .edd_dashboard_widget td {
555
  padding: 3px 0;
556
  }
 
 
 
 
 
557
  .edd_dashboard_widget .b {
558
  font-size: 14px;
559
  font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
@@ -563,7 +568,6 @@ textarea#edd-payment-note {
563
  .edd_dashboard_widget .t {
564
  font-size: 12px;
565
  padding-right: 12px;
566
- padding-top: 6px;
567
  color: #777;
568
  width: 100%;
569
  }
554
  .edd_dashboard_widget td {
555
  padding: 3px 0;
556
  }
557
+ .edd_dashboard_widget .b,
558
+ .edd_dashboard_widget .t {
559
+ line-height: 1.5;
560
+ vertical-align: middle;
561
+ }
562
  .edd_dashboard_widget .b {
563
  font-size: 14px;
564
  font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
568
  .edd_dashboard_widget .t {
569
  font-size: 12px;
570
  padding-right: 12px;
 
571
  color: #777;
572
  width: 100%;
573
  }
assets/css/edd-admin.min.css CHANGED
@@ -1 +1 @@
1
- .edd-admin-box .label,.edd-admin-box-inside .strong{font-weight:600}.edd-mobile-link,.edd_repeatable_row td{vertical-align:middle}.edd-hidden{display:none}.edd-clearfix:after{content:".";display:block;height:0;text-indent:-9999px;visibility:hidden}.edd-wrap a{text-decoration:none}a.edd-delete{color:#a00}a.edd-delete:hover{color:red}.download_page_edd-settings .form-table label{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}.download_page_edd-settings .form-table input.small-text~label,.download_page_edd-settings .form-table input[type=checkbox]+label{display:inline}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.edd-help-tip{cursor:help}.edd-ui-tooltip{background:#333!important;border-radius:3px!important;box-shadow:1px 1px 2px 1px rgba(214,214,214,.5);color:#dedede!important;max-width:300px;padding:7px;text-rendering:optimizeLegibility}#edd-add-ons h2.nav-tab-wrapper{position:relative}#edd-add-ons h2 .button-primary,.edd-tab-span{position:absolute}.edd-tab-span{top:-6px;right:0}.edd-add-ons-footer{padding-top:10px}#edd-add-ons h2{margin:0 0 15px}#edd-add-ons .edd-extension{background:#fff;border:1px solid #ccc;float:left;padding:14px;position:relative;margin:0 15px 15px 0;width:320px;height:315px}#edd-add-ons .edd-extension h3{font-size:13px;margin:0 0 8px}#edd-add-ons .edd-extension .button-secondary{position:absolute;bottom:14px;left:14px}#edd-add-ons .edd-browse-all{clear:both;width:100%}#edd-add-ons .edd-extension .third-party{display:none}#edd-add-ons .edd-starter-package{background-color:#85c0e5;border-color:#62a9d7;color:#fff}#edd-add-ons .edd-starter-package h3{color:#fff}#edd-add-ons .edd-extension .wp-post-image{width:100%;height:auto}#edd-products{height:100px;min-width:200px}#edd-add-discount input[type=checkbox],#edd-edit-discount input[type=checkbox]{width:15px}#edd-payment-filters{background:#f5f5f5;clear:both;background-image:-webkit-gradient(linear,left bottom,left top,from(#f5f5f5),to(#fafafa));background-image:-webkit-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-moz-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-o-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:linear-gradient(to top,#f5f5f5,#fafafa);border-color:#dfdfdf;border-width:1px;border-style:solid;border-radius:3px;font-size:13px;line-height:2.1em;overflow:auto;padding:12px;margin:8px 0}#edd-payments-filter ul.subsubsub{margin-bottom:8px}#edd-payment-filters p{color:#777}tr.status-refunded td{background:#cecece;border-top-color:#ccc}.wp-list-table.downloads th#ID{width:80px}.wp-list-table.downloads th#details{width:130px}.wp-list-table.downloads th#date{width:140px}.wp-list-table.downloads th#user{width:130px}.edd-mobile-link{line-height:32px}.edd-mobile-link img{max-width:80%;height:auto;float:left}@media handheld,only screen and (max-width:640px){.wp-list-table.downloads th{width:auto!important}}.download_page_edd-payment-history .ui-dialog .ui-dialog-titlebar-close span{margin-left:-8px;margin-top:-8px}#edd-download-link-textarea{width:100%}.edd_files_name_label{width:225px;float:left}.edd_files_url_label{width:220px;float:left}#postbox-container-1 .edd_files_name_label,#postbox-container-1 .edd_files_url_label{width:80px}.edd_add_repeatable{display:inline-block}#downloadinformation .edd_meta_table_wrap table input,#downloadinformation .edd_meta_table_wrap table select,#downloadinformation .edd_meta_table_wrap table textarea{margin:4px 0;width:100%}#downloadinformation .edd_meta_table_wrap table .submit input{width:auto}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container{position:relative}.edd_upload_file{background:#fff;display:block;padding:2px 8px;position:absolute;top:3px;right:7px}.edd_upload_field{padding-right:8em}.edd_remove_repeatable{border:none;cursor:pointer;display:inline-block;padding:0;overflow:hidden;margin:8px 0 0;text-indent:-9999px;width:10px;height:10px}.edd_remove_repeatable:active,.edd_remove_repeatable:focus,.edd_remove_repeatable:hover{background-position:-10px 0!important}.edd_draghandle{background:url(../images/edd-cross-hair.png);cursor:move;display:block;margin:4px 0 0;width:20px;height:20px}textarea#edd-payment-note{width:100%;height:4em;margin:0}.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%}#edd_product_notes_field{margin:0;width:98%;height:4em}.edd_repeatable_default_wrapper{text-align:center;width:25px}#edd-purchased-files ul li.remove,td.edd_order_price{text-align:right}.edd-admin-box-inside{border-bottom:1px solid #eee;clear:both;padding:3px 12px;margin:0;word-break:break-word}.rtl .edd-admin-box-inside{padding:5px 10px 5px 0}.edd-payment-fees .fee-label{color:#666;font-weight:400}.edd-admin-box .right{float:right}.rtl .edd-admin-box .right{float:left;margin-left:10px}#edd-customer-details .actions,#edd-order-recalc-total{float:right}#edd-order-details .inside,#edd-order-update .inside{margin:0;padding:0}#edd-order-update input.edd_datepicker{width:180px}#edd-order-update input[type=number].edd-payment-time-hour,#edd-order-update input[type=number].edd-payment-time-min{width:50px}#edd-order-resend-receipt .inside{margin-top:11px}.edd-admin-box-inside:last-child{border-bottom:0}#edd-edit-order-form .data-payment-key{word-break:break-all}.edd-order-update-box #major-publishing-actions .button-secondary{margin-right:10px}#edd-purchased-files .edd-select-chosen{width:196px}#edd-customer-details .order-data-address input,#edd-customer-details .order-data-column p.data input,#edd-edit-order-form .column input,#edd-order-address-country-wrap select,#edd-purchased-files ul{clear:both;display:block}.edd-order-data input.small-text{margin:0}.edd-order-data input.med-text{margin:0;width:100px}#edd-order-update span.label{display:inline;width:50px}.edd-order-update-box .button-primary{margin-right:0}#edd-edit-order-form .column .description{padding-right:10px}#edd-edit-order-form .column,#edd-purchased-files .inside>ul>li,#edd-purchased-files .row>ul>li{display:inline-block;line-height:30px;position:relative;margin-right:5%;vertical-align:middle}#edd-purchased-files li.actions{min-width:200px;text-align:right}#edd-purchased-files .row{border-bottom:1px solid #eee;padding:12px}#edd-purchased-files ul{font-size:0}#edd-purchased-files ul li{font-size:13px}#edd-order-data .data span{color:#666;font-weight:600}#edd-purchased-files .inside{padding:12px}.edd-price-field{width:80px}#edd_products .edd-select,.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%;max-width:200px}.edd_repeatable_product_wrapper td{overflow:visible}@media screen and (max-width:782px){.order-data-column input[type=email]{padding:6px 10px}}@media screen and (min-width:851px){#edd-purchased-files .inside li.actions{text-align:right}}@media screen and (max-width:1024px){#edd-edit-order-form .column{width:49%}}@media screen and (max-width:1280px) and (min-width:1279px){#edd-purchased-files .inside li.actions{width:35%}#edd-edit-order-form .column{width:32%}}@media screen and (min-width:1280px){#edd-edit-order-form .column,#edd-purchased-files.columns-3 .inside>ul>li,#edd-purchased-files.columns-3 .row>ul>li{width:32%;margin-right:3%}#edd-edit-order-form .columns-4 .column,#edd-purchased-files.columns-4 .inside>ul>li,#edd-purchased-files.columns-4 .row>ul>li{width:22%;margin-right:2%}#edd-edit-order-form .column:nth-child(2n+1),#edd-edit-order-form .columns-3 .column:nth-child(2n+1),#edd-edit-order-form .columns-4 .column:nth-child(3n+1){margin-right:0}#edd-purchased-files.columns-4 li.download{width:33%}#edd-purchased-files.columns-3 .inside>ul>li.price,#edd-purchased-files.columns-3 .row>ul>li.price,#edd-purchased-files.columns-4 li.price{width:14%}#edd-purchased-files.columns-4 li.actions{width:25%;margin-top:0;margin-right:0}}@media screen and (max-width:1284px){#edd-edit-order-form .column strong{display:block}}#edd_product_stats .label{display:inline-block}#edd_product_stats hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}#edd_product_stats .product-earnings-stats:before,#edd_product_stats .product-sales-stats:before{color:#82878c;font:400 20px/1 dashicons;display:inline-block;padding:0 2px 0 0;position:relative;top:0;left:-1px;speak:none;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#edd-item-card-wrapper a.delete,#edd-item-stats-wrapper a,.customer-edit-link a,.disconnect-user a,.wrap-licenses .edd-license-data.edd-license-expired a:hover,.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover,.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}#edd_product_stats .product-sales-stats:before{content:'\f174'}#edd_product_stats .product-earnings-stats:before{content:'\f239'}.edd_dashboard_widget table thead td{border-bottom:1px solid #ececec;color:#777}.edd_dashboard_widget .table_left{float:left;width:45%}.edd_dashboard_widget .table_right{float:right;width:45%}.edd_dashboard_widget .inside{font-size:12px}.edd_dashboard_widget td{padding:3px 0}.edd_dashboard_widget .b{font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;padding-right:6px;width:auto}.edd_dashboard_widget .t{font-size:12px;padding-right:12px;padding-top:6px;color:#777;width:100%}.edd_dashboard_widget .label_heading{border-top:1px solid #ececec;color:#8f8f8f;font-family:Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;display:block;padding-top:10px;margin:0 0 8px 12px}.edd_dashboard_widget .edd_dashboard_widget_subheading{border-top:1px solid #ececec;color:#8f8f8f;font-size:14px;padding-top:10px;margin:1em 0 0}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0}.edd_dashboard_widget .edd_price_label{background:#00769c;border-radius:3px;color:#fff;font-size:10px;padding:2px 4px;margin-right:2px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}@media handheld,only screen and (max-width:1000px){.edd_dashboard_widget .edd-recent-email{display:none}}#edd-dashboard-widgets-wrap .postbox h3{cursor:default}#edd-date-range-options,#edd-graphs-date-options{float:left}#edd-date-range-options span{float:left;line-height:24px;height:24px;margin-right:6px}.edd-import-export-form{position:relative}.edd-import-export-form .edd-progress{background:#ddd;position:absolute;bottom:15px;width:95%;height:15px}.edd-import-export-form .edd-progress div{background:#ccc;height:100%;width:0}.edd-import-export-form .notice-wrap{background-color:#f4f4f4;border-style:solid;border-width:1px 0;border-color:#eae9e9;padding:12px 12px 4px;overflow:auto;margin:20px -12px -23px}.edd-import-export-form .notice-wrap .spinner{margin:4px 10px 8px}.admin-color-fresh .edd-import-export-form .edd-progress div{background:#0073aa}.admin-color-light .edd-import-export-form .edd-progress div{background:#888}.admin-color-blue .edd-import-export-form .edd-progress div{background:#096484}.admin-color-coffee .edd-import-export-form .edd-progress div{background:#c7a589}.admin-color-ectoplasm .edd-import-export-form .edd-progress div{background:#a3b745}.admin-color-midnight .edd-import-export-form .edd-progress div{background:#e14d43}.admin-color-sunrise .edd-import-export-form .edd-progress div{background:#dd823b}#edd-graphs-filter label{vertical-align:inherit}#edd-graphs-filter .graph-option-section{float:left;line-height:2.5em;padding-right:5px}.edd-mix-totals{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.edd-mix-chart{display:inline-block;width:49%;vertical-align:top}.edd-graph-notes{color:#9c9c9c}.edd-graph-notes span{display:block}.edd-pie-graph .legend{display:none}.edd-pie-legend{overflow:auto;margin-top:10px}.edd-legend-item-wrapper{color:#333;display:inline-block;font-size:8pt;padding:2px 5px 0;width:48%;height:20px}.edd-legend-color{border:1px solid #cfcfcf;display:inline-block;margin-right:5px;width:20px;height:15px}.edd-pie-legend-item{display:inline-block;vertical-align:top;width:80%}#edd_tax_rates{margin:1em 0 0}#edd_tax_rates .edd_tax_country *,#edd_tax_rates .edd_tax_state *{max-width:100%}#edd_tax_rates .edd_tax_country,#edd_tax_rates .edd_tax_state{width:180px}#edd_tax_rates .edd_tax_rate{width:80px}#edd_tax_rates th{padding:15px 10px}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses .edd-license-data.edd-license-expired a,.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses p.submit{clear:both}.post-type-download .fixed .column-name{width:27%}.post-type-download .fixed .column-description{width:30%}.post-type-download .fixed .column-slug{width:23%}.post-type-download .fixed .column-posts{text-align:left;width:17%}#system-info-textarea{background:0 0;font-family:Menlo,Monaco,monospace;display:block;overflow:auto;white-space:pre;width:800px;height:400px}#TB_window #edd-add-download:active,#TB_window #edd-add-download:focus,#TB_window #edd-add-download:hover{color:#fff}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.download_page_edd-tools .apikeys .column-user{width:192px}.edd-select-chosen{width:300px}.chosen-container-multi .chosen-choices{background-image:none;border-color:#dfdfdf;-webkit-border-radius:3px;border-radius:3px}.chosen-container-multi .chosen-choices input{border-color:#dfdfdf;height:27px!important;margin:2px}.chosen-container .chosen-drop{border-color:#aaa;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.chosen-container .search-field{float:none!important}.chosen-container .search-field input{width:90%!important}.chosen-container-active .chosen-choices{border-color:#aaa;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1);border-radius:3px 3px 0 0}.download_page_edd-tools .tablenav .actions{overflow:visible}.edd_user_search_wrap{position:relative;overflow:visible}.edd_user_search_results{position:absolute;left:0;top:27px}.edd_user_search_results a.edd-ajax-user-cancel{position:absolute;right:6px;top:2px}.edd_user_search_results ul{background:#f0f0f0;border:1px solid #dfdfdf;overflow-y:scroll;padding:10px 10px 4px;margin:0;max-height:200px;width:300px}.wp-list-table .type-download .row-actions{color:#999}@media screen and (max-width:1100px){.edd-mix-chart{display:block;width:100%}.wrap-licenses .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:782px){.post-type-download .nav-tab-wrapper a{font-size:50%;padding:2px 4px}.download_page_edd-tools .apikeys .column-user{width:80px}.license-expiration-date-notice,.license-lifetime-notice,.license-null{padding-left:0}[class^=license-] input[type=text]{margin-bottom:3px}}@media screen and (max-width:600px){.wrap-licenses .form-table tr{width:100%;min-height:230px}}#edd-item-tab-wrapper{display:inline-block;margin-left:-1px;text-align:center;z-index:1}#edd-item-tab-wrapper-list li{background-color:#fff;width:32px;height:32px}#edd-item-tab-wrapper-list .inactive{background-color:#fff;border-left:1px solid #e5e5e5;color:#eee}#edd-item-tab-wrapper-list .inactive a,#edd-item-tab-wrapper-list .inactive a:visited{color:#eee;display:block;line-height:32px;text-decoration:none}#edd-item-tab-wrapper-list .inactive a:active,#edd-item-tab-wrapper-list .inactive a:focus,#edd-item-tab-wrapper-list .inactive a:hover{color:#444}#edd-item-tab-wrapper-list .active{border-color:#e5e5e5;border-style:solid;border-width:1px 1px 1px 0}#edd-item-tab-wrapper-list :not(:last-child){margin-bottom:3px}#edd-item-tab-wrapper-list .dashicons{font-size:24px;line-height:32px}#edd-item-card-wrapper .left{float:left}#edd-item-card-wrapper .right{float:right}#edd-item-card-wrapper input{font-weight:400}#edd-item-card-wrapper .customer-id,.customer-info .customer-name{font-size:24px;font-weight:600}#edd-item-card-wrapper{background-color:#fff;border:1px solid #e5e5e5;webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;margin-left:-1px;min-height:200px;width:700px;z-index:2}#edd-item-card-wrapper .customer-section{border-bottom:1px solid #eee;margin-bottom:10px;overflow:auto}#edd-item-card-wrapper .customer-section table{margin-bottom:20px}#edd-item-card-wrapper>div{padding:0 20px}#edd-item-card-wrapper>div:first-child{padding-top:20px}#edd-item-card-wrapper>div:last-child{border:none;padding-bottom:20px}#edd-item-card-wrapper .avatar-wrap{padding-right:10px;text-align:center}#edd-item-card-wrapper .customer-main-wrapper input{width:200px}#edd-item-card-wrapper .customer-address-wrapper{margin-right:25px;max-width:33%;width:202px}#edd-item-card-wrapper .customer-address-wrapper select,#edd-item-card-wrapper .edd_user_search_results ul{width:200px}#edd-item-card-wrapper .customer-info{margin-top:5px;margin-bottom:10px;min-height:185px}#edd-item-card-wrapper .info-wrapper{min-height:125px;overflow:visible}#edd-item-card-wrapper a.delete{color:red;margin-right:5px}.customer-edit-link a,.disconnect-user a{font-size:12px;font-weight:400}#customer-edit-actions{line-height:28px;margin-bottom:20px;text-align:center}#customer-edit-actions .button-secondary{margin-right:10px}#edd-item-card-wrapper .info-item{display:block;line-height:16px;padding-bottom:5px}#edd-item-card-wrapper .edit-item{display:none}#edd-item-card-wrapper .edd_user_search_results{left:1px;top:16px}#edd-item-stats-wrapper{margin:0 auto;min-height:30px;text-align:center}#edd-item-stats-wrapper li{font-size:14px;float:left;line-height:22px;width:50%}#edd-item-stats-wrapper .dashicons{color:#888}#edd-item-tables-wrapper table{text-align:center;width:100%}#edd-item-tables-wrapper th{text-align:center}#edd-item-tables-wrapper .downloads tr>td:first-child,#edd-item-tables-wrapper .downloads tr>th:first-child,#edd-item-tables-wrapper .emails tr>td:first-child,#edd-item-tables-wrapper .emails tr>th:first-child{text-align:left}#edd-item-tables-wrapper .downloads tr>td:only-child,.delete-customer{text-align:center}#edd-item-tables-wrapper .emails .add-customer-email-row td{background-color:#f9f9f9;border-top:1px solid #e5e5e5}#edd-item-tables-wrapper .emails .primary-email-icon{font-size:13px;vertical-align:middle;line-height:1.5em}#edd-item-tables-wrapper .emails input{vertical-align:middle;margin:6px 0}#edd-item-tables-wrapper .emails .spinner{float:none}#edd-item-notes-wrapper{min-height:50px}.edd-item-notes-header img,.edd-item-notes-header span{font-weight:600;line-height:30px;vertical-align:middle}.customer-note-input{margin-bottom:5px;width:100%}#edd-customer-notes div:nth-of-type(even){background-color:#fcfcfc}.customer-note-wrapper{border-bottom:1px solid #f9f9f9;min-height:38px;padding:7px 0 7px 7px}.customer-note-wrapper span{display:block}.note-content-wrap{padding-top:7px}#edd-item-card-wrapper .notice-wrap{padding-left:20px;padding-right:20px;margin-left:-20px;margin-right:-20px}@media screen and (max-width:810px) and (min-width:656px){#edd-item-card-wrapper{width:600px}.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper .widefat td,.widefat th{padding:4px 6px;max-width:100px!important;display:table-cell}}@media screen and (max-width:656px){#edd-item-card-wrapper .customer-id,.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper{margin:0;width:100%}#edd-item-tab-wrapper{margin:0 0 -5px}#edd-item-tab-wrapper-list{height:32px;margin:0}#edd-item-tab-wrapper-list .inactive{border-bottom:1px solid #e5e5e5;border-left:none}#edd-item-tab-wrapper-list .active{border-width:1px 1px 0}#edd-item-tab-wrapper-list li{float:left;margin:0 0 0 5px!important;width:32px;height:32px}#edd-item-tab-wrapper-list li span{width:32px;height:32px;margin:0!important}#edd-item-card-wrapper .customer-info{min-height:210px}.edd-item-info.customer-info{position:relative}#edd-item-card-wrapper .customer-address-wrapper{float:none;position:absolute;top:84px;left:110px;max-width:200px}#edd-item-card-wrapper .customer-main-wrapper{float:none;position:absolute;left:110px}#edd-item-card-wrapper #edd-item-stats-wrapper{padding-left:0;padding-right:0}#edd-item-card-wrapper .customer-section{margin-bottom:0}#edd-item-card-wrapper .widefat td,.widefat th{padding:4px 6px;max-width:100px!important;display:table-cell;overflow:hidden}#edd-item-card-wrapper>div:first-child{height:auto}}.recount-stats-controls form{display:inline}.edd-recount-stats-descriptions span{display:none;line-height:24px}
1
+ .edd-admin-box .label,.edd-admin-box-inside .strong{font-weight:600}.edd-mobile-link,.edd_repeatable_row td{vertical-align:middle}.edd-hidden{display:none}.edd-clearfix:after{content:".";display:block;height:0;text-indent:-9999px;visibility:hidden}.edd-wrap a{text-decoration:none}a.edd-delete{color:#a00}a.edd-delete:hover{color:red}.download_page_edd-settings .form-table label{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}.download_page_edd-settings .form-table input.small-text~label,.download_page_edd-settings .form-table input[type=checkbox]+label{display:inline}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.edd-help-tip{cursor:help}.edd-ui-tooltip{background:#333!important;border-radius:3px!important;box-shadow:1px 1px 2px 1px rgba(214,214,214,.5);color:#dedede!important;max-width:300px;padding:7px;text-rendering:optimizeLegibility}#edd-add-ons h2.nav-tab-wrapper{position:relative}#edd-add-ons h2 .button-primary,.edd-tab-span{position:absolute}.edd-tab-span{top:-6px;right:0}.edd-add-ons-footer{padding-top:10px}#edd-add-ons h2{margin:0 0 15px}#edd-add-ons .edd-extension{background:#fff;border:1px solid #ccc;float:left;padding:14px;position:relative;margin:0 15px 15px 0;width:320px;height:315px}#edd-add-ons .edd-extension h3{font-size:13px;margin:0 0 8px}#edd-add-ons .edd-extension .button-secondary{position:absolute;bottom:14px;left:14px}#edd-add-ons .edd-browse-all{clear:both;width:100%}#edd-add-ons .edd-extension .third-party{display:none}#edd-add-ons .edd-starter-package{background-color:#85c0e5;border-color:#62a9d7;color:#fff}#edd-add-ons .edd-starter-package h3{color:#fff}#edd-add-ons .edd-extension .wp-post-image{width:100%;height:auto}#edd-products{height:100px;min-width:200px}#edd-add-discount input[type=checkbox],#edd-edit-discount input[type=checkbox]{width:15px}#edd-payment-filters{background:#f5f5f5;clear:both;background-image:-webkit-gradient(linear,left bottom,left top,from(#f5f5f5),to(#fafafa));background-image:-webkit-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-moz-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:-o-linear-gradient(bottom,#f5f5f5,#fafafa);background-image:linear-gradient(to top,#f5f5f5,#fafafa);border-color:#dfdfdf;border-width:1px;border-style:solid;border-radius:3px;font-size:13px;line-height:2.1em;overflow:auto;padding:12px;margin:8px 0}#edd-payments-filter ul.subsubsub{margin-bottom:8px}#edd-payment-filters p{color:#777}tr.status-refunded td{background:#cecece;border-top-color:#ccc}.wp-list-table.downloads th#ID{width:80px}.wp-list-table.downloads th#details{width:130px}.wp-list-table.downloads th#date{width:140px}.wp-list-table.downloads th#user{width:130px}.edd-mobile-link{line-height:32px}.edd-mobile-link img{max-width:80%;height:auto;float:left}@media handheld,only screen and (max-width:640px){.wp-list-table.downloads th{width:auto!important}}.download_page_edd-payment-history .ui-dialog .ui-dialog-titlebar-close span{margin-left:-8px;margin-top:-8px}#edd-download-link-textarea{width:100%}.edd_files_name_label{width:225px;float:left}.edd_files_url_label{width:220px;float:left}#postbox-container-1 .edd_files_name_label,#postbox-container-1 .edd_files_url_label{width:80px}.edd_add_repeatable{display:inline-block}#downloadinformation .edd_meta_table_wrap table input,#downloadinformation .edd_meta_table_wrap table select,#downloadinformation .edd_meta_table_wrap table textarea{margin:4px 0;width:100%}#downloadinformation .edd_meta_table_wrap table .submit input{width:auto}.edd_repeatable_upload_wrapper .edd_repeatable_upload_field_container{position:relative}.edd_upload_file{background:#fff;display:block;padding:2px 8px;position:absolute;top:3px;right:7px}.edd_upload_field{padding-right:8em}.edd_remove_repeatable{border:none;cursor:pointer;display:inline-block;padding:0;overflow:hidden;margin:8px 0 0;text-indent:-9999px;width:10px;height:10px}.edd_remove_repeatable:active,.edd_remove_repeatable:focus,.edd_remove_repeatable:hover{background-position:-10px 0!important}.edd_draghandle{background:url(../images/edd-cross-hair.png);cursor:move;display:block;margin:4px 0 0;width:20px;height:20px}textarea#edd-payment-note{width:100%;height:4em;margin:0}.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%}#edd_product_notes_field{margin:0;width:98%;height:4em}.edd_repeatable_default_wrapper{text-align:center;width:25px}#edd-purchased-files ul li.remove,td.edd_order_price{text-align:right}.edd-admin-box-inside{border-bottom:1px solid #eee;clear:both;padding:3px 12px;margin:0;word-break:break-word}.rtl .edd-admin-box-inside{padding:5px 10px 5px 0}.edd-payment-fees .fee-label{color:#666;font-weight:400}.edd-admin-box .right{float:right}.rtl .edd-admin-box .right{float:left;margin-left:10px}#edd-customer-details .actions,#edd-order-recalc-total{float:right}#edd-order-details .inside,#edd-order-update .inside{margin:0;padding:0}#edd-order-update input.edd_datepicker{width:180px}#edd-order-update input[type=number].edd-payment-time-hour,#edd-order-update input[type=number].edd-payment-time-min{width:50px}#edd-order-resend-receipt .inside{margin-top:11px}.edd-admin-box-inside:last-child{border-bottom:0}#edd-edit-order-form .data-payment-key{word-break:break-all}.edd-order-update-box #major-publishing-actions .button-secondary{margin-right:10px}#edd-purchased-files .edd-select-chosen{width:196px}#edd-customer-details .order-data-address input,#edd-customer-details .order-data-column p.data input,#edd-edit-order-form .column input,#edd-order-address-country-wrap select,#edd-purchased-files ul{clear:both;display:block}.edd-order-data input.small-text{margin:0}.edd-order-data input.med-text{margin:0;width:100px}#edd-order-update span.label{display:inline;width:50px}.edd-order-update-box .button-primary{margin-right:0}#edd-edit-order-form .column .description{padding-right:10px}#edd-edit-order-form .column,#edd-purchased-files .inside>ul>li,#edd-purchased-files .row>ul>li{display:inline-block;line-height:30px;position:relative;margin-right:5%;vertical-align:middle}#edd-purchased-files li.actions{min-width:200px;text-align:right}#edd-purchased-files .row{border-bottom:1px solid #eee;padding:12px}#edd-purchased-files ul{font-size:0}#edd-purchased-files ul li{font-size:13px}#edd-order-data .data span{color:#666;font-weight:600}#edd-purchased-files .inside{padding:12px}.edd-price-field{width:80px}#edd_products .edd-select,.edd_repeatable_product_wrapper .edd-select,.edd_repeatable_upload_wrapper .pricing select{min-width:100%;max-width:200px}.edd_repeatable_product_wrapper td{overflow:visible}@media screen and (max-width:782px){.order-data-column input[type=email]{padding:6px 10px}}@media screen and (min-width:851px){#edd-purchased-files .inside li.actions{text-align:right}}@media screen and (max-width:1024px){#edd-edit-order-form .column{width:49%}}@media screen and (max-width:1280px) and (min-width:1279px){#edd-purchased-files .inside li.actions{width:35%}#edd-edit-order-form .column{width:32%}}@media screen and (min-width:1280px){#edd-edit-order-form .column,#edd-purchased-files.columns-3 .inside>ul>li,#edd-purchased-files.columns-3 .row>ul>li{width:32%;margin-right:3%}#edd-edit-order-form .columns-4 .column,#edd-purchased-files.columns-4 .inside>ul>li,#edd-purchased-files.columns-4 .row>ul>li{width:22%;margin-right:2%}#edd-edit-order-form .column:nth-child(2n+1),#edd-edit-order-form .columns-3 .column:nth-child(2n+1),#edd-edit-order-form .columns-4 .column:nth-child(3n+1){margin-right:0}#edd-purchased-files.columns-4 li.download{width:33%}#edd-purchased-files.columns-3 .inside>ul>li.price,#edd-purchased-files.columns-3 .row>ul>li.price,#edd-purchased-files.columns-4 li.price{width:14%}#edd-purchased-files.columns-4 li.actions{width:25%;margin-top:0;margin-right:0}}@media screen and (max-width:1284px){#edd-edit-order-form .column strong{display:block}}#edd_product_stats .label{display:inline-block}#edd_product_stats hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}#edd_product_stats .product-earnings-stats:before,#edd_product_stats .product-sales-stats:before{color:#82878c;font:400 20px/1 dashicons;display:inline-block;padding:0 2px 0 0;position:relative;top:0;left:-1px;speak:none;text-decoration:none!important;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#edd-item-card-wrapper a.delete,#edd-item-stats-wrapper a,.customer-edit-link a,.disconnect-user a,.wrap-licenses .edd-license-data.edd-license-expired a:hover,.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover,.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}#edd_product_stats .product-sales-stats:before{content:'\f174'}#edd_product_stats .product-earnings-stats:before{content:'\f239'}.edd_dashboard_widget table thead td{border-bottom:1px solid #ececec;color:#777}.edd_dashboard_widget .table_left{float:left;width:45%}.edd_dashboard_widget .table_right{float:right;width:45%}.edd_dashboard_widget .inside{font-size:12px}.edd_dashboard_widget td{padding:3px 0}.edd_dashboard_widget .b,.edd_dashboard_widget .t{line-height:1.5;vertical-align:middle}.edd_dashboard_widget .b{font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;padding-right:6px;width:auto}.edd_dashboard_widget .t{font-size:12px;padding-right:12px;color:#777;width:100%}.edd_dashboard_widget .label_heading{border-top:1px solid #ececec;color:#8f8f8f;font-family:Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;display:block;padding-top:10px;margin:0 0 8px 12px}.edd_dashboard_widget .edd_dashboard_widget_subheading{border-top:1px solid #ececec;color:#8f8f8f;font-size:14px;padding-top:10px;margin:1em 0 0}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0}.edd_dashboard_widget .edd_price_label{background:#00769c;border-radius:3px;color:#fff;font-size:10px;padding:2px 4px;margin-right:2px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}@media handheld,only screen and (max-width:1000px){.edd_dashboard_widget .edd-recent-email{display:none}}#edd-dashboard-widgets-wrap .postbox h3{cursor:default}#edd-date-range-options,#edd-graphs-date-options{float:left}#edd-date-range-options span{float:left;line-height:24px;height:24px;margin-right:6px}.edd-import-export-form{position:relative}.edd-import-export-form .edd-progress{background:#ddd;position:absolute;bottom:15px;width:95%;height:15px}.edd-import-export-form .edd-progress div{background:#ccc;height:100%;width:0}.edd-import-export-form .notice-wrap{background-color:#f4f4f4;border-style:solid;border-width:1px 0;border-color:#eae9e9;padding:12px 12px 4px;overflow:auto;margin:20px -12px -23px}.edd-import-export-form .notice-wrap .spinner{margin:4px 10px 8px}.admin-color-fresh .edd-import-export-form .edd-progress div{background:#0073aa}.admin-color-light .edd-import-export-form .edd-progress div{background:#888}.admin-color-blue .edd-import-export-form .edd-progress div{background:#096484}.admin-color-coffee .edd-import-export-form .edd-progress div{background:#c7a589}.admin-color-ectoplasm .edd-import-export-form .edd-progress div{background:#a3b745}.admin-color-midnight .edd-import-export-form .edd-progress div{background:#e14d43}.admin-color-sunrise .edd-import-export-form .edd-progress div{background:#dd823b}#edd-graphs-filter label{vertical-align:inherit}#edd-graphs-filter .graph-option-section{float:left;line-height:2.5em;padding-right:5px}.edd-mix-totals{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:10px}.edd-mix-chart{display:inline-block;width:49%;vertical-align:top}.edd-graph-notes{color:#9c9c9c}.edd-graph-notes span{display:block}.edd-pie-graph .legend{display:none}.edd-pie-legend{overflow:auto;margin-top:10px}.edd-legend-item-wrapper{color:#333;display:inline-block;font-size:8pt;padding:2px 5px 0;width:48%;height:20px}.edd-legend-color{border:1px solid #cfcfcf;display:inline-block;margin-right:5px;width:20px;height:15px}.edd-pie-legend-item{display:inline-block;vertical-align:top;width:80%}#edd_tax_rates{margin:1em 0 0}#edd_tax_rates .edd_tax_country *,#edd_tax_rates .edd_tax_state *{max-width:100%}#edd_tax_rates .edd_tax_country,#edd_tax_rates .edd_tax_state{width:180px}#edd_tax_rates .edd_tax_rate{width:80px}#edd_tax_rates th{padding:15px 10px}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses .edd-license-data.edd-license-expired a,.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses p.submit{clear:both}.post-type-download .fixed .column-name{width:27%}.post-type-download .fixed .column-description{width:30%}.post-type-download .fixed .column-slug{width:23%}.post-type-download .fixed .column-posts{text-align:left;width:17%}#system-info-textarea{background:0 0;font-family:Menlo,Monaco,monospace;display:block;overflow:auto;white-space:pre;width:800px;height:400px}#TB_window #edd-add-download:active,#TB_window #edd-add-download:focus,#TB_window #edd-add-download:hover{color:#fff}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.download_page_edd-tools .apikeys .column-user{width:192px}.edd-select-chosen{width:300px}.chosen-container-multi .chosen-choices{background-image:none;border-color:#dfdfdf;-webkit-border-radius:3px;border-radius:3px}.chosen-container-multi .chosen-choices input{border-color:#dfdfdf;height:27px!important;margin:2px}.chosen-container .chosen-drop{border-color:#aaa;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.chosen-container .search-field{float:none!important}.chosen-container .search-field input{width:90%!important}.chosen-container-active .chosen-choices{border-color:#aaa;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1);border-radius:3px 3px 0 0}.download_page_edd-tools .tablenav .actions{overflow:visible}.edd_user_search_wrap{position:relative;overflow:visible}.edd_user_search_results{position:absolute;left:0;top:27px}.edd_user_search_results a.edd-ajax-user-cancel{position:absolute;right:6px;top:2px}.edd_user_search_results ul{background:#f0f0f0;border:1px solid #dfdfdf;overflow-y:scroll;padding:10px 10px 4px;margin:0;max-height:200px;width:300px}.wp-list-table .type-download .row-actions{color:#999}@media screen and (max-width:1100px){.edd-mix-chart{display:block;width:100%}.wrap-licenses .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:782px){.post-type-download .nav-tab-wrapper a{font-size:50%;padding:2px 4px}.download_page_edd-tools .apikeys .column-user{width:80px}.license-expiration-date-notice,.license-lifetime-notice,.license-null{padding-left:0}[class^=license-] input[type=text]{margin-bottom:3px}}@media screen and (max-width:600px){.wrap-licenses .form-table tr{width:100%;min-height:230px}}#edd-item-tab-wrapper{display:inline-block;margin-left:-1px;text-align:center;z-index:1}#edd-item-tab-wrapper-list li{background-color:#fff;width:32px;height:32px}#edd-item-tab-wrapper-list .inactive{background-color:#fff;border-left:1px solid #e5e5e5;color:#eee}#edd-item-tab-wrapper-list .inactive a,#edd-item-tab-wrapper-list .inactive a:visited{color:#eee;display:block;line-height:32px;text-decoration:none}#edd-item-tab-wrapper-list .inactive a:active,#edd-item-tab-wrapper-list .inactive a:focus,#edd-item-tab-wrapper-list .inactive a:hover{color:#444}#edd-item-tab-wrapper-list .active{border-color:#e5e5e5;border-style:solid;border-width:1px 1px 1px 0}#edd-item-tab-wrapper-list :not(:last-child){margin-bottom:3px}#edd-item-tab-wrapper-list .dashicons{font-size:24px;line-height:32px}#edd-item-card-wrapper .left{float:left}#edd-item-card-wrapper .right{float:right}#edd-item-card-wrapper input{font-weight:400}#edd-item-card-wrapper .customer-id,.customer-info .customer-name{font-size:24px;font-weight:600}#edd-item-card-wrapper{background-color:#fff;border:1px solid #e5e5e5;webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;margin-left:-1px;min-height:200px;width:700px;z-index:2}#edd-item-card-wrapper .customer-section{border-bottom:1px solid #eee;margin-bottom:10px;overflow:auto}#edd-item-card-wrapper .customer-section table{margin-bottom:20px}#edd-item-card-wrapper>div{padding:0 20px}#edd-item-card-wrapper>div:first-child{padding-top:20px}#edd-item-card-wrapper>div:last-child{border:none;padding-bottom:20px}#edd-item-card-wrapper .avatar-wrap{padding-right:10px;text-align:center}#edd-item-card-wrapper .customer-main-wrapper input{width:200px}#edd-item-card-wrapper .customer-address-wrapper{margin-right:25px;max-width:33%;width:202px}#edd-item-card-wrapper .customer-address-wrapper select,#edd-item-card-wrapper .edd_user_search_results ul{width:200px}#edd-item-card-wrapper .customer-info{margin-top:5px;margin-bottom:10px;min-height:185px}#edd-item-card-wrapper .info-wrapper{min-height:125px;overflow:visible}#edd-item-card-wrapper a.delete{color:red;margin-right:5px}.customer-edit-link a,.disconnect-user a{font-size:12px;font-weight:400}#customer-edit-actions{line-height:28px;margin-bottom:20px;text-align:center}#customer-edit-actions .button-secondary{margin-right:10px}#edd-item-card-wrapper .info-item{display:block;line-height:16px;padding-bottom:5px}#edd-item-card-wrapper .edit-item{display:none}#edd-item-card-wrapper .edd_user_search_results{left:1px;top:16px}#edd-item-stats-wrapper{margin:0 auto;min-height:30px;text-align:center}#edd-item-stats-wrapper li{font-size:14px;float:left;line-height:22px;width:50%}#edd-item-stats-wrapper .dashicons{color:#888}#edd-item-tables-wrapper table{text-align:center;width:100%}#edd-item-tables-wrapper th{text-align:center}#edd-item-tables-wrapper .downloads tr>td:first-child,#edd-item-tables-wrapper .downloads tr>th:first-child,#edd-item-tables-wrapper .emails tr>td:first-child,#edd-item-tables-wrapper .emails tr>th:first-child{text-align:left}#edd-item-tables-wrapper .downloads tr>td:only-child,.delete-customer{text-align:center}#edd-item-tables-wrapper .emails .add-customer-email-row td{background-color:#f9f9f9;border-top:1px solid #e5e5e5}#edd-item-tables-wrapper .emails .primary-email-icon{font-size:13px;vertical-align:middle;line-height:1.5em}#edd-item-tables-wrapper .emails input{vertical-align:middle;margin:6px 0}#edd-item-tables-wrapper .emails .spinner{float:none}#edd-item-notes-wrapper{min-height:50px}.edd-item-notes-header img,.edd-item-notes-header span{font-weight:600;line-height:30px;vertical-align:middle}.customer-note-input{margin-bottom:5px;width:100%}#edd-customer-notes div:nth-of-type(even){background-color:#fcfcfc}.customer-note-wrapper{border-bottom:1px solid #f9f9f9;min-height:38px;padding:7px 0 7px 7px}.customer-note-wrapper span{display:block}.note-content-wrap{padding-top:7px}#edd-item-card-wrapper .notice-wrap{padding-left:20px;padding-right:20px;margin-left:-20px;margin-right:-20px}@media screen and (max-width:810px) and (min-width:656px){#edd-item-card-wrapper{width:600px}.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper .widefat td,.widefat th{padding:4px 6px;max-width:100px!important;display:table-cell}}@media screen and (max-width:656px){#edd-item-card-wrapper .customer-id,.customer-info .customer-name{font-size:16px}#edd-item-card-wrapper{margin:0;width:100%}#edd-item-tab-wrapper{margin:0 0 -5px}#edd-item-tab-wrapper-list{height:32px;margin:0}#edd-item-tab-wrapper-list .inactive{border-bottom:1px solid #e5e5e5;border-left:none}#edd-item-tab-wrapper-list .active{border-width:1px 1px 0}#edd-item-tab-wrapper-list li{float:left;margin:0 0 0 5px!important;width:32px;height:32px}#edd-item-tab-wrapper-list li span{width:32px;height:32px;margin:0!important}#edd-item-card-wrapper .customer-info{min-height:210px}.edd-item-info.customer-info{position:relative}#edd-item-card-wrapper .customer-address-wrapper{float:none;position:absolute;top:84px;left:110px;max-width:200px}#edd-item-card-wrapper .customer-main-wrapper{float:none;position:absolute;left:110px}#edd-item-card-wrapper #edd-item-stats-wrapper{padding-left:0;padding-right:0}#edd-item-card-wrapper .customer-section{margin-bottom:0}#edd-item-card-wrapper .widefat td,.widefat th{padding:4px 6px;max-width:100px!important;display:table-cell;overflow:hidden}#edd-item-card-wrapper>div:first-child{height:auto}}.recount-stats-controls form{display:inline}.edd-recount-stats-descriptions span{display:none;line-height:24px}
assets/js/edd-ajax.js CHANGED
@@ -26,7 +26,8 @@ jQuery(document).ready(function ($) {
26
  },
27
  success: function (response) {
28
  if (response.removed) {
29
- if ( parseInt( edd_scripts.position_in_cart, 10 ) === parseInt( item, 10 ) ) {
 
30
  window.location = window.location;
31
  return false;
32
  }
@@ -394,7 +395,6 @@ jQuery(document).ready(function ($) {
394
  withCredentials: true
395
  },
396
  success: function (response) {
397
- console.log( response); console.log(is_checkout);
398
  if ( is_checkout ) {
399
  $form = $("#edd_purchase_form");
400
  } else {
26
  },
27
  success: function (response) {
28
  if (response.removed) {
29
+
30
+ if ( ( parseInt( edd_scripts.position_in_cart, 10 ) === parseInt( item, 10 ) ) || edd_scripts.has_purchase_links ) {
31
  window.location = window.location;
32
  return false;
33
  }
395
  withCredentials: true
396
  },
397
  success: function (response) {
 
398
  if ( is_checkout ) {
399
  $form = $("#edd_purchase_form");
400
  } else {
assets/js/edd-ajax.min.js CHANGED
@@ -1 +1 @@
1
- function edd_load_gateway(a){jQuery(".edd-cart-ajax").show(),jQuery("#edd_purchase_form_wrap").html('<img src="'+edd_scripts.ajax_loader+'"/>');var b=edd_scripts.ajaxurl;b+=b.indexOf("?")>0?"&":"?",b=b+"payment-mode="+a,jQuery.post(b,{action:"edd_load_gateway",edd_payment_mode:a},function(b){jQuery("#edd_purchase_form_wrap").html(b),jQuery(".edd-no-js").hide(),jQuery("body").trigger("edd_gateway_loaded",[a])})}var edd_scripts;jQuery(document).ready(function(a){function b(){var c,b=a(this),d="undefined"!=typeof edd_global_vars;if("card_state"!=b.attr("id")){var e={action:"edd_get_shop_states",country:b.val(),field_name:"card_state"};a.ajax({type:"POST",data:e,url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(e){console.log(e),console.log(d),c=d?a("#edd_purchase_form"):b.closest("form");var f='input[name="card_state"], select[name="card_state"], input[name="edd_address_state"], select[name="edd_address_state"]';if("nostates"==a.trim(e)){var g='<input type="text" name="card_state" class="cart-state edd-input required" value=""/>';c.find(f).replaceWith(g)}else c.find(f).replaceWith(e);d&&a("body").trigger("edd_cart_billing_address_updated",[e])}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){d&&recalculate_taxes()})}else d&&recalculate_taxes();return!1}a(".edd-no-js").hide(),a("a.edd-add-to-cart").addClass("edd-has-js"),a("body").on("click.eddRemoveFromCart",".edd-remove-from-cart",function(b){var c=a(this),d=c.data("cart-item"),e=c.data("action"),f=c.data("download-id"),g={action:e,cart_item:d};return a.ajax({type:"POST",data:g,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(b){if(b.removed){if(parseInt(edd_scripts.position_in_cart,10)===parseInt(d,10))return window.location=window.location,!1;a(".edd-cart").find("[data-cart-item='"+d+"']").parent().remove();var c=0;a(".edd-cart").find("[data-cart-item]").each(function(){a(this).attr("data-cart-item",c),c+=1}),a("[id^=edd_purchase_"+f+"]").length&&(a("[id^=edd_purchase_"+f+"] .edd_go_to_checkout").hide(),a("[id^=edd_purchase_"+f+"] a.edd-add-to-cart").show().removeAttr("data-edd-loading"),"1"==edd_scripts.quantities_enabled&&a("[id^=edd_purchase_"+f+"] .edd_download_quantity_wrapper").show()),a("span.edd-cart-quantity").text(b.cart_quantity),a("body").trigger("edd_quantity_updated",[b.cart_quantity]),edd_scripts.taxes_enabled&&(a(".cart_item.edd_subtotal span").html(b.subtotal),a(".cart_item.edd_cart_tax span").html(b.tax)),a(".cart_item.edd_total span").html(b.total),0==b.cart_quantity&&(a(".cart_item.edd_subtotal,.edd-cart-number-of-items,.cart_item.edd_checkout,.cart_item.edd_cart_tax,.cart_item.edd_total").hide(),a(".edd-cart").append('<li class="cart_item empty">'+edd_scripts.empty_cart_message+"</li>")),a("body").trigger("edd_cart_item_removed",[b])}}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){}),!1}),a("body").on("click.eddAddToCart",".edd-add-to-cart",function(b){b.preventDefault();var c=a(this),d=c.closest("form");c.prop("disabled",!0);var e=c.find(".edd-loading"),f=c.closest("div"),g=e.width(),h=e.height();c.attr("data-edd-loading",""),e.css({"margin-left":g/-2,"margin-top":h/-2});var d=c.parents("form").last(),i=c.data("download-id"),j=c.data("variable-price"),k=c.data("price-mode"),l=[],m=!0;if("yes"==j)if(d.find(".edd_price_option_"+i+'[type="hidden"]').length>0)l[0]=a(".edd_price_option_"+i,d).val(),d.find(".edd-submit").data("price")&&d.find(".edd-submit").data("price")>0&&(m=!1);else{if(!d.find(".edd_price_option_"+i+":checked",d).length)return c.removeAttr("data-edd-loading"),void alert(edd_scripts.select_option);d.find(".edd_price_option_"+i+":checked",d).each(function(b){if(l[b]=a(this).val(),!0===m){var c=a(this).data("price");c&&c>0&&(m=!1)}})}else l[0]=i,c.data("price")&&c.data("price")>0&&(m=!1);if(m&&d.find(".edd_action_input").val("add_to_cart"),"straight_to_gateway"==d.find(".edd_action_input").val())return d.submit(),!0;var n=c.data("action"),o={action:n,download_id:i,price_ids:l,post_data:a(d).serialize()};return a.ajax({type:"POST",data:o,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(b){if("1"==edd_scripts.redirect_to_checkout&&"1"==d.find("#edd_redirect_to_checkout").val())window.location=edd_scripts.checkout_page;else{"1"===edd_scripts.taxes_enabled&&(a(".cart_item.edd_subtotal").show(),a(".cart_item.edd_cart_tax").show()),a(".cart_item.edd_total").show(),a(".cart_item.edd_checkout").show(),a(".cart_item.empty").length?(a(b.cart_item).insertBefore(".edd-cart-meta:first"),a(".cart_item.empty").hide()):a(b.cart_item).insertBefore(".edd-cart-meta:first"),"1"===edd_scripts.taxes_enabled&&(a(".edd-cart-meta.edd_subtotal span").html(b.subtotal),a(".edd-cart-meta.edd_cart_tax span").html(b.tax)),a(".edd-cart-meta.edd_total span").html(b.total);a(".edd-cart-item-title",b.cart_item).length;if(a("span.edd-cart-quantity").each(function(){a(this).text(b.cart_quantity),a("body").trigger("edd_quantity_updated",[b.cart_quantity])}),"none"==a(".edd-cart-number-of-items").css("display")&&a(".edd-cart-number-of-items").show("slow"),("no"==j||"multi"!=k)&&(a("a.edd-add-to-cart",f).toggle(),a(".edd_go_to_checkout",f).css("display","inline-block")),"multi"==k&&c.removeAttr("data-edd-loading"),a(".edd_download_purchase_form").length&&("no"==j||!d.find(".edd_price_option_"+i).is("input:hidden"))){var g=a('.edd_download_purchase_form *[data-download-id="'+i+'"]').parents("form");a("a.edd-add-to-cart",g).hide(),"multi"!=k&&g.find(".edd_download_quantity_wrapper").slideUp(),a(".edd_go_to_checkout",g).show().removeAttr("data-edd-loading")}"incart"!=b&&(a(".edd-cart-added-alert",f).fadeIn(),setTimeout(function(){a(".edd-cart-added-alert",f).fadeOut()},3e3)),c.prop("disabled",!1),a("body").trigger("edd_cart_item_added",[b])}}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){}),!1}),a("#edd_checkout_form_wrap").on("click",".edd_checkout_register_login",function(){var b=a(this),c={action:b.data("action")};return a(".edd-cart-ajax").show(),a.post(edd_scripts.ajaxurl,c,function(b){a("#edd_checkout_login_register").html(edd_scripts.loading),a("#edd_checkout_login_register").html(b),a(".edd-cart-ajax").hide()}),!1}),a(document).on("click","#edd_purchase_form #edd_login_fields input[type=submit]",function(b){b.preventDefault();var c=a(this).val();a(this).val(edd_global_vars.purchase_loading),a(this).after('<span class="edd-cart-ajax"><i class="edd-icon-spinner edd-icon-spin"></i></span>');var d={action:"edd_process_checkout_login",edd_ajax:1,edd_user_login:a("#edd_login_fields #edd_user_login").val(),edd_user_pass:a("#edd_login_fields #edd_user_pass").val()};a.post(edd_global_vars.ajaxurl,d,function(b){"success"==a.trim(b)?(a(".edd_errors").remove(),window.location=edd_scripts.checkout_page):(a("#edd_login_fields input[type=submit]").val(c),a(".edd-cart-ajax").remove(),a(".edd_errors").remove(),a("#edd-user-login-submit").before(b))})}),a("select#edd-gateway, input.edd-gateway").change(function(b){var c=a("#edd-gateway option:selected, input.edd-gateway:checked").val();return"0"==c?!1:(edd_load_gateway(c),!1)}),"1"==edd_scripts.is_checkout&&a("select#edd-gateway, input.edd-gateway").length&&setTimeout(function(){edd_load_gateway(edd_scripts.default_gateway)},200),a(document).on("click","#edd_purchase_form #edd_purchase_submit input[type=submit]",function(b){var c=document.getElementById("edd_purchase_form");if("function"!=typeof c.checkValidity||!1!==c.checkValidity()){b.preventDefault();var d=a(this).val();a(this).val(edd_global_vars.purchase_loading),a(this).prop("disabled",!0),a(this).after('<span class="edd-cart-ajax"><i class="edd-icon-spinner edd-icon-spin"></i></span>'),a.post(edd_global_vars.ajaxurl,a("#edd_purchase_form").serialize()+"&action=edd_process_checkout&edd_ajax=true",function(b){"success"==a.trim(b)?(a(".edd_errors").remove(),a(".edd-error").hide(),a(c).submit()):(a("#edd-purchase-button").val(d),a(".edd-cart-ajax").remove(),a(".edd_errors").remove(),a(".edd-error").hide(),a("#edd_purchase_submit").before(b),a("#edd-purchase-button").prop("disabled",!1))})}}),a("body").on("change","#edd_cc_address input.card_state, #edd_cc_address select, #edd_address_country",b)});
1
+ function edd_load_gateway(a){jQuery(".edd-cart-ajax").show(),jQuery("#edd_purchase_form_wrap").html('<img src="'+edd_scripts.ajax_loader+'"/>');var b=edd_scripts.ajaxurl;b+=b.indexOf("?")>0?"&":"?",b=b+"payment-mode="+a,jQuery.post(b,{action:"edd_load_gateway",edd_payment_mode:a},function(b){jQuery("#edd_purchase_form_wrap").html(b),jQuery(".edd-no-js").hide(),jQuery("body").trigger("edd_gateway_loaded",[a])})}var edd_scripts;jQuery(document).ready(function(a){function b(){var c,b=a(this),d="undefined"!=typeof edd_global_vars;if("card_state"!=b.attr("id")){var e={action:"edd_get_shop_states",country:b.val(),field_name:"card_state"};a.ajax({type:"POST",data:e,url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(e){c=d?a("#edd_purchase_form"):b.closest("form");var f='input[name="card_state"], select[name="card_state"], input[name="edd_address_state"], select[name="edd_address_state"]';if("nostates"==a.trim(e)){var g='<input type="text" name="card_state" class="cart-state edd-input required" value=""/>';c.find(f).replaceWith(g)}else c.find(f).replaceWith(e);d&&a("body").trigger("edd_cart_billing_address_updated",[e])}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){d&&recalculate_taxes()})}else d&&recalculate_taxes();return!1}a(".edd-no-js").hide(),a("a.edd-add-to-cart").addClass("edd-has-js"),a("body").on("click.eddRemoveFromCart",".edd-remove-from-cart",function(b){var c=a(this),d=c.data("cart-item"),e=c.data("action"),f=c.data("download-id"),g={action:e,cart_item:d};return a.ajax({type:"POST",data:g,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(b){if(b.removed){if(parseInt(edd_scripts.position_in_cart,10)===parseInt(d,10)||edd_scripts.has_purchase_links)return window.location=window.location,!1;a(".edd-cart").find("[data-cart-item='"+d+"']").parent().remove();var c=0;a(".edd-cart").find("[data-cart-item]").each(function(){a(this).attr("data-cart-item",c),c+=1}),a("[id^=edd_purchase_"+f+"]").length&&(a("[id^=edd_purchase_"+f+"] .edd_go_to_checkout").hide(),a("[id^=edd_purchase_"+f+"] a.edd-add-to-cart").show().removeAttr("data-edd-loading"),"1"==edd_scripts.quantities_enabled&&a("[id^=edd_purchase_"+f+"] .edd_download_quantity_wrapper").show()),a("span.edd-cart-quantity").text(b.cart_quantity),a("body").trigger("edd_quantity_updated",[b.cart_quantity]),edd_scripts.taxes_enabled&&(a(".cart_item.edd_subtotal span").html(b.subtotal),a(".cart_item.edd_cart_tax span").html(b.tax)),a(".cart_item.edd_total span").html(b.total),0==b.cart_quantity&&(a(".cart_item.edd_subtotal,.edd-cart-number-of-items,.cart_item.edd_checkout,.cart_item.edd_cart_tax,.cart_item.edd_total").hide(),a(".edd-cart").append('<li class="cart_item empty">'+edd_scripts.empty_cart_message+"</li>")),a("body").trigger("edd_cart_item_removed",[b])}}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){}),!1}),a("body").on("click.eddAddToCart",".edd-add-to-cart",function(b){b.preventDefault();var c=a(this),d=c.closest("form");c.prop("disabled",!0);var e=c.find(".edd-loading"),f=c.closest("div"),g=e.width(),h=e.height();c.attr("data-edd-loading",""),e.css({"margin-left":g/-2,"margin-top":h/-2});var d=c.parents("form").last(),i=c.data("download-id"),j=c.data("variable-price"),k=c.data("price-mode"),l=[],m=!0;if("yes"==j)if(d.find(".edd_price_option_"+i+'[type="hidden"]').length>0)l[0]=a(".edd_price_option_"+i,d).val(),d.find(".edd-submit").data("price")&&d.find(".edd-submit").data("price")>0&&(m=!1);else{if(!d.find(".edd_price_option_"+i+":checked",d).length)return c.removeAttr("data-edd-loading"),void alert(edd_scripts.select_option);d.find(".edd_price_option_"+i+":checked",d).each(function(b){if(l[b]=a(this).val(),!0===m){var c=a(this).data("price");c&&c>0&&(m=!1)}})}else l[0]=i,c.data("price")&&c.data("price")>0&&(m=!1);if(m&&d.find(".edd_action_input").val("add_to_cart"),"straight_to_gateway"==d.find(".edd_action_input").val())return d.submit(),!0;var n=c.data("action"),o={action:n,download_id:i,price_ids:l,post_data:a(d).serialize()};return a.ajax({type:"POST",data:o,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(b){if("1"==edd_scripts.redirect_to_checkout&&"1"==d.find("#edd_redirect_to_checkout").val())window.location=edd_scripts.checkout_page;else{"1"===edd_scripts.taxes_enabled&&(a(".cart_item.edd_subtotal").show(),a(".cart_item.edd_cart_tax").show()),a(".cart_item.edd_total").show(),a(".cart_item.edd_checkout").show(),a(".cart_item.empty").length?(a(b.cart_item).insertBefore(".edd-cart-meta:first"),a(".cart_item.empty").hide()):a(b.cart_item).insertBefore(".edd-cart-meta:first"),"1"===edd_scripts.taxes_enabled&&(a(".edd-cart-meta.edd_subtotal span").html(b.subtotal),a(".edd-cart-meta.edd_cart_tax span").html(b.tax)),a(".edd-cart-meta.edd_total span").html(b.total);a(".edd-cart-item-title",b.cart_item).length;if(a("span.edd-cart-quantity").each(function(){a(this).text(b.cart_quantity),a("body").trigger("edd_quantity_updated",[b.cart_quantity])}),"none"==a(".edd-cart-number-of-items").css("display")&&a(".edd-cart-number-of-items").show("slow"),("no"==j||"multi"!=k)&&(a("a.edd-add-to-cart",f).toggle(),a(".edd_go_to_checkout",f).css("display","inline-block")),"multi"==k&&c.removeAttr("data-edd-loading"),a(".edd_download_purchase_form").length&&("no"==j||!d.find(".edd_price_option_"+i).is("input:hidden"))){var g=a('.edd_download_purchase_form *[data-download-id="'+i+'"]').parents("form");a("a.edd-add-to-cart",g).hide(),"multi"!=k&&g.find(".edd_download_quantity_wrapper").slideUp(),a(".edd_go_to_checkout",g).show().removeAttr("data-edd-loading")}"incart"!=b&&(a(".edd-cart-added-alert",f).fadeIn(),setTimeout(function(){a(".edd-cart-added-alert",f).fadeOut()},3e3)),c.prop("disabled",!1),a("body").trigger("edd_cart_item_added",[b])}}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){}),!1}),a("#edd_checkout_form_wrap").on("click",".edd_checkout_register_login",function(){var b=a(this),c={action:b.data("action")};return a(".edd-cart-ajax").show(),a.post(edd_scripts.ajaxurl,c,function(b){a("#edd_checkout_login_register").html(edd_scripts.loading),a("#edd_checkout_login_register").html(b),a(".edd-cart-ajax").hide()}),!1}),a(document).on("click","#edd_purchase_form #edd_login_fields input[type=submit]",function(b){b.preventDefault();var c=a(this).val();a(this).val(edd_global_vars.purchase_loading),a(this).after('<span class="edd-cart-ajax"><i class="edd-icon-spinner edd-icon-spin"></i></span>');var d={action:"edd_process_checkout_login",edd_ajax:1,edd_user_login:a("#edd_login_fields #edd_user_login").val(),edd_user_pass:a("#edd_login_fields #edd_user_pass").val()};a.post(edd_global_vars.ajaxurl,d,function(b){"success"==a.trim(b)?(a(".edd_errors").remove(),window.location=edd_scripts.checkout_page):(a("#edd_login_fields input[type=submit]").val(c),a(".edd-cart-ajax").remove(),a(".edd_errors").remove(),a("#edd-user-login-submit").before(b))})}),a("select#edd-gateway, input.edd-gateway").change(function(b){var c=a("#edd-gateway option:selected, input.edd-gateway:checked").val();return"0"==c?!1:(edd_load_gateway(c),!1)}),"1"==edd_scripts.is_checkout&&a("select#edd-gateway, input.edd-gateway").length&&setTimeout(function(){edd_load_gateway(edd_scripts.default_gateway)},200),a(document).on("click","#edd_purchase_form #edd_purchase_submit input[type=submit]",function(b){var c=document.getElementById("edd_purchase_form");if("function"!=typeof c.checkValidity||!1!==c.checkValidity()){b.preventDefault();var d=a(this).val();a(this).val(edd_global_vars.purchase_loading),a(this).prop("disabled",!0),a(this).after('<span class="edd-cart-ajax"><i class="edd-icon-spinner edd-icon-spin"></i></span>'),a.post(edd_global_vars.ajaxurl,a("#edd_purchase_form").serialize()+"&action=edd_process_checkout&edd_ajax=true",function(b){"success"==a.trim(b)?(a(".edd_errors").remove(),a(".edd-error").hide(),a(c).submit()):(a("#edd-purchase-button").val(d),a(".edd-cart-ajax").remove(),a(".edd_errors").remove(),a(".edd-error").hide(),a("#edd_purchase_submit").before(b),a("#edd-purchase-button").prop("disabled",!1))})}}),a("body").on("change","#edd_cc_address input.card_state, #edd_cc_address select, #edd_address_country",b)});
easy-digital-downloads.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Pippin Williamson and Company
7
  * Author URI: https://easydigitaldownloads.com
8
- * Version: 2.6.6
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
@@ -25,7 +25,7 @@
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
- * @version 2.6.6
29
  */
30
 
31
  // Exit if accessed directly.
@@ -195,7 +195,7 @@ final class Easy_Digital_Downloads {
195
 
196
  // Plugin version.
197
  if ( ! defined( 'EDD_VERSION' ) ) {
198
- define( 'EDD_VERSION', '2.6.6' );
199
  }
200
 
201
  // Plugin Folder Path.
5
  * Description: The easiest way to sell digital products with WordPress.
6
  * Author: Pippin Williamson and Company
7
  * Author URI: https://easydigitaldownloads.com
8
+ * Version: 2.6.7
9
  * Text Domain: easy-digital-downloads
10
  * Domain Path: languages
11
  *
25
  * @package EDD
26
  * @category Core
27
  * @author Pippin Williamson
28
+ * @version 2.6.7
29
  */
30
 
31
  // Exit if accessed directly.
195
 
196
  // Plugin version.
197
  if ( ! defined( 'EDD_VERSION' ) ) {
198
+ define( 'EDD_VERSION', '2.6.7' );
199
  }
200
 
201
  // Plugin Folder Path.
includes/EDD_SL_Plugin_Updater.php CHANGED
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
10
  * Allows plugins to use their own update API.
11
  *
12
  * @author Pippin Williamson
13
- * @version 1.6.4
14
  */
15
  class EDD_SL_Plugin_Updater {
16
 
@@ -121,6 +121,10 @@ class EDD_SL_Plugin_Updater {
121
  */
122
  public function show_update_notification( $file, $plugin ) {
123
 
 
 
 
 
124
  if( ! current_user_can( 'update_plugins' ) ) {
125
  return;
126
  }
@@ -180,7 +184,10 @@ class EDD_SL_Plugin_Updater {
180
 
181
  // build a plugin list row, with update notification
182
  $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
183
- echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
 
 
 
184
 
185
  $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
186
 
10
  * Allows plugins to use their own update API.
11
  *
12
  * @author Pippin Williamson
13
+ * @version 1.6.5
14
  */
15
  class EDD_SL_Plugin_Updater {
16
 
121
  */
122
  public function show_update_notification( $file, $plugin ) {
123
 
124
+ if ( is_network_admin() ) {
125
+ return;
126
+ }
127
+
128
  if( ! current_user_can( 'update_plugins' ) ) {
129
  return;
130
  }
184
 
185
  // build a plugin list row, with update notification
186
  $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
187
+ # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
188
+ echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
189
+ echo '<td colspan="3" class="plugin-update colspanchange">';
190
+ echo '<div class="update-message notice inline notice-warning notice-alt">';
191
 
192
  $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
193
 
includes/admin/customers/customer-actions.php CHANGED
@@ -68,13 +68,29 @@ function edd_edit_customer( $args ) {
68
  return;
69
  }
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  // Setup the customer address, if present
72
  $address = array();
73
- if ( intval( $customer_info['user_id'] ) > 0 ) {
74
 
75
  $current_address = get_user_meta( $customer_info['user_id'], '_edd_user_address', true );
76
 
77
- if ( false === $current_address ) {
78
  $address['line1'] = isset( $customer_info['line1'] ) ? $customer_info['line1'] : '';
79
  $address['line2'] = isset( $customer_info['line2'] ) ? $customer_info['line2'] : '';
80
  $address['city'] = isset( $customer_info['city'] ) ? $customer_info['city'] : '';
@@ -97,7 +113,7 @@ function edd_edit_customer( $args ) {
97
  $customer_data = array();
98
  $customer_data['name'] = strip_tags( stripslashes( $customer_info['name'] ) );
99
  $customer_data['email'] = $customer_info['email'];
100
- $customer_data['user_id'] = $customer_info['user_id'];
101
 
102
  $customer_data = apply_filters( 'edd_edit_customer_info', $customer_data, $customer_id );
103
  $address = apply_filters( 'edd_edit_customer_address', $address, $customer_id );
68
  return;
69
  }
70
 
71
+ $user_id = intval( $customer_info['user_id'] );
72
+ if ( empty( $user_id ) && ! empty( $customer_info['user_login'] ) ) {
73
+ // See if they gave an email, otherwise we'll assume login
74
+ $user_by_field = 'login';
75
+ if ( is_email( $customer_info['user_login'] ) ) {
76
+ $user_by_field = 'email';
77
+ }
78
+
79
+ $user = get_user_by( $user_by_field, $customer_info['user_login'] );
80
+ if ( $user ) {
81
+ $user_id = $user->ID;
82
+ } else {
83
+ edd_set_error( 'edd-invalid-user-string', sprintf( __( 'Failed to attach user. The login or email address %s was not found.', 'easy-digital-downloads' ), $customer_info['user_login'] ) );
84
+ }
85
+ }
86
+
87
  // Setup the customer address, if present
88
  $address = array();
89
+ if ( ! empty( $user_id ) ) {
90
 
91
  $current_address = get_user_meta( $customer_info['user_id'], '_edd_user_address', true );
92
 
93
+ if ( empty( $current_address ) ) {
94
  $address['line1'] = isset( $customer_info['line1'] ) ? $customer_info['line1'] : '';
95
  $address['line2'] = isset( $customer_info['line2'] ) ? $customer_info['line2'] : '';
96
  $address['city'] = isset( $customer_info['city'] ) ? $customer_info['city'] : '';
113
  $customer_data = array();
114
  $customer_data['name'] = strip_tags( stripslashes( $customer_info['name'] ) );
115
  $customer_data['email'] = $customer_info['email'];
116
+ $customer_data['user_id'] = $user_id;
117
 
118
  $customer_data = apply_filters( 'edd_edit_customer_info', $customer_data, $customer_id );
119
  $address = apply_filters( 'edd_edit_customer_address', $address, $customer_id );
includes/admin/customers/customers.php CHANGED
@@ -203,7 +203,6 @@ function edd_customers_view( $customer ) {
203
  $address = wp_parse_args( $address, $defaults );
204
  ?>
205
 
206
- <?php if ( ! empty( $address ) ) : ?>
207
  <strong><?php _e( 'Customer Address', 'easy-digital-downloads' ); ?></strong>
208
  <span class="customer-address info-item editable">
209
  <span class="info-item" data-key="line1"><?php echo $address['line1']; ?></span>
@@ -213,7 +212,7 @@ function edd_customers_view( $customer ) {
213
  <span class="info-item" data-key="country"><?php echo $address['country']; ?></span>
214
  <span class="info-item" data-key="zip"><?php echo $address['zip']; ?></span>
215
  </span>
216
- <?php endif; ?>
217
  <span class="customer-address info-item edit-item">
218
  <input class="info-item" type="text" data-key="line1" name="customerinfo[line1]" placeholder="<?php _e( 'Address 1', 'easy-digital-downloads' ); ?>" value="<?php echo $address['line1']; ?>" />
219
  <input class="info-item" type="text" data-key="line2" name="customerinfo[line2]" placeholder="<?php _e( 'Address 2', 'easy-digital-downloads' ); ?>" value="<?php echo $address['line2']; ?>" />
203
  $address = wp_parse_args( $address, $defaults );
204
  ?>
205
 
 
206
  <strong><?php _e( 'Customer Address', 'easy-digital-downloads' ); ?></strong>
207
  <span class="customer-address info-item editable">
208
  <span class="info-item" data-key="line1"><?php echo $address['line1']; ?></span>
212
  <span class="info-item" data-key="country"><?php echo $address['country']; ?></span>
213
  <span class="info-item" data-key="zip"><?php echo $address['zip']; ?></span>
214
  </span>
215
+
216
  <span class="customer-address info-item edit-item">
217
  <input class="info-item" type="text" data-key="line1" name="customerinfo[line1]" placeholder="<?php _e( 'Address 1', 'easy-digital-downloads' ); ?>" value="<?php echo $address['line1']; ?>" />
218
  <input class="info-item" type="text" data-key="line2" name="customerinfo[line2]" placeholder="<?php _e( 'Address 2', 'easy-digital-downloads' ); ?>" value="<?php echo $address['line2']; ?>" />
includes/admin/downloads/dashboard-columns.php CHANGED
@@ -23,14 +23,14 @@ if ( ! defined( 'ABSPATH' ) ) exit;
23
  * Post Type List Table
24
  */
25
  function edd_download_columns( $download_columns ) {
26
- $category_labels = edd_get_taxonomy_labels( 'download_category' );
27
- $tag_labels = edd_get_taxonomy_labels( 'download_tag' );
28
 
29
  $download_columns = array(
30
  'cb' => '<input type="checkbox"/>',
31
  'title' => __( 'Name', 'easy-digital-downloads' ),
32
- 'download_category' => $category_labels['name'],
33
- 'download_tag' => $tag_labels['name'],
34
  'price' => __( 'Price', 'easy-digital-downloads' ),
35
  'sales' => __( 'Sales', 'easy-digital-downloads' ),
36
  'earnings' => __( 'Earnings', 'easy-digital-downloads' ),
23
  * Post Type List Table
24
  */
25
  function edd_download_columns( $download_columns ) {
26
+ $category_labels = edd_get_taxonomy_labels( 'download_category' );
27
+ $tag_labels = edd_get_taxonomy_labels( 'download_tag' );
28
 
29
  $download_columns = array(
30
  'cb' => '<input type="checkbox"/>',
31
  'title' => __( 'Name', 'easy-digital-downloads' ),
32
+ 'download_category' => $category_labels['menu_name'],
33
+ 'download_tag' => $tag_labels['menu_name'],
34
  'price' => __( 'Price', 'easy-digital-downloads' ),
35
  'sales' => __( 'Sales', 'easy-digital-downloads' ),
36
  'earnings' => __( 'Earnings', 'easy-digital-downloads' ),
includes/admin/downloads/metabox.php CHANGED
@@ -911,25 +911,37 @@ function edd_render_disable_button( $post_id ) {
911
  <span alt="f223" class="edd-help-tip dashicons dashicons-editor-help" title="<?php _e( '<strong>Automatic Output</strong>: By default, the purchase buttons will be displayed at the bottom of the download, when disabled you will need to use the Purchase link shortcode below to output the ability to buy the product where you prefer.', 'easy-digital-downloads' ); ?>"></span>
912
  </label>
913
  </p>
914
- <?php if( edd_shop_supports_buy_now() ) : ?>
915
  <p>
916
  <label for="_edd_button_behavior">
917
- <?php echo EDD()->html->select( array(
 
918
  'name' => '_edd_button_behavior',
919
  'options' => array(
920
  'add_to_cart' => __( 'Add to Cart', 'easy-digital-downloads' ),
921
- 'direct' => __( 'Buy Now', 'easy-digital-downloads' )
922
  ),
923
  'show_option_all' => null,
924
  'show_option_none' => null,
925
  'selected' => $behavior
926
- ) ); ?>
 
 
 
 
 
 
 
927
  <?php _e( 'Purchase button behavior', 'easy-digital-downloads' ); ?>
928
- <span alt="f223" class="edd-help-tip dashicons dashicons-editor-help" title="<?php _e( '<strong>Button Behavior</strong>: Add to Cart buttons follow a traditional eCommerce flow. A Buy Now button bypasses most of the process, taking the customer directly from button click to payment, greatly speeding up the process of getting the product.', 'easy-digital-downloads' ); ?>"></span>
 
 
 
 
 
929
  </label>
930
  </p>
931
  <?php
932
- endif;
933
  }
934
  add_action( 'edd_meta_box_settings_fields', 'edd_render_disable_button', 30 );
935
 
911
  <span alt="f223" class="edd-help-tip dashicons dashicons-editor-help" title="<?php _e( '<strong>Automatic Output</strong>: By default, the purchase buttons will be displayed at the bottom of the download, when disabled you will need to use the Purchase link shortcode below to output the ability to buy the product where you prefer.', 'easy-digital-downloads' ); ?>"></span>
912
  </label>
913
  </p>
914
+ <?php $supports_buy_now = edd_shop_supports_buy_now(); ?>
915
  <p>
916
  <label for="_edd_button_behavior">
917
+ <?php
918
+ $args = array(
919
  'name' => '_edd_button_behavior',
920
  'options' => array(
921
  'add_to_cart' => __( 'Add to Cart', 'easy-digital-downloads' ),
922
+ 'direct' => __( 'Buy Now', 'easy-digital-downloads' ),
923
  ),
924
  'show_option_all' => null,
925
  'show_option_none' => null,
926
  'selected' => $behavior
927
+ );
928
+
929
+ if ( ! $supports_buy_now ) {
930
+ $args['disabled'] = true;
931
+ $args['readonly'] = true;
932
+ }
933
+ ?>
934
+ <?php echo EDD()->html->select( $args ); ?>
935
  <?php _e( 'Purchase button behavior', 'easy-digital-downloads' ); ?>
936
+ <?php if ( $supports_buy_now ) : ?>
937
+ <span alt="f223" class="edd-help-tip dashicons dashicons-editor-help" title="<?php _e( '<strong>Button Behavior</strong>: Add to Cart buttons follow a traditional eCommerce flow. A Buy Now button bypasses most of the process, taking the customer directly from button click to payment, greatly speeding up the process of buying the product.', 'easy-digital-downloads' ); ?>"></span>
938
+ <?php else: ?>
939
+ <span alt="f223" class="edd-help-tip dashicons dashicons-editor-help" title="<?php _e( '<strong>Button Behavior</strong>: Add to Cart buttons follow a traditional eCommerce flow. Buy Now buttons are only available for supported gateways and stores that do not use taxes.', 'easy-digital-downloads' ); ?>"></span>
940
+ <?php endif; ?>
941
+
942
  </label>
943
  </p>
944
  <?php
 
945
  }
946
  add_action( 'edd_meta_box_settings_fields', 'edd_render_disable_button', 30 );
947
 
includes/admin/import/class-batch-import-downloads.php CHANGED
@@ -458,27 +458,33 @@ class EDD_Batch_Downloads_Import extends EDD_Batch_Import {
458
 
459
  if( is_numeric( $term ) && 0 === (int) $term ) {
460
 
461
- $term = get_term( $term, $taxonomy );
462
 
463
  } else {
464
 
465
- $term = get_term_by( 'name', $term, $taxonomy );
466
 
467
- if( ! $term ) {
468
 
469
- $term = get_term_by( 'slug', $term, $taxonomy );
470
 
471
  }
472
 
473
  }
474
 
475
- if( ! empty( $term ) ) {
476
 
477
- $term_ids[] = $term->term_id;
478
 
479
  } else {
480
 
481
- $term_ids[] = wp_insert_term( $term, $taxonomy );
 
 
 
 
 
 
482
 
483
  }
484
 
458
 
459
  if( is_numeric( $term ) && 0 === (int) $term ) {
460
 
461
+ $t = get_term( $term, $taxonomy );
462
 
463
  } else {
464
 
465
+ $t = get_term_by( 'name', $term, $taxonomy );
466
 
467
+ if( ! $t ) {
468
 
469
+ $t = get_term_by( 'slug', $term, $taxonomy );
470
 
471
  }
472
 
473
  }
474
 
475
+ if( ! empty( $t ) ) {
476
 
477
+ $term_ids[] = $t->term_id;
478
 
479
  } else {
480
 
481
+ $term_data = wp_insert_term( $term, $taxonomy, array( 'slug' => sanitize_title( $term ) ) );
482
+
483
+ if( ! is_wp_error( $term_data ) ) {
484
+
485
+ $term_ids[] = $term_data['term_id'];
486
+
487
+ }
488
 
489
  }
490
 
includes/admin/import/import-functions.php CHANGED
@@ -39,7 +39,22 @@ function edd_do_ajax_import_file_upload() {
39
  wp_send_json_error( array( 'error' => __( 'Missing import file. Please provide an import file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) );
40
  }
41
 
42
- if( empty( $_FILES['edd-import-file']['type'] ) || 'text/csv' !== $_FILES['edd-import-file']['type'] ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  wp_send_json_error( array( 'error' => __( 'The file you uploaded does not appear to be a CSV file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) );
44
  }
45
 
@@ -156,4 +171,4 @@ function edd_do_ajax_import() {
156
 
157
  }
158
  }
159
- add_action( 'wp_ajax_edd_do_ajax_import', 'edd_do_ajax_import' );
39
  wp_send_json_error( array( 'error' => __( 'Missing import file. Please provide an import file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) );
40
  }
41
 
42
+ $accepted_mime_types = array(
43
+ 'text/csv',
44
+ 'text/comma-separated-values',
45
+ 'text/plain',
46
+ 'text/anytext',
47
+ 'text/*',
48
+ 'text/plain',
49
+ 'text/anytext',
50
+ 'text/*',
51
+ 'application/csv',
52
+ 'application/excel',
53
+ 'application/vnd.ms-excel',
54
+ 'application/vnd.msexcel',
55
+ );
56
+
57
+ if( empty( $_FILES['edd-import-file']['type'] ) || ! in_array( strtolower( $_FILES['edd-import-file']['type'] ), $accepted_mime_types ) ) {
58
  wp_send_json_error( array( 'error' => __( 'The file you uploaded does not appear to be a CSV file.', 'easy-digital-downloads' ), 'request' => $_REQUEST ) );
59
  }
60
 
171
 
172
  }
173
  }
174
+ add_action( 'wp_ajax_edd_do_ajax_import', 'edd_do_ajax_import' );
includes/admin/reporting/export/class-batch-export-payments.php CHANGED
@@ -117,10 +117,11 @@ class EDD_Batch_Payments_Export extends EDD_Batch_Export {
117
  if( $payments ) {
118
 
119
  foreach ( $payments as $payment ) {
120
- $payment_meta = edd_get_payment_meta( $payment->ID );
121
- $user_info = edd_get_payment_meta_user_info( $payment->ID );
122
- $downloads = edd_get_payment_meta_cart_details( $payment->ID );
123
- $total = edd_get_payment_amount( $payment->ID );
 
124
  $user_id = isset( $user_info['id'] ) && $user_info['id'] != -1 ? $user_info['id'] : $user_info['email'];
125
  $products = '';
126
  $products_raw = '';
@@ -198,9 +199,9 @@ class EDD_Batch_Payments_Export extends EDD_Batch_Export {
198
 
199
  $data[] = array(
200
  'id' => $payment->ID,
201
- 'seq_id' => edd_get_payment_number( $payment->ID ),
202
  'email' => $payment_meta['email'],
203
- 'customer_id' => edd_get_payment_customer_id( $payment->ID ),
204
  'first' => $user_info['first_name'],
205
  'last' => $user_info['last_name'],
206
  'address1' => isset( $user_info['address']['line1'] ) ? $user_info['address']['line1'] : '',
@@ -216,14 +217,14 @@ class EDD_Batch_Payments_Export extends EDD_Batch_Export {
216
  'tax' => html_entity_decode( edd_format_amount( edd_get_payment_tax( $payment->ID, $payment_meta ) ) ),
217
  'discount' => isset( $user_info['discount'] ) && $user_info['discount'] != 'none' ? $user_info['discount'] : __( 'none', 'easy-digital-downloads' ),
218
  'gateway' => edd_get_gateway_admin_label( get_post_meta( $payment->ID, '_edd_payment_gateway', true ) ),
219
- 'trans_id' => edd_get_payment_transaction_id( $payment->ID ),
220
  'key' => $payment_meta['key'],
221
  'date' => $payment->post_date,
222
  'user' => $user ? $user->display_name : __( 'guest', 'easy-digital-downloads' ),
223
- 'currency' => edd_get_payment_currency_code( $payment->ID ),
224
- 'ip' => edd_get_payment_user_ip( $payment->ID ),
225
- 'mode' => edd_get_payment_meta( $payment->ID, '_edd_payment_mode', true ),
226
- 'status' => edd_get_payment_status( $payment, true )
227
  );
228
 
229
  }
117
  if( $payments ) {
118
 
119
  foreach ( $payments as $payment ) {
120
+ $payment = new EDD_Payment( $payment->ID );
121
+ $payment_meta = $payment->payment_meta;
122
+ $user_info = $payment->user_info;
123
+ $downloads = $payment->cart_details;
124
+ $total = $payment->total;
125
  $user_id = isset( $user_info['id'] ) && $user_info['id'] != -1 ? $user_info['id'] : $user_info['email'];
126
  $products = '';
127
  $products_raw = '';
199
 
200
  $data[] = array(
201
  'id' => $payment->ID,
202
+ 'seq_id' => $payment->number,
203
  'email' => $payment_meta['email'],
204
+ 'customer_id' => $payment->customer_id,
205
  'first' => $user_info['first_name'],
206
  'last' => $user_info['last_name'],
207
  'address1' => isset( $user_info['address']['line1'] ) ? $user_info['address']['line1'] : '',
217
  'tax' => html_entity_decode( edd_format_amount( edd_get_payment_tax( $payment->ID, $payment_meta ) ) ),
218
  'discount' => isset( $user_info['discount'] ) && $user_info['discount'] != 'none' ? $user_info['discount'] : __( 'none', 'easy-digital-downloads' ),
219
  'gateway' => edd_get_gateway_admin_label( get_post_meta( $payment->ID, '_edd_payment_gateway', true ) ),
220
+ 'trans_id' => $payment->transaction_id,
221
  'key' => $payment_meta['key'],
222
  'date' => $payment->post_date,
223
  'user' => $user ? $user->display_name : __( 'guest', 'easy-digital-downloads' ),
224
+ 'currency' => $payment->currency,
225
+ 'ip' => $payment->ip,
226
+ 'mode' => $payment->get_meta( '_edd_payment_mode', true ),
227
+ 'status' => $payment->status
228
  );
229
 
230
  }
includes/admin/settings/display-settings.php CHANGED
@@ -24,7 +24,8 @@ function edd_options_page() {
24
 
25
  $settings_tabs = edd_get_settings_tabs();
26
  $settings_tabs = empty($settings_tabs) ? array() : $settings_tabs;
27
- $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $settings_tabs ) ? $_GET['tab'] : 'general';
 
28
  $sections = edd_get_settings_tab_sections( $active_tab );
29
  $key = 'main';
30
 
@@ -33,7 +34,7 @@ function edd_options_page() {
33
  }
34
 
35
  $registered_sections = edd_get_settings_tab_sections( $active_tab );
36
- $section = isset( $_GET['section'] ) && ! empty( $registered_sections ) && array_key_exists( $_GET['section'], $registered_sections ) ? $_GET['section'] : $key;
37
 
38
  // Unset 'main' if it's empty and default to the first non-empty if it's the chosen section
39
  $all_settings = edd_get_registered_settings();
24
 
25
  $settings_tabs = edd_get_settings_tabs();
26
  $settings_tabs = empty($settings_tabs) ? array() : $settings_tabs;
27
+ $active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : 'general';
28
+ $active_tab = array_key_exists( $active_tab, $settings_tabs ) ? $active_tab : 'general';
29
  $sections = edd_get_settings_tab_sections( $active_tab );
30
  $key = 'main';
31
 
34
  }
35
 
36
  $registered_sections = edd_get_settings_tab_sections( $active_tab );
37
+ $section = isset( $_GET['section'] ) && ! empty( $registered_sections ) && array_key_exists( $_GET['section'], $registered_sections ) ? sanitize_text_field( $_GET['section'] ) : $key;
38
 
39
  // Unset 'main' if it's empty and default to the first non-empty if it's the chosen section
40
  $all_settings = edd_get_registered_settings();
includes/admin/settings/register-settings.php CHANGED
@@ -179,34 +179,34 @@ function edd_register_settings() {
179
  if ( empty( $option['id'] ) ) {
180
  continue;
181
  }
182
-
183
- $name = isset( $option['name'] ) ? $option['name'] : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
  add_settings_field(
186
- 'edd_settings[' . $option['id'] . ']',
187
- $name,
188
- function_exists( 'edd_' . $option['type'] . '_callback' ) ? 'edd_' . $option['type'] . '_callback' : 'edd_missing_callback',
189
  'edd_settings_' . $tab . '_' . $section,
190
  'edd_settings_' . $tab . '_' . $section,
191
- array(
192
- 'section' => $section,
193
- 'id' => isset( $option['id'] ) ? $option['id'] : null,
194
- 'desc' => ! empty( $option['desc'] ) ? $option['desc'] : '',
195
- 'name' => isset( $option['name'] ) ? $option['name'] : null,
196
- 'size' => isset( $option['size'] ) ? $option['size'] : null,
197
- 'options' => isset( $option['options'] ) ? $option['options'] : '',
198
- 'std' => isset( $option['std'] ) ? $option['std'] : '',
199
- 'min' => isset( $option['min'] ) ? $option['min'] : null,
200
- 'max' => isset( $option['max'] ) ? $option['max'] : null,
201
- 'step' => isset( $option['step'] ) ? $option['step'] : null,
202
- 'chosen' => isset( $option['chosen'] ) ? $option['chosen'] : null,
203
- 'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : null,
204
- 'allow_blank' => isset( $option['allow_blank'] ) ? $option['allow_blank'] : true,
205
- 'readonly' => isset( $option['readonly'] ) ? $option['readonly'] : false,
206
- 'faux' => isset( $option['faux'] ) ? $option['faux'] : false,
207
- 'tooltip_title' => isset( $option['tooltip_title'] ) ? $option['tooltip_title'] : false,
208
- 'tooltip_desc' => isset( $option['tooltip_desc'] ) ? $option['tooltip_desc'] : false,
209
- )
210
  );
211
  }
212
  }
@@ -247,7 +247,7 @@ function edd_get_registered_settings() {
247
  'purchase_page' => array(
248
  'id' => 'purchase_page',
249
  'name' => __( 'Checkout Page', 'easy-digital-downloads' ),
250
- 'desc' => __( 'This is the checkout page where buyers will complete their purchases. The [download_checkout] short code must be on this page.', 'easy-digital-downloads' ),
251
  'type' => 'select',
252
  'options' => edd_get_pages(),
253
  'chosen' => true,
@@ -256,7 +256,7 @@ function edd_get_registered_settings() {
256
  'success_page' => array(
257
  'id' => 'success_page',
258
  'name' => __( 'Success Page', 'easy-digital-downloads' ),
259
- 'desc' => __( 'This is the page buyers are sent to after completing their purchases. The [edd_receipt] short code should be on this page.', 'easy-digital-downloads' ),
260
  'type' => 'select',
261
  'options' => edd_get_pages(),
262
  'chosen' => true,
@@ -274,7 +274,7 @@ function edd_get_registered_settings() {
274
  'purchase_history_page' => array(
275
  'id' => 'purchase_history_page',
276
  'name' => __( 'Purchase History Page', 'easy-digital-downloads' ),
277
- 'desc' => __( 'This page shows a complete purchase history for the current user, including download links. The [purchase_history] short code should be on this page.', 'easy-digital-downloads' ),
278
  'type' => 'select',
279
  'options' => edd_get_pages(),
280
  'chosen' => true,
@@ -283,7 +283,7 @@ function edd_get_registered_settings() {
283
  'login_redirect_page' => array(
284
  'id' => 'login_redirect_page',
285
  'name' => __( 'Login Redirect Page', 'easy-digital-downloads' ),
286
- 'desc' => __( 'This is the page where buyers will be redirected by default once they log in. The [edd_login redirect="'.trailingslashit( home_url() ).'"] short code with the redirect attribute can override this setting.', 'easy-digital-downloads' ),
287
  'type' => 'select',
288
  'options' => edd_get_pages(),
289
  'chosen' => true,
@@ -969,6 +969,9 @@ function edd_settings_sanitize( $input = array() ) {
969
  if ( $doing_section ) {
970
  switch( $type ) {
971
  case 'checkbox':
 
 
 
972
  if ( array_key_exists( $key, $input ) && $output[ $key ] === '-1' ) {
973
  unset( $output[ $key ] );
974
  }
@@ -1338,6 +1341,7 @@ function edd_multicheck_callback( $args ) {
1338
 
1339
  $html = '';
1340
  if ( ! empty( $args['options'] ) ) {
 
1341
  foreach( $args['options'] as $key => $option ):
1342
  if( isset( $edd_option[ $key ] ) ) { $enabled = $option; } else { $enabled = NULL; }
1343
  $html .= '<input name="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" id="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" type="checkbox" value="' . esc_attr( $option ) . '" ' . checked($option, $enabled, false) . '/>&nbsp;';
@@ -1360,7 +1364,7 @@ function edd_multicheck_callback( $args ) {
1360
  function edd_payment_icons_callback( $args ) {
1361
  $edd_option = edd_get_option( $args['id'] );
1362
 
1363
- $html = '';
1364
  if ( ! empty( $args['options'] ) ) {
1365
  foreach( $args['options'] as $key => $option ) {
1366
 
@@ -1388,7 +1392,7 @@ function edd_payment_icons_callback( $args ) {
1388
 
1389
  } else {
1390
 
1391
- $image = edd_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.gif', false );
1392
  $content_dir = WP_CONTENT_DIR;
1393
 
1394
  if( function_exists( 'wp_normalize_path' ) ) {
@@ -1461,7 +1465,7 @@ function edd_radio_callback( $args ) {
1461
  function edd_gateways_callback( $args ) {
1462
  $edd_option = edd_get_option( $args['id'] );
1463
 
1464
- $html = '';
1465
 
1466
  foreach ( $args['options'] as $key => $option ) :
1467
  if ( isset( $edd_option[ $key ] ) )
@@ -1469,7 +1473,7 @@ function edd_gateways_callback( $args ) {
1469
  else
1470
  $enabled = null;
1471
 
1472
- $html .= '<input name="edd_settings[' . esc_attr( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']"" id="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" type="checkbox" value="1" ' . checked('1', $enabled, false) . '/>&nbsp;';
1473
  $html .= '<label for="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']">' . esc_html( $option['admin_label'] ) . '</label><br/>';
1474
  endforeach;
1475
 
@@ -2060,9 +2064,21 @@ if ( ! function_exists( 'edd_license_key_callback' ) ) {
2060
 
2061
  break;
2062
 
 
 
 
 
 
 
 
 
2063
  default :
2064
 
2065
- $messages[] = print_r( $license, true );
 
 
 
 
2066
  break;
2067
  }
2068
 
179
  if ( empty( $option['id'] ) ) {
180
  continue;
181
  }
182
+
183
+ $args = wp_parse_args( $option, array(
184
+ 'section' => $section,
185
+ 'id' => null,
186
+ 'desc' => '',
187
+ 'name' => '',
188
+ 'size' => null,
189
+ 'options' => '',
190
+ 'std' => '',
191
+ 'min' => null,
192
+ 'max' => null,
193
+ 'step' => null,
194
+ 'chosen' => null,
195
+ 'placeholder' => null,
196
+ 'allow_blank' => true,
197
+ 'readonly' => false,
198
+ 'faux' => false,
199
+ 'tooltip_title' => false,
200
+ 'tooltip_desc' => false,
201
+ ) );
202
 
203
  add_settings_field(
204
+ 'edd_settings[' . $args['id'] . ']',
205
+ $args['name'],
206
+ function_exists( 'edd_' . $args['type'] . '_callback' ) ? 'edd_' . $args['type'] . '_callback' : 'edd_missing_callback',
207
  'edd_settings_' . $tab . '_' . $section,
208
  'edd_settings_' . $tab . '_' . $section,
209
+ $args
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  );
211
  }
212
  }
247
  'purchase_page' => array(
248
  'id' => 'purchase_page',
249
  'name' => __( 'Checkout Page', 'easy-digital-downloads' ),
250
+ 'desc' => __( 'This is the checkout page where buyers will complete their purchases. The [download_checkout] shortcode must be on this page.', 'easy-digital-downloads' ),
251
  'type' => 'select',
252
  'options' => edd_get_pages(),
253
  'chosen' => true,
256
  'success_page' => array(
257
  'id' => 'success_page',
258
  'name' => __( 'Success Page', 'easy-digital-downloads' ),
259
+ 'desc' => __( 'This is the page buyers are sent to after completing their purchases. The [edd_receipt] shortcode should be on this page.', 'easy-digital-downloads' ),
260
  'type' => 'select',
261
  'options' => edd_get_pages(),
262
  'chosen' => true,
274
  'purchase_history_page' => array(
275
  'id' => 'purchase_history_page',
276
  'name' => __( 'Purchase History Page', 'easy-digital-downloads' ),
277
+ 'desc' => __( 'This page shows a complete purchase history for the current user, including download links. The [purchase_history] shortcode should be on this page.', 'easy-digital-downloads' ),
278
  'type' => 'select',
279
  'options' => edd_get_pages(),
280
  'chosen' => true,
283
  'login_redirect_page' => array(
284
  'id' => 'login_redirect_page',
285
  'name' => __( 'Login Redirect Page', 'easy-digital-downloads' ),
286
+ 'desc' => __( 'This is the page where buyers will be redirected by default once they log in. The [edd_login redirect="'.trailingslashit( home_url() ).'"] shortcode with the redirect attribute can override this setting.', 'easy-digital-downloads' ),
287
  'type' => 'select',
288
  'options' => edd_get_pages(),
289
  'chosen' => true,
969
  if ( $doing_section ) {
970
  switch( $type ) {
971
  case 'checkbox':
972
+ case 'gateways':
973
+ case 'multicheck':
974
+ case 'payment_icons':
975
  if ( array_key_exists( $key, $input ) && $output[ $key ] === '-1' ) {
976
  unset( $output[ $key ] );
977
  }
1341
 
1342
  $html = '';
1343
  if ( ! empty( $args['options'] ) ) {
1344
+ $html .= '<input type="hidden" name="edd_settings[' . edd_sanitize_key( $args['id'] ) . ']" value="-1" />';
1345
  foreach( $args['options'] as $key => $option ):
1346
  if( isset( $edd_option[ $key ] ) ) { $enabled = $option; } else { $enabled = NULL; }
1347
  $html .= '<input name="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" id="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" type="checkbox" value="' . esc_attr( $option ) . '" ' . checked($option, $enabled, false) . '/>&nbsp;';
1364
  function edd_payment_icons_callback( $args ) {
1365
  $edd_option = edd_get_option( $args['id'] );
1366
 
1367
+ $html = '<input type="hidden" name="edd_settings[' . edd_sanitize_key( $args['id'] ) . ']" value="-1" />';
1368
  if ( ! empty( $args['options'] ) ) {
1369
  foreach( $args['options'] as $key => $option ) {
1370
 
1392
 
1393
  } else {
1394
 
1395
+ $image = edd_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.png', false );
1396
  $content_dir = WP_CONTENT_DIR;
1397
 
1398
  if( function_exists( 'wp_normalize_path' ) ) {
1465
  function edd_gateways_callback( $args ) {
1466
  $edd_option = edd_get_option( $args['id'] );
1467
 
1468
+ $html = '<input type="hidden" name="edd_settings[' . edd_sanitize_key( $args['id'] ) . ']" value="-1" />';
1469
 
1470
  foreach ( $args['options'] as $key => $option ) :
1471
  if ( isset( $edd_option[ $key ] ) )
1473
  else
1474
  $enabled = null;
1475
 
1476
+ $html .= '<input name="edd_settings[' . esc_attr( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" id="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']" type="checkbox" value="1" ' . checked('1', $enabled, false) . '/>&nbsp;';
1477
  $html .= '<label for="edd_settings[' . edd_sanitize_key( $args['id'] ) . '][' . edd_sanitize_key( $key ) . ']">' . esc_html( $option['admin_label'] ) . '</label><br/>';
1478
  endforeach;
1479
 
2064
 
2065
  break;
2066
 
2067
+ case 'license_not_activable':
2068
+
2069
+ $class = 'error';
2070
+ $messages[] = __( 'The key you entered belongs to a bundle, please use the product specific license key.', 'easy-digital-downloads' );
2071
+
2072
+ $license_status = 'license-' . $class . '-notice';
2073
+ break;
2074
+
2075
  default :
2076
 
2077
+ $class = 'error';
2078
+ $error = ! empty( $license->error ) ? $license->error : __( 'unknown_error', 'easy-digital-downloads' );
2079
+ $messages[] = sprintf( __( 'There was an error with this license key: %s. Please <a href="%s">contact our support team</a>.', 'easy-digital-downloads' ), $error, 'https://easydigitaldownlaods.com/support' );
2080
+
2081
+ $license_status = 'license-' . $class . '-notice';
2082
  break;
2083
  }
2084
 
includes/admin/thickbox.php CHANGED
@@ -85,7 +85,7 @@ function edd_admin_footer_for_thickbox() {
85
 
86
  <div id="choose-download" style="display: none;">
87
  <div class="wrap" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;">
88
- <p><?php echo sprintf( __( 'Use the form below to insert the short code for purchasing a %s', 'easy-digital-downloads' ), edd_get_label_singular() ); ?></p>
89
  <div>
90
  <?php echo EDD()->html->product_dropdown( array( 'chosen' => true )); ?>
91
  </div>
85
 
86
  <div id="choose-download" style="display: none;">
87
  <div class="wrap" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;">
88
+ <p><?php echo sprintf( __( 'Use the form below to insert the shortcode for purchasing a %s', 'easy-digital-downloads' ), edd_get_label_singular() ); ?></p>
89
  <div>
90
  <?php echo EDD()->html->product_dropdown( array( 'chosen' => true )); ?>
91
  </div>
includes/admin/tools.php CHANGED
@@ -1208,6 +1208,7 @@ function edd_tools_sysinfo_get() {
1208
  $return .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n";
1209
  $return .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n";
1210
  $return .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n";
 
1211
 
1212
  $return = apply_filters( 'edd_sysinfo_after_php_config', $return );
1213
 
1208
  $return .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n";
1209
  $return .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n";
1210
  $return .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n";
1211
+ $return .= 'PHP Arg Separator: ' . edd_get_php_arg_separator_output() . "\n";
1212
 
1213
  $return = apply_filters( 'edd_sysinfo_after_php_config', $return );
1214
 
includes/admin/tools/class-edd-tools-recount-single-customer-stats.php CHANGED
@@ -234,7 +234,7 @@ class EDD_Tools_Recount_Single_Customer_Stats extends EDD_Batch_Export {
234
  $attached_args = array(
235
  'post__in' => $attached_payment_ids,
236
  'number' => -1,
237
- 'status' => $allowed_post_status,
238
  );
239
 
240
  $attached_payments = edd_get_payments( $attached_args );
@@ -242,7 +242,7 @@ class EDD_Tools_Recount_Single_Customer_Stats extends EDD_Batch_Export {
242
  $unattached_args = array(
243
  'post__not_in' => $attached_payment_ids,
244
  'number' => -1,
245
- 'status' => $allowed_post_status,
246
  'meta_query' => array(
247
  array(
248
  'key' => '_edd_payment_user_email',
234
  $attached_args = array(
235
  'post__in' => $attached_payment_ids,
236
  'number' => -1,
237
+ 'status' => $allowed_payment_status,
238
  );
239
 
240
  $attached_payments = edd_get_payments( $attached_args );
242
  $unattached_args = array(
243
  'post__not_in' => $attached_payment_ids,
244
  'number' => -1,
245
+ 'status' => $allowed_payment_status,
246
  'meta_query' => array(
247
  array(
248
  'key' => '_edd_payment_user_email',
includes/admin/upgrades/upgrade-functions.php CHANGED
@@ -404,7 +404,7 @@ function edd_v14_upgrades() {
404
  /** Add [edd_receipt] to success page **/
405
  $success_page = get_post( $edd_options['success_page'] );
406
 
407
- // Check for the [edd_receipt] short code and add it if not present
408
  if( strpos( $success_page->post_content, '[edd_receipt' ) === false ) {
409
  $page_content = $success_page->post_content .= "\n[edd_receipt]";
410
  wp_update_post( array( 'ID' => $edd_options['success_page'], 'post_content' => $page_content ) );
@@ -1167,4 +1167,4 @@ add_action( 'edd_remove_refunded_sale_logs', 'edd_remove_refunded_sale_logs' );
1167
  function edd_v26_upgrades() {
1168
  @EDD()->customers->create_table();
1169
  @EDD()->customer_meta->create_table();
1170
- }
404
  /** Add [edd_receipt] to success page **/
405
  $success_page = get_post( $edd_options['success_page'] );
406
 
407
+ // Check for the [edd_receipt] shortcode and add it if not present
408
  if( strpos( $success_page->post_content, '[edd_receipt' ) === false ) {
409
  $page_content = $success_page->post_content .= "\n[edd_receipt]";
410
  wp_update_post( array( 'ID' => $edd_options['success_page'], 'post_content' => $page_content ) );
1167
  function edd_v26_upgrades() {
1168
  @EDD()->customers->create_table();
1169
  @EDD()->customer_meta->create_table();
1170
+ }
includes/api/class-edd-api-v2.php CHANGED
@@ -145,7 +145,7 @@ class EDD_API_V2 extends EDD_API_V1 {
145
  }
146
  }
147
 
148
- return $products;
149
  }
150
 
151
  /**
@@ -279,7 +279,7 @@ class EDD_API_V2 extends EDD_API_V1 {
279
  $customers['customers'][ $customer_count ]['info']['first_name'] = $first_name;
280
  $customers['customers'][ $customer_count ]['info']['last_name'] = $last_name;
281
  $customers['customers'][ $customer_count ]['info']['email'] = $customer_obj->email;
282
- $customers['customers'][ $customer_count ]['info']['additional_emails'] = array();
283
  $customers['customers'][ $customer_count ]['info']['date_created'] = $customer_obj->date_created;
284
 
285
  if ( ! empty( $customer_obj->emails ) && count( $customer_obj->emails ) > 1 ) {
@@ -326,7 +326,7 @@ class EDD_API_V2 extends EDD_API_V1 {
326
 
327
  }
328
 
329
- return $customers;
330
  }
331
 
332
  /**
@@ -368,11 +368,11 @@ class EDD_API_V2 extends EDD_API_V1 {
368
  $user_info = $payment->user_info;
369
 
370
  $sales['sales'][ $i ]['ID'] = $payment->number;
371
- $sales['sales'][ $i ]['transaction_id'] = $payment->transaction_id;
372
  $sales['sales'][ $i ]['key'] = $payment->key;
373
  $sales['sales'][ $i ]['subtotal'] = $payment->subtotal;
374
  $sales['sales'][ $i ]['tax'] = $payment->tax;
375
- $sales['sales'][ $i ]['fees'] = $payment->fees;
376
  $sales['sales'][ $i ]['total'] = $payment->total;
377
  $sales['sales'][ $i ]['gateway'] = $payment->gateway;
378
  $sales['sales'][ $i ]['email'] = $payment->email;
@@ -431,13 +431,13 @@ class EDD_API_V2 extends EDD_API_V1 {
431
  $c++;
432
  }
433
 
434
- $sales['sales'][ $i ]['discounts'] = $discount_values;
435
  $sales['sales'][ $i ]['products'] = $cart_items;
436
 
437
  $i++;
438
  }
439
  }
440
- return $sales;
441
  }
442
 
443
  }
145
  }
146
  }
147
 
148
+ return apply_filters( 'edd_api_products', $product );
149
  }
150
 
151
  /**
279
  $customers['customers'][ $customer_count ]['info']['first_name'] = $first_name;
280
  $customers['customers'][ $customer_count ]['info']['last_name'] = $last_name;
281
  $customers['customers'][ $customer_count ]['info']['email'] = $customer_obj->email;
282
+ $customers['customers'][ $customer_count ]['info']['additional_emails'] = null;
283
  $customers['customers'][ $customer_count ]['info']['date_created'] = $customer_obj->date_created;
284
 
285
  if ( ! empty( $customer_obj->emails ) && count( $customer_obj->emails ) > 1 ) {
326
 
327
  }
328
 
329
+ return apply_filters( 'edd_api_customers', $customers, $this );
330
  }
331
 
332
  /**
368
  $user_info = $payment->user_info;
369
 
370
  $sales['sales'][ $i ]['ID'] = $payment->number;
371
+ $sales['sales'][ $i ]['transaction_id'] = ( ! empty( $payment->transaction_id ) ) ? $payment->transaction_id : null;
372
  $sales['sales'][ $i ]['key'] = $payment->key;
373
  $sales['sales'][ $i ]['subtotal'] = $payment->subtotal;
374
  $sales['sales'][ $i ]['tax'] = $payment->tax;
375
+ $sales['sales'][ $i ]['fees'] = ( ! empty( $payment->fees ) ? $payment->fees : null );
376
  $sales['sales'][ $i ]['total'] = $payment->total;
377
  $sales['sales'][ $i ]['gateway'] = $payment->gateway;
378
  $sales['sales'][ $i ]['email'] = $payment->email;
431
  $c++;
432
  }
433
 
434
+ $sales['sales'][ $i ]['discounts'] = ( ! empty( $discount_values ) ? $discount_values : null );;
435
  $sales['sales'][ $i ]['products'] = $cart_items;
436
 
437
  $i++;
438
  }
439
  }
440
+ return apply_filters( 'edd_api_sales', $sales, $this );
441
  }
442
 
443
  }
includes/api/class-edd-api.php CHANGED
@@ -346,12 +346,12 @@ class EDD_API {
346
  }
347
 
348
  /**
349
- * Return whether this is a public query.
350
  *
351
  * @access private
352
  * @global object $wp_query WordPress Query
353
  * @since 2.6
354
- * @return boolean
355
  */
356
  private function is_public_query() {
357
  global $wp_query;
@@ -999,7 +999,7 @@ class EDD_API {
999
 
1000
  }
1001
 
1002
- return $customers;
1003
  }
1004
 
1005
  /**
@@ -1047,7 +1047,7 @@ class EDD_API {
1047
  }
1048
  }
1049
 
1050
- return $products;
1051
  }
1052
 
1053
  /**
@@ -1243,7 +1243,7 @@ class EDD_API {
1243
  if ( ! empty( $error ) )
1244
  return $error;
1245
 
1246
- return $sales;
1247
  } elseif ( $args['type'] == 'earnings' ) {
1248
  if ( $args['product'] == null ) {
1249
  if ( $args['date'] == null ) {
@@ -1353,24 +1353,24 @@ class EDD_API {
1353
  if ( ! empty( $error ) )
1354
  return $error;
1355
 
1356
- return $earnings;
1357
  } elseif ( $args['type'] == 'customers' ) {
1358
  if ( version_compare( $edd_version, '2.3', '<' ) || ! edd_has_upgrade_completed( 'upgrade_customer_payments_association' ) ) {
1359
  global $wpdb;
1360
  $stats = array();
1361
  $count = $wpdb->get_col( "SELECT COUNT(DISTINCT meta_value) FROM $wpdb->postmeta WHERE meta_key = '_edd_payment_user_email'" );
1362
  $stats['customers']['total_customers'] = $count[0];
1363
- return $stats;
1364
  } else {
1365
  $customers = new EDD_DB_Customers();
1366
  $stats['customers']['total_customers'] = $customers->count();
1367
- return $stats;
1368
  }
1369
  } elseif ( empty( $args['type'] ) ) {
1370
  $stats = array_merge( $stats, $this->get_default_sales_stats() );
1371
  $stats = array_merge ( $stats, $this->get_default_earnings_stats() );
1372
 
1373
- return array( 'stats' => $stats );
1374
  }
1375
  }
1376
 
@@ -1458,7 +1458,7 @@ class EDD_API {
1458
  $i++;
1459
  }
1460
  }
1461
- return $sales;
1462
  }
1463
 
1464
  /**
@@ -1544,7 +1544,7 @@ class EDD_API {
1544
 
1545
  }
1546
 
1547
- return $discount_list;
1548
  }
1549
 
1550
  /**
@@ -1649,7 +1649,7 @@ class EDD_API {
1649
 
1650
  }
1651
 
1652
- return $downloads;
1653
  }
1654
 
1655
  /**
@@ -1709,7 +1709,7 @@ class EDD_API {
1709
  $data['info']['site']['decimal_separator'] = edd_get_option( 'decimal_separator', '.' );
1710
  $data['info']['site']['thousands_separator'] = edd_get_option( 'thousands_separator', ',' );
1711
 
1712
- return $data;
1713
  }
1714
 
1715
  /**
346
  }
347
 
348
  /**
349
+ * Return whether this is a public query.
350
  *
351
  * @access private
352
  * @global object $wp_query WordPress Query
353
  * @since 2.6
354
+ * @return boolean
355
  */
356
  private function is_public_query() {
357
  global $wp_query;
999
 
1000
  }
1001
 
1002
+ return apply_filters( 'edd_api_customers', $customers, $this );
1003
  }
1004
 
1005
  /**
1047
  }
1048
  }
1049
 
1050
+ return apply_filters( 'edd_api_products', $products, $this );
1051
  }
1052
 
1053
  /**
1243
  if ( ! empty( $error ) )
1244
  return $error;
1245
 
1246
+ return apply_filters( 'edd_api_stats_sales', $sales, $this );
1247
  } elseif ( $args['type'] == 'earnings' ) {
1248
  if ( $args['product'] == null ) {
1249
  if ( $args['date'] == null ) {
1353
  if ( ! empty( $error ) )
1354
  return $error;
1355
 
1356
+ return apply_filters( 'edd_api_stats_earnings', $earnings, $this );
1357
  } elseif ( $args['type'] == 'customers' ) {
1358
  if ( version_compare( $edd_version, '2.3', '<' ) || ! edd_has_upgrade_completed( 'upgrade_customer_payments_association' ) ) {
1359
  global $wpdb;
1360
  $stats = array();
1361
  $count = $wpdb->get_col( "SELECT COUNT(DISTINCT meta_value) FROM $wpdb->postmeta WHERE meta_key = '_edd_payment_user_email'" );
1362
  $stats['customers']['total_customers'] = $count[0];
1363
+ return apply_filters( 'edd_api_stats_customers', $stats, $this );
1364
  } else {
1365
  $customers = new EDD_DB_Customers();
1366
  $stats['customers']['total_customers'] = $customers->count();
1367
+ return apply_filters( 'edd_api_stats_customers', $stats, $this );
1368
  }
1369
  } elseif ( empty( $args['type'] ) ) {
1370
  $stats = array_merge( $stats, $this->get_default_sales_stats() );
1371
  $stats = array_merge ( $stats, $this->get_default_earnings_stats() );
1372
 
1373
+ return apply_filters( 'edd_api_stats', array( 'stats' => $stats, $this ) );
1374
  }
1375
  }
1376
 
1458
  $i++;
1459
  }
1460
  }
1461
+ return apply_filters( 'edd_api_sales', $sales, $this );
1462
  }
1463
 
1464
  /**
1544
 
1545
  }
1546
 
1547
+ return apply_filters( 'edd_api_discounts', $discount_list, $this );
1548
  }
1549
 
1550
  /**
1649
 
1650
  }
1651
 
1652
+ return apply_filters( 'edd_api_download_logs', $downloads, $this );
1653
  }
1654
 
1655
  /**
1709
  $data['info']['site']['decimal_separator'] = edd_get_option( 'decimal_separator', '.' );
1710
  $data['info']['site']['thousands_separator'] = edd_get_option( 'thousands_separator', ',' );
1711
 
1712
+ return apply_filters( 'edd_api_info', $data, $this );
1713
  }
1714
 
1715
  /**
includes/cart/actions.php CHANGED
@@ -80,7 +80,15 @@ function edd_process_add_to_cart( $data ) {
80
  $cart = edd_add_to_cart( $download_id, $options );
81
 
82
  if ( edd_straight_to_checkout() && ! edd_is_checkout() ) {
83
- wp_redirect( edd_get_checkout_uri(), 303 );
 
 
 
 
 
 
 
 
84
  edd_die();
85
  } else {
86
  wp_redirect( remove_query_arg( array( 'edd_action', 'download_id', 'edd_options' ) ) ); edd_die();
80
  $cart = edd_add_to_cart( $download_id, $options );
81
 
82
  if ( edd_straight_to_checkout() && ! edd_is_checkout() ) {
83
+ $query_args = remove_query_arg( array( 'edd_action', 'download_id', 'edd_options' ) );
84
+ $query_part = strpos( $query_args, "?" );
85
+ $url_parameters = '';
86
+
87
+ if ( false !== $query_part ) {
88
+ $url_parameters = substr( $query_args, $query_part );
89
+ }
90
+
91
+ wp_redirect( edd_get_checkout_uri() . $url_parameters, 303 );
92
  edd_die();
93
  } else {
94
  wp_redirect( remove_query_arg( array( 'edd_action', 'download_id', 'edd_options' ) ) ); edd_die();
includes/cart/functions.php CHANGED
@@ -94,7 +94,7 @@ function edd_get_cart_content_details() {
94
 
95
  $total = $subtotal - $discount + $tax;
96
 
97
- // Do not allow totals to go negatve
98
  if( $total < 0 ) {
99
  $total = 0;
100
  }
94
 
95
  $total = $subtotal - $discount + $tax;
96
 
97
+ // Do not allow totals to go negative
98
  if( $total < 0 ) {
99
  $total = 0;
100
  }
includes/checkout/template.php CHANGED
@@ -657,7 +657,7 @@ function edd_show_payment_icons() {
657
 
658
  } else {
659
 
660
- $image = edd_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.gif', false );
661
  $content_dir = WP_CONTENT_DIR;
662
 
663
  if( function_exists( 'wp_normalize_path' ) ) {
657
 
658
  } else {
659
 
660
+ $image = edd_locate_template( 'images' . DIRECTORY_SEPARATOR . 'icons' . DIRECTORY_SEPARATOR . $card . '.png', false );
661
  $content_dir = WP_CONTENT_DIR;
662
 
663
  if( function_exists( 'wp_normalize_path' ) ) {
includes/class-edd-fees.php CHANGED
@@ -114,6 +114,8 @@ class EDD_Fees {
114
  // Update fees
115
  EDD()->session->set( 'edd_cart_fees', $fees );
116
 
 
 
117
  return $fees;
118
  }
119
 
@@ -134,6 +136,8 @@ class EDD_Fees {
134
  if ( isset( $fees[ $id ] ) ) {
135
  unset( $fees[ $id ] );
136
  EDD()->session->set( 'edd_cart_fees', $fees );
 
 
137
  }
138
 
139
  return $fees;
114
  // Update fees
115
  EDD()->session->set( 'edd_cart_fees', $fees );
116
 
117
+ do_action( 'edd_post_add_fee', $fees, $key, $args );
118
+
119
  return $fees;
120
  }
121
 
136
  if ( isset( $fees[ $id ] ) ) {
137
  unset( $fees[ $id ] );
138
  EDD()->session->set( 'edd_cart_fees', $fees );
139
+
140
+ do_action( 'edd_post_remove_fee', $fees, $id );
141
  }
142
 
143
  return $fees;
includes/class-edd-html-elements.php CHANGED
@@ -335,6 +335,8 @@ class EDD_HTML_Elements {
335
  'show_option_all' => _x( 'All', 'all dropdown items', 'easy-digital-downloads' ),
336
  'show_option_none' => _x( 'None', 'no dropdown items', 'easy-digital-downloads' ),
337
  'data' => array(),
 
 
338
  );
339
 
340
  $args = wp_parse_args( $args, $defaults );
@@ -360,8 +362,20 @@ class EDD_HTML_Elements {
360
  $placeholder = '';
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  $class = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
364
- $output = '<select name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( edd_sanitize_key( str_replace( '-', '_', $args['id'] ) ) ) . '" class="edd-select ' . $class . '"' . $multiple . ' data-placeholder="' . $placeholder . '"'. $data_elements . '>';
365
 
366
  if ( $args['show_option_all'] ) {
367
  if( $args['multiple'] ) {
335
  'show_option_all' => _x( 'All', 'all dropdown items', 'easy-digital-downloads' ),
336
  'show_option_none' => _x( 'None', 'no dropdown items', 'easy-digital-downloads' ),
337
  'data' => array(),
338
+ 'readonly' => false,
339
+ 'disabled' => false,
340
  );
341
 
342
  $args = wp_parse_args( $args, $defaults );
362
  $placeholder = '';
363
  }
364
 
365
+ if ( isset( $args['readonly'] ) && $args['readonly'] ) {
366
+ $readonly = ' readonly="readonly"';
367
+ } else {
368
+ $readonly = '';
369
+ }
370
+
371
+ if ( isset( $args['disabled'] ) && $args['disabled'] ) {
372
+ $disabled = ' disabled="disabled"';
373
+ } else {
374
+ $disabled = '';
375
+ }
376
+
377
  $class = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['class'] ) ) );
378
+ $output = '<select' . $disabled . $readonly . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( edd_sanitize_key( str_replace( '-', '_', $args['id'] ) ) ) . '" class="edd-select ' . $class . '"' . $multiple . ' data-placeholder="' . $placeholder . '"'. $data_elements . '>';
379
 
380
  if ( $args['show_option_all'] ) {
381
  if( $args['multiple'] ) {
includes/discount-functions.php CHANGED
@@ -1140,7 +1140,9 @@ function edd_unset_cart_discount( $code = '' ) {
1140
 
1141
  if ( $discounts ) {
1142
  $key = array_search( $code, $discounts );
1143
- unset( $discounts[ $key ] );
 
 
1144
  $discounts = implode( '|', array_values( $discounts ) );
1145
  // update the active discounts
1146
  EDD()->session->set( 'cart_discounts', $discounts );
@@ -1381,10 +1383,13 @@ function edd_get_cart_discounts_html( $discounts = false ) {
1381
  edd_get_checkout_uri()
1382
  );
1383
 
1384
- $html .= "<span class=\"edd_discount\">\n";
1385
- $html .= "<span class=\"edd_discount_rate\">$discount&nbsp;&ndash;&nbsp;$rate</span>\n";
1386
- $html .= "<a href=\"$remove_url\" data-code=\"$discount\" class=\"edd_discount_remove\"></a>\n";
1387
- $html .= "</span>\n";
 
 
 
1388
  }
1389
 
1390
  return apply_filters( 'edd_get_cart_discounts_html', $html, $discounts, $rate, $remove_url );
@@ -1627,7 +1632,7 @@ function edd_discount_status_cleanup() {
1627
  }
1628
 
1629
  }
1630
- add_action( 'edd_daily_scheduled_events', 'edd_discount_status_cleanup' );
1631
 
1632
  /**
1633
  * Used during edd_discount_status_cleanup to filter out a meta query properly
1140
 
1141
  if ( $discounts ) {
1142
  $key = array_search( $code, $discounts );
1143
+ if ( false !== $key ) {
1144
+ unset( $discounts[ $key ] );
1145
+ }
1146
  $discounts = implode( '|', array_values( $discounts ) );
1147
  // update the active discounts
1148
  EDD()->session->set( 'cart_discounts', $discounts );
1383
  edd_get_checkout_uri()
1384
  );
1385
 
1386
+ $discount_html = '';
1387
+ $discount_html .= "<span class=\"edd_discount\">\n";
1388
+ $discount_html .= "<span class=\"edd_discount_rate\">$discount&nbsp;&ndash;&nbsp;$rate</span>\n";
1389
+ $discount_html .= "<a href=\"$remove_url\" data-code=\"$discount\" class=\"edd_discount_remove\"></a>\n";
1390
+ $discount_html .= "</span>\n";
1391
+
1392
+ $html .= apply_filters( 'edd_get_cart_discount_html', $discount_html, $discount, $rate, $remove_url );
1393
  }
1394
 
1395
  return apply_filters( 'edd_get_cart_discounts_html', $html, $discounts, $rate, $remove_url );
1632
  }
1633
 
1634
  }
1635
+ //add_action( 'edd_daily_scheduled_events', 'edd_discount_status_cleanup' );
1636
 
1637
  /**
1638
  * Used during edd_discount_status_cleanup to filter out a meta query properly
includes/emails/functions.php CHANGED
@@ -35,7 +35,7 @@ function edd_email_purchase_receipt( $payment_id, $admin_notice = true ) {
35
 
36
  $subject = edd_get_option( 'purchase_subject', __( 'Purchase Receipt', 'easy-digital-downloads' ) );
37
  $subject = apply_filters( 'edd_purchase_subject', wp_strip_all_tags( $subject ), $payment_id );
38
- $subject = edd_do_email_tags( $subject, $payment_id );
39
 
40
  $heading = edd_get_option( 'purchase_heading', __( 'Purchase Receipt', 'easy-digital-downloads' ) );
41
  $heading = apply_filters( 'edd_purchase_heading', $heading, $payment_id, $payment_data );
35
 
36
  $subject = edd_get_option( 'purchase_subject', __( 'Purchase Receipt', 'easy-digital-downloads' ) );
37
  $subject = apply_filters( 'edd_purchase_subject', wp_strip_all_tags( $subject ), $payment_id );
38
+ $subject = wp_specialchars_decode( edd_do_email_tags( $subject, $payment_id ) );
39
 
40
  $heading = edd_get_option( 'purchase_heading', __( 'Purchase Receipt', 'easy-digital-downloads' ) );
41
  $heading = apply_filters( 'edd_purchase_heading', $heading, $payment_id, $payment_data );
includes/install.php CHANGED
@@ -50,7 +50,7 @@ function edd_install( $network_wide = false ) {
50
  register_activation_hook( EDD_PLUGIN_FILE, 'edd_install' );
51
 
52
  /**
53
- * Run the EDD Instsall process
54
  *
55
  * @since 2.5
56
  * @return void
50
  register_activation_hook( EDD_PLUGIN_FILE, 'edd_install' );
51
 
52
  /**
53
+ * Run the EDD Install process
54
  *
55
  * @since 2.5
56
  * @return void
includes/payments/actions.php CHANGED
@@ -314,3 +314,45 @@ function edd_update_payment_backwards_compat( $meta_id, $object_id, $meta_key, $
314
 
315
  }
316
  add_action( 'updated_postmeta', 'edd_update_payment_backwards_compat', 10, 4 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
 
315
  }
316
  add_action( 'updated_postmeta', 'edd_update_payment_backwards_compat', 10, 4 );
317
+
318
+ /**
319
+ * Deletes edd_stats_ transients that have expired to prevent database clogs
320
+ *
321
+ * @since 2.6.7
322
+ * @return void
323
+ */
324
+ function edd_cleanup_stats_transients() {
325
+ global $wpdb;
326
+
327
+ if ( defined( 'WP_SETUP_CONFIG' ) ) {
328
+ return;
329
+ }
330
+
331
+ if ( defined( 'WP_INSTALLING' ) ) {
332
+ return;
333
+ }
334
+
335
+ $now = current_time( 'timestamp' );
336
+ $transients = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '%\_transient_timeout\_edd\_stats\_%' AND option_value+0 < $now LIMIT 0, 200;" );
337
+ $to_delete = array();
338
+
339
+ if( ! empty( $transients ) ) {
340
+
341
+ foreach( $transients as $transient ) {
342
+
343
+ $to_delete[] = $transient->option_name;
344
+ $to_delete[] = str_replace( '_timeout', '', $transient->option_name );
345
+
346
+ }
347
+
348
+ }
349
+
350
+ if ( ! empty( $to_delete ) ) {
351
+
352
+ $option_names = implode( "','", $to_delete );
353
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')" );
354
+
355
+ }
356
+
357
+ }
358
+ add_action( 'edd_daily_scheduled_events', 'edd_cleanup_stats_transients' );
includes/payments/class-edd-payment.php CHANGED
@@ -577,6 +577,13 @@ class EDD_Payment {
577
  }
578
  }
579
 
 
 
 
 
 
 
 
580
  $this->update_meta( '_edd_payment_meta', $this->payment_meta );
581
  $this->new = true;
582
  }
@@ -839,9 +846,22 @@ class EDD_Payment {
839
  'cart_details' => $this->cart_details,
840
  'fees' => $this->fees,
841
  'currency' => $this->currency,
842
- 'user_info' => $this->user_info,
843
  );
844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
845
  $meta = $this->get_meta();
846
  $merged_meta = array_merge( $meta, $new_meta );
847
 
@@ -1506,6 +1526,7 @@ class EDD_Payment {
1506
  if ( empty( $meta['date'] ) ) {
1507
  $meta['date'] = get_post_field( 'post_date', $this->ID );
1508
  }
 
1509
  }
1510
 
1511
  $meta = apply_filters( 'edd_get_payment_meta_' . $meta_key, $meta, $this->ID );
@@ -2036,7 +2057,10 @@ class EDD_Payment {
2036
  * @return array The Address information for the payment
2037
  */
2038
  private function setup_address() {
2039
- $address = ! empty( $this->payment_meta['user_info']['address'] ) ? $this->payment_meta['user_info']['address'] : array( 'line1' => '', 'line2' => '', 'city' => '', 'country' => '', 'state' => '', 'zip' => '' );
 
 
 
2040
  return $address;
2041
  }
2042
 
577
  }
578
  }
579
 
580
+ if ( edd_get_option( 'enable_sequential' ) ) {
581
+ $number = edd_get_next_payment_number();
582
+ $this->number = edd_format_payment_number( $number );
583
+ $this->update_meta( '_edd_payment_number', $this->number );
584
+ update_option( 'edd_last_payment_number', $number );
585
+ }
586
+
587
  $this->update_meta( '_edd_payment_meta', $this->payment_meta );
588
  $this->new = true;
589
  }
846
  'cart_details' => $this->cart_details,
847
  'fees' => $this->fees,
848
  'currency' => $this->currency,
849
+ 'user_info' => is_array( $this->user_info ) ? $this->user_info : array(),
850
  );
851
 
852
+ // Do some merging of user_info before we merge it all, to honor the edd_payment_meta filter
853
+ if ( ! empty( $this->payment_meta['user_info'] ) ) {
854
+
855
+ $stored_discount = ! empty( $new_meta['user_info']['discount'] ) ? $new_meta['user_info']['discount'] : '';
856
+
857
+ $new_meta[ 'user_info' ] = array_replace_recursive( $new_meta[ 'user_info' ], $this->payment_meta[ 'user_info' ] );
858
+
859
+ if ( 'none' !== $stored_discount ) {
860
+ $new_meta['user_info']['discount'] = $stored_discount;
861
+ }
862
+
863
+ }
864
+
865
  $meta = $this->get_meta();
866
  $merged_meta = array_merge( $meta, $new_meta );
867
 
1526
  if ( empty( $meta['date'] ) ) {
1527
  $meta['date'] = get_post_field( 'post_date', $this->ID );
1528
  }
1529
+
1530
  }
1531
 
1532
  $meta = apply_filters( 'edd_get_payment_meta_' . $meta_key, $meta, $this->ID );
2057
  * @return array The Address information for the payment
2058
  */
2059
  private function setup_address() {
2060
+ $address = ! empty( $this->payment_meta['user_info']['address'] ) ? $this->payment_meta['user_info']['address'] : array();
2061
+ $defaults = array( 'line1' => '', 'line2' => '', 'city' => '', 'country' => '', 'state' => '', 'zip' => '' );
2062
+
2063
+ $address = wp_parse_args( $address, $defaults );
2064
  return $address;
2065
  }
2066
 
includes/payments/functions.php CHANGED
@@ -166,12 +166,6 @@ function edd_insert_payment( $payment_data = array() ) {
166
  $payment->date = $payment_data['post_date'];
167
  }
168
 
169
- if ( edd_get_option( 'enable_sequential' ) ) {
170
- $number = edd_get_next_payment_number();
171
- $payment->number = edd_format_payment_number( $number );
172
- update_option( 'edd_last_payment_number', $number );
173
- }
174
-
175
  // Clear the user's purchased cache
176
  delete_transient( 'edd_user_' . $payment_data['user_info']['id'] . '_purchases' );
177
 
166
  $payment->date = $payment_data['post_date'];
167
  }
168
 
 
 
 
 
 
 
169
  // Clear the user's purchased cache
170
  delete_transient( 'edd_user_' . $payment_data['user_info']['id'] . '_purchases' );
171
 
includes/plugin-compatibility.php CHANGED
@@ -80,7 +80,7 @@ function edd_append_no_cache_param( $settings ) {
80
  add_filter( 'edd_settings_misc', 'edd_append_no_cache_param', -1 );
81
 
82
  /**
83
- * Show the correct language on the [downloads] short code if qTranslate is active
84
  *
85
  * @since 1.7
86
  * @param string $content Download content
80
  add_filter( 'edd_settings_misc', 'edd_append_no_cache_param', -1 );
81
 
82
  /**
83
+ * Show the correct language on the [downloads] shortcode if qTranslate is active
84
  *
85
  * @since 1.7
86
  * @param string $content Download content
includes/post-types.php CHANGED
@@ -269,7 +269,6 @@ add_action( 'init', 'edd_setup_download_taxonomies', 0 );
269
  * @return array Associative array of labels (name = plural)
270
  */
271
  function edd_get_taxonomy_labels( $taxonomy = 'download_category' ) {
272
-
273
  $allowed_taxonomies = apply_filters( 'edd_allowed_download_taxonomies', array( 'download_category', 'download_tag' ) );
274
 
275
  if ( ! in_array( $taxonomy, $allowed_taxonomies ) ) {
@@ -280,17 +279,18 @@ function edd_get_taxonomy_labels( $taxonomy = 'download_category' ) {
280
  $taxonomy = get_taxonomy( $taxonomy );
281
 
282
  if ( false !== $taxonomy ) {
283
- $singular = $taxonomy->labels->singular_name;
284
- $name = $taxonomy->labels->name;
 
285
 
286
  $labels = array(
287
  'name' => $name,
288
  'singular_name' => $singular,
 
289
  );
290
  }
291
 
292
  return apply_filters( 'edd_get_taxonomy_labels', $labels, $taxonomy );
293
-
294
  }
295
 
296
  /**
269
  * @return array Associative array of labels (name = plural)
270
  */
271
  function edd_get_taxonomy_labels( $taxonomy = 'download_category' ) {
 
272
  $allowed_taxonomies = apply_filters( 'edd_allowed_download_taxonomies', array( 'download_category', 'download_tag' ) );
273
 
274
  if ( ! in_array( $taxonomy, $allowed_taxonomies ) ) {
279
  $taxonomy = get_taxonomy( $taxonomy );
280
 
281
  if ( false !== $taxonomy ) {
282
+ $singular = $taxonomy->labels->singular_name;
283
+ $name = $taxonomy->labels->name;
284
+ $menu_name = $taxonomy->labels->menu_name;
285
 
286
  $labels = array(
287
  'name' => $name,
288
  'singular_name' => $singular,
289
+ 'menu_name' => $menu_name,
290
  );
291
  }
292
 
293
  return apply_filters( 'edd_get_taxonomy_labels', $labels, $taxonomy );
 
294
  }
295
 
296
  /**
includes/process-download.php CHANGED
@@ -332,7 +332,7 @@ function edd_deliver_download( $file = '', $redirect = false ) {
332
  */
333
  function edd_is_local_file( $requested_file ) {
334
  $home_url = preg_replace('#^https?://#', '', home_url() );
335
- $requested_file = preg_replace('#^https?://#', '', $requested_file );
336
 
337
  $is_local_url = strpos( $requested_file, $home_url ) === 0;
338
  $is_local_path = strpos( $requested_file, '/' ) === 0;
332
  */
333
  function edd_is_local_file( $requested_file ) {
334
  $home_url = preg_replace('#^https?://#', '', home_url() );
335
+ $requested_file = preg_replace('#^(https?|file)://#', '', $requested_file );
336
 
337
  $is_local_url = strpos( $requested_file, $home_url ) === 0;
338
  $is_local_path = strpos( $requested_file, '/' ) === 0;
includes/scripts.php CHANGED
@@ -34,6 +34,11 @@ function edd_load_scripts() {
34
  $position = edd_get_item_position_in_cart( $post->ID );
35
  }
36
 
 
 
 
 
 
37
  if ( edd_is_checkout() ) {
38
  if ( edd_is_cc_verify_enabled() ) {
39
  wp_register_script( 'creditCardValidator', $js_dir . 'jquery.creditCardValidator' . $suffix . '.js', array( 'jquery' ), EDD_VERSION );
@@ -71,6 +76,7 @@ function edd_load_scripts() {
71
  wp_localize_script( 'edd-ajax', 'edd_scripts', apply_filters( 'edd_ajax_script_vars', array(
72
  'ajaxurl' => edd_get_ajax_url(),
73
  'position_in_cart' => isset( $position ) ? $position : -1,
 
74
  'already_in_cart_message' => __('You have already added this item to your cart','easy-digital-downloads' ), // Item already in the cart message
75
  'empty_cart_message' => __('Your cart is empty','easy-digital-downloads' ), // Item already in the cart message
76
  'loading' => __('Loading','easy-digital-downloads' ) , // General loading message
34
  $position = edd_get_item_position_in_cart( $post->ID );
35
  }
36
 
37
+ $has_purchase_links = false;
38
+ if ( has_shortcode( $post->post_content, 'purchase_link' ) || has_shortcode( $post->post_content, 'downloads' ) || is_post_type_archive( 'download' ) ) {
39
+ $has_purchase_links = true;
40
+ }
41
+
42
  if ( edd_is_checkout() ) {
43
  if ( edd_is_cc_verify_enabled() ) {
44
  wp_register_script( 'creditCardValidator', $js_dir . 'jquery.creditCardValidator' . $suffix . '.js', array( 'jquery' ), EDD_VERSION );
76
  wp_localize_script( 'edd-ajax', 'edd_scripts', apply_filters( 'edd_ajax_script_vars', array(
77
  'ajaxurl' => edd_get_ajax_url(),
78
  'position_in_cart' => isset( $position ) ? $position : -1,
79
+ 'has_purchase_links' => $has_purchase_links,
80
  'already_in_cart_message' => __('You have already added this item to your cart','easy-digital-downloads' ), // Item already in the cart message
81
  'empty_cart_message' => __('Your cart is empty','easy-digital-downloads' ), // Item already in the cart message
82
  'loading' => __('Loading','easy-digital-downloads' ) , // General loading message
includes/shortcodes.php CHANGED
@@ -232,7 +232,7 @@ function edd_register_form_shortcode( $atts, $content = null ) {
232
  add_shortcode( 'edd_register', 'edd_register_form_shortcode' );
233
 
234
  /**
235
- * Discounts short code
236
  *
237
  * Displays a list of all the active discounts. The active discounts can be configured
238
  * from the Discount Codes admin screen.
232
  add_shortcode( 'edd_register', 'edd_register_form_shortcode' );
233
 
234
  /**
235
+ * Discounts shortcode
236
  *
237
  * Displays a list of all the active discounts. The active discounts can be configured
238
  * from the Discount Codes admin screen.
includes/tax-functions.php CHANGED
@@ -136,7 +136,7 @@ function edd_calculate_tax( $amount = 0, $country = false, $state = false ) {
136
  $rate = edd_get_tax_rate( $country, $state );
137
  $tax = 0.00;
138
 
139
- if ( edd_use_taxes() ) {
140
 
141
  if ( edd_prices_include_tax() ) {
142
  $pre_tax = ( $amount / ( 1 + $rate ) );
136
  $rate = edd_get_tax_rate( $country, $state );
137
  $tax = 0.00;
138
 
139
+ if ( edd_use_taxes() && $amount > 0 ) {
140
 
141
  if ( edd_prices_include_tax() ) {
142
  $pre_tax = ( $amount / ( 1 + $rate ) );
includes/template-functions.php CHANGED
@@ -258,16 +258,16 @@ function edd_purchase_variable_pricing( $download_id = 0, $args = array() ) {
258
  $type = edd_single_price_option_mode( $download_id ) ? 'checkbox' : 'radio';
259
  $mode = edd_single_price_option_mode( $download_id ) ? 'multi' : 'single';
260
  $schema = edd_add_schema_microdata() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '';
261
-
262
  // Filter the class names for the edd_price_options div
263
  $css_classes_array = apply_filters( 'edd_price_options_classes', array(
264
  'edd_price_options',
265
  'edd_' . esc_attr( $mode ) . '_mode'
266
  ), $download_id );
267
-
268
  // Sanitize those class names and form them into a string
269
  $css_classes_string = implode( array_map( 'sanitize_html_class', $css_classes_array ), ' ' );
270
-
271
  if ( edd_item_in_cart( $download_id ) && ! edd_single_price_option_mode( $download_id ) ) {
272
  return;
273
  }
@@ -506,7 +506,7 @@ function edd_get_button_styles() {
506
  /**
507
  * Default formatting for download excerpts
508
  *
509
- * This excerpt is primarily used in the [downloads] short code
510
  *
511
  * @since 1.0.8.4
512
  * @param string $excerpt Content before filtering
@@ -521,7 +521,7 @@ add_filter( 'edd_downloads_excerpt', 'edd_downloads_default_excerpt' );
521
  /**
522
  * Default formatting for full download content
523
  *
524
- * This is primarily used in the [downloads] short code
525
  *
526
  * @since 1.0.8.4
527
  * @param string $content Content before filtering
258
  $type = edd_single_price_option_mode( $download_id ) ? 'checkbox' : 'radio';
259
  $mode = edd_single_price_option_mode( $download_id ) ? 'multi' : 'single';
260
  $schema = edd_add_schema_microdata() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '';
261
+
262
  // Filter the class names for the edd_price_options div
263
  $css_classes_array = apply_filters( 'edd_price_options_classes', array(
264
  'edd_price_options',
265
  'edd_' . esc_attr( $mode ) . '_mode'
266
  ), $download_id );
267
+
268
  // Sanitize those class names and form them into a string
269
  $css_classes_string = implode( array_map( 'sanitize_html_class', $css_classes_array ), ' ' );
270
+
271
  if ( edd_item_in_cart( $download_id ) && ! edd_single_price_option_mode( $download_id ) ) {
272
  return;
273
  }
506
  /**
507
  * Default formatting for download excerpts
508
  *
509
+ * This excerpt is primarily used in the [downloads] shortcode
510
  *
511
  * @since 1.0.8.4
512
  * @param string $excerpt Content before filtering
521
  /**
522
  * Default formatting for full download content
523
  *
524
+ * This is primarily used in the [downloads] shortcode
525
  *
526
  * @since 1.0.8.4
527
  * @param string $content Content before filtering
languages/easy-digital-downloads.pot CHANGED
@@ -3138,7 +3138,7 @@ msgstr ""
3138
  #: includes/admin/settings/register-settings.php:250
3139
  msgid ""
3140
  "This is the checkout page where buyers will complete their purchases. The "
3141
- "[download_checkout] short code must be on this page."
3142
  msgstr ""
3143
 
3144
  #: includes/admin/settings/register-settings.php:254
@@ -3156,7 +3156,7 @@ msgstr ""
3156
  #: includes/admin/settings/register-settings.php:259
3157
  msgid ""
3158
  "This is the page buyers are sent to after completing their purchases. The "
3159
- "[edd_receipt] short code should be on this page."
3160
  msgstr ""
3161
 
3162
  #: includes/admin/settings/register-settings.php:267
@@ -3176,7 +3176,7 @@ msgstr ""
3176
  #: includes/admin/settings/register-settings.php:277
3177
  msgid ""
3178
  "This page shows a complete purchase history for the current user, including "
3179
- "download links. The [purchase_history] short code should be on this page."
3180
  msgstr ""
3181
 
3182
  #: includes/admin/settings/register-settings.php:285
@@ -4111,7 +4111,7 @@ msgid "You must choose a download"
4111
  msgstr ""
4112
 
4113
  #: includes/admin/thickbox.php:88
4114
- msgid "Use the form below to insert the short code for purchasing a %s"
4115
  msgstr ""
4116
 
4117
  #: includes/admin/thickbox.php:95
@@ -8010,4 +8010,4 @@ msgstr ""
8010
  #: includes/post-types.php:348
8011
  msgctxt "Inactive discount code status"
8012
  msgid "Inactive"
8013
- msgstr ""
3138
  #: includes/admin/settings/register-settings.php:250
3139
  msgid ""
3140
  "This is the checkout page where buyers will complete their purchases. The "
3141
+ "[download_checkout] shortcode must be on this page."
3142
  msgstr ""
3143
 
3144
  #: includes/admin/settings/register-settings.php:254
3156
  #: includes/admin/settings/register-settings.php:259
3157
  msgid ""
3158
  "This is the page buyers are sent to after completing their purchases. The "
3159
+ "[edd_receipt] shortcode should be on this page."
3160
  msgstr ""
3161
 
3162
  #: includes/admin/settings/register-settings.php:267
3176
  #: includes/admin/settings/register-settings.php:277
3177
  msgid ""
3178
  "This page shows a complete purchase history for the current user, including "
3179
+ "download links. The [purchase_history] shortcode should be on this page."
3180
  msgstr ""
3181
 
3182
  #: includes/admin/settings/register-settings.php:285
4111
  msgstr ""
4112
 
4113
  #: includes/admin/thickbox.php:88
4114
+ msgid "Use the form below to insert the shortcode for purchasing a %s"
4115
  msgstr ""
4116
 
4117
  #: includes/admin/thickbox.php:95
8010
  #: includes/post-types.php:348
8011
  msgctxt "Inactive discount code status"
8012
  msgid "Inactive"
8013
+ msgstr ""
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Easy Digital Downloads ===
2
  Author URI: https://pippinsplugins.com
3
  Plugin URI: https://easydigitaldownloads.com
4
- Contributors: easydigitaldownloads, mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702, cklosows, mindctrl, topher1kenobe, sksmatt, SpencerFinnell, johnstonphilip
5
- Donate link: https://pippinsplugins.com/support-the-site
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
7
  Requires at least: 4.0
8
  Tested up to: 4.7
9
- Stable Tag: 2.6.6
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
@@ -31,7 +31,7 @@ Features of the plugin include:
31
  * Detailed purchase and file download logs
32
  * Data export options for CSV and PDF
33
  * Add functionality with many [extensions](https://easydigitaldownloads.com/downloads/?utm_source=extensions&utm_medium=description_tab&utm_content=extensions&utm_campaign=readme)
34
- * Developer friendly with dozens of actions and filters. [View Codex](https://easydigitaldownloads.com/codex/index.html)
35
 
36
  More information at [Easy Digital Downloads.com](https://easydigitaldownloads.com/?utm_source=home&utm_medium=description_tab&utm_content=home&utm_campaign=readme).
37
 
@@ -85,7 +85,7 @@ That said, we have a nice collection of free themes that come with support for E
85
 
86
  There are two ways you can show the downloads shopping cart:
87
 
88
- 1. Use the short code and simply place [download_cart] on a page or within a text widget.
89
 
90
  2. Use the included widget. Go to Appearance > Widgets and place the "Downloads Cart" widget into any widget area available.
91
 
@@ -107,9 +107,9 @@ To get rid of the 404 error when viewing a download, you need to resave your per
107
 
108
  = How do I Show the User's Purchase History? =
109
 
110
- Place the [purchase_history] short code on any page.
111
 
112
- If you want to just show a list of the files the user has purchased, use the [download_history] short code instead.
113
 
114
  = How do I display products? =
115
 
@@ -187,6 +187,43 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
187
 
188
  == Changelog ==
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  = 2.6.6, August 1, 2016 =
191
  * Fix: Discount codes being marked as inactive
192
  * Fix: Incorrect state/province used in tax calculations in certain scenarios
@@ -716,7 +753,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
716
  * New: Added filters for the From Address for admin sale notifications
717
  * Tweak: Improved performance of user validation in the REST API
718
  * Tweak: Improved edd_is_admin_page() helper function for detecting when on specific EDD admin pages
719
- * Tweak: Stylesheets are now registered before enqueueed
720
  * Tweak: Moved Test Mode option to the Payment Gateways tab
721
  * Tweak: Earnings and sales states now incremented while in Test Mode
722
  * Tweak: Download Details widget now properly respects taxonomy labels
@@ -797,7 +834,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
797
  * Fix: Mixed-content notice on the checkout page for sites with SSL
798
  * Fix: Incorrect price ID gets added to the cart when multiple purchase buttons are placed on the same page with the price_id parameter
799
  * Fix: Removed Yugoslavia from the country list since it is not a country anymore
800
- * Fix: Quantity field not shown on purchase buttons with the [purchase_link] short code
801
  * Tweak: Automatically disable buy now buttons when taxes are enabled since they do not support taxes
802
  * Tweak: Automatically disable the edd_test_ajax_works() test if the Airplane Mode plugin is enabled
803
  * Tweak: Updated translation files for many languages
@@ -868,7 +905,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
868
  * Fix: Discount codes are validated improperly when the product requirements are not meant
869
  * Fix: CVC field allows more than 4 digits
870
  * Fix: In-browser receipt page is a mess on Twenty Fifteeen theme
871
- * Fix: exclude_categories and exclude_tags parameters not working properly in [downloads] short code
872
  * Fix: Cross-domain download files get corrupted on NGINX servers
873
  * Fix: Instantiating EDD_Payment_Stats without a date triggers an error
874
  * Fix: File size not displayed when download files
@@ -912,7 +949,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
912
 
913
  * New: Introduced edd_global_checkout_script_vars and edd_ajax_script_vars filters for localized javascript variables
914
  * Bug: Strict PHP Standards notice in EDD_Gateway_Error_Log class
915
- * Bug: Category parameter behaves incorrectly for the [downloads] short code
916
  * Bug: Select a Download placeholder on add discount screen saves improperly
917
  * Bug: EDD_Session leaks across sites in multisite installs
918
  * Bug: Incorrect spelling of Indian state names
@@ -932,7 +969,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
932
  * Bug: GMT date / time not properly set in date is specified when creating a payment record
933
  * Bug: Items purchased with quantities show incorrectly in sales log table
934
  * Bug: [downloads] pagination not working with default permalinks
935
- * Bug: AND relation acting as an OR relation in [downloads] short code
936
  * Bug: Cart widget items incorrect with variable prices
937
  * Bug: Custom date range reports do not work when crossing year boundaries
938
  * Bug: Yesterday report fails on January 1
@@ -953,7 +990,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
953
  * Fix: Extension updates running on every page load of plugins.php when using multisite
954
  * Fix: edd_test_ajax_works() request firing on every page load
955
  * Fix: Incorrect price ID added to the cart when two purchase buttons are on the same page
956
- * Fix: Fatal error when using price_id in the purchase_link short code
957
  * Fix: Shopping cart squished in the Twenty Fifteen theme
958
  * Fix: Removed unused variables in edd_get_register_fields()
959
  * Fix: Incorrect quantity field displayed when a variable priced item with multi-purchase mode enabled is in the vart
@@ -973,8 +1010,8 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
973
 
974
  * New: Transaction IDs can now be linked to the transaction details page in the payment processor (per gateway)
975
  * New: Added a WP CLI command for generating test purchase data
976
- * New: "price_id" parameter introduced for [purchase_link] short code to allow purchasing a single price option
977
- * New: Added support for variable prices to the [edd_price] short code
978
  * New: EDD_Download class to make interacting with Download products easier for theme and extension developers
979
  * New: edd_cart_item_tax_description filter
980
  * New: Purchase buttons can now display a quantity field
@@ -1067,7 +1104,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
1067
  = 2.1.4, September 22, 2014 =
1068
 
1069
  * Fix: New sale notification emails not sending for some users
1070
- * Fix: direct="true" not working in the [purchase_link] short code
1071
  * Fix: User meta for saved carts not properly cleaned out after a cart is restored
1072
  * Fix: SQL errors related to WP Session garbage collection
1073
  * Fix: API Request logs table showing log entries from other log types
@@ -1118,7 +1155,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
1118
  * New: Introduced edd_get_payment_transaction_id() and edd_set_payment_transaction_id()
1119
  * New: Introduced edd_user_can_view_receipt_item filter
1120
 
1121
- * Tweak: [downloads] short code now accepts slugs or term IDs for category and tag attributes
1122
  * Tweak: Estimated earnings are more accurate
1123
  * Tweak: Custom date ranges for report graphs now include a day option
1124
  * Tweak: Added EDD-specific classes to the body tag when appropriate
@@ -1215,7 +1252,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
1215
  = 2.0, June 3, 2014 =
1216
 
1217
  * New: Added support for sequential order numbers
1218
- * New: Added a new [edd_register] short code
1219
  * New: Added an enforce SSL option
1220
  * New: Added greatly improved discount code validation during checkout
1221
  * New: Added a new API Keys list table in Downloads > Tools
@@ -1245,7 +1282,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
1245
  * Tweak: Added a link to the File Downloads log from View Order Details
1246
  * Tweak: Added a "was_completed" meta flag for payment records
1247
  * Tweak: Reversed some of the checkbox anti-patterns
1248
- * Tweak: Added support showing all Download products in the [downloads] short code
1249
  * Tweak: Log the reason a payment is marked as failed from PayPal
1250
  * Tweak: Added a columns variable to the edd_download_class filter
1251
  * Tweak: Added tax settings to the System Info
@@ -1325,7 +1362,7 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
1325
 
1326
  * Tweak: Added $payment_id to the edd_email_receipt_download_title filter
1327
  * Tweak: Added a break after the country select field on checkout
1328
- * Tweak: Removed direct call to wp_enqueu_script( 'jquery' ) since it is loaded as a dependency
1329
  * Tweak: Improved the Dashboard summary widget layout
1330
  * Tweak: Improve column width of the Downloads table
1331
  * Tweak: Updated language files
@@ -1532,7 +1569,7 @@ _REQUIRES WordPress 3.7 or later_
1532
  * Fix: Selecting the same month for start and end in Report date filters resulted in a 12 month spread
1533
  * Fix: A bug that caused the Yesterday report view to show 0 earnings and sales when the current month is January
1534
 
1535
- * Tweak: Better support for responsive columns in the [downloads] short code
1536
  * Tweak: Improved the sample product import file
1537
  * Tweak: Better setup EDD_Roles during initial installation
1538
  * Tweak: Improved the checkout_cart.php template file
@@ -1589,7 +1626,7 @@ _REQUIRES WordPress 3.7 or later_
1589
  * Fix: fatal error in payment history column
1590
  * Fix: payment method icons not respecting WP in its own directory
1591
  * Fix: invalid UTF8 sequence in heartbeat API response
1592
- * Fix: illegal offset with user address in profile editor short code
1593
  * Fix: empty paragraph tag after tax rates in tax settings
1594
  * Fix: undefined notices when saving Extensions tab with only one checkbox
1595
  * Fix: double subtotal when two cart widgets are displayed on the same page
@@ -1694,7 +1731,7 @@ _REQUIRES WordPress 3.7 or later_
1694
  * Tweak: added hex values to edd_get_button_colors()
1695
  * Tweak: added form_id attribute to [edd_purchase_link]
1696
  * Tweak: dramatically improved the EDD settings API
1697
- * Tweak: added a column class to the [downloads] short code
1698
  * Tweak: added SPAN tags around checkoug LEGEND tags
1699
  * Tweak: automatically update file price conditions when new price options are added
1700
  * Tweak: fire edd_create_protection_files() on install process to ensure .htaccess file is created in uploads/edd directory
@@ -1734,7 +1771,7 @@ _REQUIRES WordPress 3.7 or later_
1734
  * New: Added options to configure the admin purchase notification email
1735
  * New: Added search to customer reports
1736
  * New: Added item quantity support on checkout
1737
- * New: Brought back the [downloads_history] short code
1738
  * New: Added the ability to use multiple discounts per-purchase
1739
  * New: Added filter to disable schema.org microdata
1740
  * New: Better payment method icons, including full retina support
@@ -1779,8 +1816,8 @@ _REQUIRES WordPress 3.7 or later_
1779
  * Fix: Incorrect usage of edd_log_test_payment_stats filter
1780
  * Fix: Check for existence of country code in zip/postal code regex
1781
  * Fix: Variable pricing didn't follow currency position
1782
- * Fix: Invalid foreach error with [downloads_discounts] short code
1783
- * Fix: [purchase_collection] short code broken
1784
  * Fix: Customers not always receiving purchase receipt
1785
 
1786
 
@@ -1871,7 +1908,7 @@ _REQUIRES WordPress 3.7 or later_
1871
  * Fix: Insert Download icon screwed up
1872
  * Fix: Estimated stats incorrect
1873
  * Fix: "upload" field type in settings doesn't use WP 3.5 uploader
1874
- * Fix: Sample import data uses wrong short code
1875
  * Fix: Max product limit in PayPal Standard
1876
  * Fix: Incorrect parameter in shortcode-content-cart-button.php
1877
  * Fix: System Info: Page On Front and Page for Posts have same value
@@ -1881,7 +1918,7 @@ _REQUIRES WordPress 3.7 or later_
1881
  * Fix: WP Super Cache 1.3.1 compatibility
1882
  * Fix: Incorrect URL to iPhone image in Payment History
1883
  * Fix: Editing Downloads in payment doesn't work fully
1884
- * Fix: Purchase History page used wrong short code
1885
  * Fix: Error bulk-deleting payments with some languages
1886
  * Fix: Prices not showing on purchase button
1887
  * Fix: Incorect path and URL constants when wp-content/plugins is symlinked
@@ -1918,7 +1955,7 @@ _REQUIRES WordPress 3.7 or later_
1918
  * New: Added ability to export file download history by date
1919
  * New: Added category filtering to Downloads > Reports > Downloads
1920
  * New: Added option to disable admin sales notices
1921
- * Tweaked: Better options to disable the price in the [purchase_link] short code
1922
  * Tweaked: Improved the checkout error fields
1923
  * Fix: Issue with purchase receipt CSS
1924
  * Fix: SQL error with comments_clauses
@@ -2010,7 +2047,7 @@ _REQUIRES WordPress 3.7 or later_
2010
  * New: Added new EDD_Export class to more flexible export system
2011
  * New: Pages are auto created and saved to the EDD options on activation
2012
  * New: Added excerpt support to download post type
2013
- * New: Added new filter for [downloads] short code HTML
2014
  * New: Added dashboard alert to payment history when in Test Mode
2015
  * New: Added dashboard alert if the checkout page is deleted
2016
  * New: Show price range for variable priced products in Downloads list
@@ -2110,7 +2147,7 @@ _REQUIRES WordPress 3.7 or later_
2110
  * Tweak: Changelogs cleaned up (props @chriscct7)
2111
  * Tweak: Spaces in Download File Names May Cause 404
2112
  * Tweak: Remove Bullets from Default Email Template
2113
- * Tweak: Paginate Payment / Download History Short Codes
2114
  * Tweak: Convert Discount Admin Page to WP List Table
2115
  * Tweak: Moved the new edit profile form into templates folder
2116
  * Tweak: Removed cache_results query arg from sales widget
@@ -2222,13 +2259,13 @@ _REQUIRES WordPress 3.7 or later_
2222
 
2223
  * New: Option for defining the emails that receive admin sale notifications
2224
  * New: edd_item_in_cart filter
2225
- * New: Added prices to the [purchase_link] short code so that the product price is shown on the button
2226
  * New: Added payment history search
2227
- * New: Added exclude_category and exclude_tags parameters to the [downloads] short code
2228
  * New: Added date parameters to edd_get_payments() to allow payments of specific dates to be queried
2229
  * Fix: A problem with $0 purchases
2230
  * Fix: Problem with display the buyer's first name in purchase receipts
2231
- * Fix: Problem with category/tag query parameters in the [downloads] short code
2232
  * Fix: Problem with PayPal purchases when item names have HTML entities
2233
  * Fix: Problem with prices over 1,000 on checkout
2234
  * Fix: Path to custom edd.css
@@ -2258,11 +2295,11 @@ _REQUIRES WordPress 3.7 or later_
2258
  * Fix: Problem with a stray file upload button in IE and Firefox
2259
  * Fix: Problem with improperly formatted amounts after applying a flat rate discount
2260
  * Fix: two conflicting filter names
2261
- * Fix: A pagination bug with the [downloads] short code
2262
  * Tweak: Improved the error logging system
2263
  * Tweak: Improved the Payment History export to CSV option
2264
  * Tweak: Removed old, out of date PayPal payment gateway
2265
- * Tweak: Improved markup for the [edd_price] short code
2266
  * Tweak: Updated Dutch translation files
2267
  * Tweak: Improved front-end CSS for variable price options
2268
  * Tweak: Improved logic for determing the lower price on variable priced downloads
@@ -2270,7 +2307,7 @@ _REQUIRES WordPress 3.7 or later_
2270
 
2271
  = 1.3.2.1: November 06, 2012 =
2272
 
2273
- * New: Added basic pagination to the [downloads] short code
2274
  * New: Added new "edd_checkout_form_bottom" hook
2275
  * New: Added version numbers to scripts and styles to ensure proper display on upgrades
2276
  * New: Improved the checkout template to make it easier to customize
@@ -2299,7 +2336,7 @@ _REQUIRES WordPress 3.7 or later_
2299
  * New: Integrated Opt-In PressTrends tracking
2300
  * New: Added new edd_price_field action to the download meta box
2301
  * New: Added Lifetime Best Selling into the Dashboard Sales widget
2302
- * Fix: Problem with the [download_discounts] short code
2303
  * Fix: Problem with the file download limit feature
2304
  * Fix: Problem with amount formatting in the purchase receipts
2305
  * Fix: Problem with the Apply Discount link when not logged-in
@@ -2408,8 +2445,8 @@ _REQUIRES WordPress 3.7 or later_
2408
  * New: Added new filter to the EDD languages directory
2409
  * New: Added new CSS for improved styling of checkout error messages
2410
  * New: Added new filter to edd_get_checkout_uri
2411
- * New: Added huge new templating system to [download_history] and [purchase_history] short codes
2412
- * New: Added huge new templating system for [downloads] short code
2413
  * New: Created new global checkout fields and validation methods for use by payment gateways
2414
  * New: Added new "Purchase History" widget
2415
  * New: Added new classes/div to the purchase history widget
@@ -2424,7 +2461,7 @@ _REQUIRES WordPress 3.7 or later_
2424
  * New: Added a new meta key for payment total so that payments can be sorted by amount
2425
  * New: Added a new option to export all customer emails from Payment History
2426
  * New: Added new edd_download_post_type_args filter
2427
- * Fix: Problem with the auto-generated short code on the All Downloads page
2428
  * Fix: Problem with new downloads not being able to add download files
2429
  * Fix: Incorrect variable name in register-settings.php
2430
  * Fix: Problem with checkout ajax when permalinks are not enabled
@@ -2478,7 +2515,7 @@ _REQUIRES WordPress 3.7 or later_
2478
  * New: Added new actions to top and bottom of payment history page
2479
  * New: Added class names to all table rows and cells in the checkout template
2480
  * Fix: Misnamed class on the empty cart element
2481
- * Fix: Bug with button colors when inserting a short code
2482
  * Fix: Spelling error in Downloads > Settings > Payment Gateways
2483
  * Fix: Major bug with discount codes that caused the "uses" value to get erased when updated a code
2484
  * Fix: Bug with download sales/earnings stats and variable priced downloads
@@ -2522,7 +2559,7 @@ _REQUIRES WordPress 3.7 or later_
2522
 
2523
  = 1.1.4.1: August 07, 2012 =
2524
 
2525
- * New: Added "order" and "orderby" parameters to the [downloads] short code
2526
  * New: Added support for .mobi files
2527
  * New: Add a "No Download Found" message to the PDF reports for when there are no products
2528
  * Fix: Bug with the source file download processing
@@ -2536,9 +2573,9 @@ _REQUIRES WordPress 3.7 or later_
2536
 
2537
  * New: Added Quick Edit ability to the Download Price option
2538
  * New: Added a new PDF Report generation feature for Sales and Earnings, thanks to SunnyRatilal
2539
- * New: Added a new [edd_price] short code
2540
  * New: Added new edd_cart_contents filter
2541
- * New: Added a check to existing jQuery libraries before enqueing
2542
  * New: Added is_array() check to the price options name function to fix a potential error
2543
  * New: Added an php_ini check for safe mode
2544
  * Fix: Bug with the purchase receipt templates
@@ -2583,7 +2620,7 @@ _REQUIRES WordPress 3.7 or later_
2583
 
2584
  * New: Added new payment export system, thanks to MadeByMike
2585
  * New: Added a legend to the user info fieldset
2586
- * New: Added a new "class" parameter to the [purchas_link} short code
2587
  * New: Added new edd_is_checkout() conditional function
2588
  * Fix: Bug with the ajax function that adds items to the cart - it did not show the price option name until page was refreshed
2589
  * Fix: Bug in the purchase receipt that caused it to include all source file links, not just the ones set to the price option purchase
@@ -2632,10 +2669,10 @@ _REQUIRES WordPress 3.7 or later_
2632
  * Fix: Bug with the EDD_READ_FILE_MODE constant
2633
  * Fix: Bug with the file upload meta box fields
2634
  * Tweak: Updated the "View Purchase Details" modal to include the price option purchased, if any
2635
- * Tweak: Updated the purchase/download history short codes to only show files for the price options the user has purchased
2636
  * Tweak: Made improvements to the checkout registration form layout
2637
- * Tweak: Updated the [purchase_link] short code in the Download Configuration meta box to reflect the chosen button color
2638
- * Tweak: Updated the "Short Code" column in the list table to include the correct button color option
2639
  * Tweak: Improved some file / function organization
2640
 
2641
  = 1.0.8.5: June 28, 2012 =
@@ -2644,7 +2681,7 @@ _REQUIRES WordPress 3.7 or later_
2644
  * Fix: Bug with the page options in settings
2645
  * Fix: Bug with the function that checks if a user has purchased a specific download
2646
  * Fix: Potential bug with the "settings updated" notice that could have caused duplicate messages to be shown
2647
- * Fix: Bug with the [downloads] short code
2648
  * Tweak: Enhanced the function for checking if a user has purchased a download to add support for checking for specific price options
2649
  * Tweak: Removed the menu_position attribute from the "download" post type to help prevent menu conflicts
2650
  * Tweak: Updated the edd_read_file() function to convert local URLs to absolute file paths
@@ -2653,9 +2690,9 @@ _REQUIRES WordPress 3.7 or later_
2653
 
2654
  * New: Added a few new action hooks
2655
  * New: Added "Settings Updated" notification when saving plugin settings
2656
- * New: Add a parameter to the [downloads] short code for showing the complete content
2657
- * New: Added options for linking the download titles in the [downloads] short code
2658
- * New: Added a "price" parameter to the [downloads] short code
2659
  * Fix: Bug with free downloads
2660
  * Fix: Bug with download sale/earning stats going negative when reversing purchases
2661
  * Tweak: Improved the CSS on the variable price option forms
@@ -2664,7 +2701,7 @@ _REQUIRES WordPress 3.7 or later_
2664
  * Tweak: Renamed the "Manual Payment" gateway to "Test"
2665
  * Tweak: Updated Spanish language files
2666
  * Tweak: Removed some blank form action attributes that caused the HTML to invalidate
2667
- * Tweak: Removed the "You have already purchased this" message from the purchase link short code / template
2668
 
2669
  = 1.0.8.3: June 15, 2012 =
2670
 
@@ -2673,11 +2710,11 @@ _REQUIRES WordPress 3.7 or later_
2673
  * New: Added auto creation for .htaccess files in the uploads directory for EDD to help protect unauthorized file downloads
2674
  * New: Added Turkish language files
2675
  * New: Added detection for php.ini variables important to PayPal payment verification
2676
- * New: Added a new short code for showing a list of active discounts:** [download_discounts]
2677
  * New: Added pagination to the download/sale log on download Edit screens
2678
  * New: Added new "edd_default_downloads_name" filter for changing the default singular and plural "download" labels used globally throughout the plugin
2679
- * New: Adding new span.edd-cart-item-separator to the cart widget and short code
2680
- * New: Added more support for the [downloads] short code, used to display a list or grid of digital products
2681
  * New: Added option to send purchase receipt when manually marked a payment as complete
2682
  * New: Added new "edd_success_page_redirect" filter to the function that redirects a buyer to the success page
2683
  * New: Added "Payment Method" to the "View Order Details" popup
@@ -2746,7 +2783,7 @@ _REQUIRES WordPress 3.7 or later_
2746
  * New: Added a wrapper div.edd-cart-ajax-alert around the message that shows when an item has been added to the cart
2747
  * Fix: Bug with the discount code form on checkout. It now only shows if there is at least one active discount. Props to Sksmatt
2748
  * Fix: Bug with the Media Uploader when adding media to the content of a Download. Props to Sksmatt
2749
- * Fix: Small error notice present in the checkout form short code. Props to Sksmatt
2750
  * Fix: Small bug wit the edd_remove_item_url() present when on a 404 error page. Props to Sksmatt
2751
  * Tweak: Updated the edd_purchase_link() function to automatically detect chosen link styles and colors
2752
 
@@ -2755,7 +2792,7 @@ _REQUIRES WordPress 3.7 or later_
2755
  * New: edd_has_variable_prices() function
2756
  * New: Added missing "required" classes to the checkout login form
2757
  * New: Added the ability to update the email address associated with payments
2758
- * New: Added a new [edd_login] short code for showing a basic login form
2759
  * New: Added new Dutch language translation files
2760
  * New: Added an $id parameter to the edd_cart_item filter
2761
  * Tweak: Updated French language files
1
  === Easy Digital Downloads ===
2
  Author URI: https://pippinsplugins.com
3
  Plugin URI: https://easydigitaldownloads.com
4
+ Contributors: easydigitaldownloads, mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702, cklosows, mindctrl, sksmatt, SpencerFinnell, johnstonphilip
5
+ Donate link: https://easydigitaldownloads.com/donate/
6
  Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
7
  Requires at least: 4.0
8
  Tested up to: 4.7
9
+ Stable Tag: 2.6.7
10
 
11
  License: GNU Version 2 or Any Later Version
12
 
31
  * Detailed purchase and file download logs
32
  * Data export options for CSV and PDF
33
  * Add functionality with many [extensions](https://easydigitaldownloads.com/downloads/?utm_source=extensions&utm_medium=description_tab&utm_content=extensions&utm_campaign=readme)
34
+ * Developer friendly with dozens of actions and filters. [View developer documentation](http://docs.easydigitaldownloads.com/collection/174-developer-docs)
35
 
36
  More information at [Easy Digital Downloads.com](https://easydigitaldownloads.com/?utm_source=home&utm_medium=description_tab&utm_content=home&utm_campaign=readme).
37
 
85
 
86
  There are two ways you can show the downloads shopping cart:
87
 
88
+ 1. Use the shortcode and simply place [download_cart] on a page or within a text widget.
89
 
90
  2. Use the included widget. Go to Appearance > Widgets and place the "Downloads Cart" widget into any widget area available.
91
 
107
 
108
  = How do I Show the User's Purchase History? =
109
 
110
+ Place the [purchase_history] shortcode on any page.
111
 
112
+ If you want to just show a list of the files the user has purchased, use the [download_history] shortcode instead.
113
 
114
  = How do I display products? =
115
 
187
 
188
  == Changelog ==
189
 
190
+ = 2.6.7, September 14, 2016 =
191
+ * Fix: Improved CSV file type detection to avoid 'invalid CSV' error.
192
+ * Fix: The edd_payment_meta filter was not respecting values modified during the filter when saving a payment.
193
+ * Fix: Redirect to Checkout setting was not keeping custom query string variables when direct cart URLs.
194
+ * Fix: Cart Widget did not properly refresh the page when purchase links were present on the page.
195
+ * Fix: Categories/Tags not created and assigned during product import.
196
+ * Fix: Remove discount cron which could cause discount codes incorrectly changing to inactive without warning.
197
+ * Fix: Can't Uncheck All Checkboxes in Multi-Check.
198
+ * Fix: Verify discount is in array before unsetting the discount.
199
+ * Fix: edd_stats_{key} transients causing performance issues.
200
+ * Fix: Undefined Indexes when assigning new user ID to customer details.
201
+ * Fix: Purchase Email Subject ampersands getting improperly HTML encoded.
202
+ * Fix: Local files not being properly found when on a Windows server.
203
+ * Fix: Properly catch default case for license activation callback.
204
+ * Fix: Sequential payment number not assigned when creating payments with EDD_Payment.
205
+ * Fix: Tax calculation should only run on values greater than 0.
206
+ * Fix: Fix variable name in customer recount tool for post status array.
207
+ * Fix: Discount functions not always having user_info array key.
208
+ * Tweak: Rename Download List Table Taxonomy Headers.
209
+ * Tweak: Fix horizontal alignment of items in the dashboard widget.
210
+ * Tweak: Update codex link in readme.txt.
211
+ * Tweak: Update EDD_SL_Plugin_Updater.php to latest version.
212
+ * Tweak: Correct references of 'short code' to 'shortcode'.
213
+ * Tweak: Filter "edd_get_cart_discounts_html" does not pass relevant arguments for developers.
214
+ * Tweak: Update payments export to use EDD_Payment.
215
+ * Tweak: Return null for all empty data returned from the API instead of an empty array.
216
+ * Tweak: Update readme.txt with new donate link.
217
+ * Tweak: Allow custom Arguments for Settings API Callbacks.
218
+ * New: Accepted payment method icons have been updated to PNGs with transparent backgrounds.
219
+ * New: Update MasterCard Logo.
220
+ * New: Add filters to API endpoints.
221
+ * New: Added actions to the adding and removing of fees.
222
+ * New: Buy Now button option on Add/Edit Download now always shows, but is disabled when requirements are not.
223
+ * New: Customer address can now be edited for customers who do not previously have an address on file.
224
+ * New: Add edd_get_php_arg_separator_output on System Info.
225
+ * New: Linking a Customer to a WordPress user now allows login or email address as a valid input.
226
+
227
  = 2.6.6, August 1, 2016 =
228
  * Fix: Discount codes being marked as inactive
229
  * Fix: Incorrect state/province used in tax calculations in certain scenarios
753
  * New: Added filters for the From Address for admin sale notifications
754
  * Tweak: Improved performance of user validation in the REST API
755
  * Tweak: Improved edd_is_admin_page() helper function for detecting when on specific EDD admin pages
756
+ * Tweak: Stylesheets are now registered before enqueued
757
  * Tweak: Moved Test Mode option to the Payment Gateways tab
758
  * Tweak: Earnings and sales states now incremented while in Test Mode
759
  * Tweak: Download Details widget now properly respects taxonomy labels
834
  * Fix: Mixed-content notice on the checkout page for sites with SSL
835
  * Fix: Incorrect price ID gets added to the cart when multiple purchase buttons are placed on the same page with the price_id parameter
836
  * Fix: Removed Yugoslavia from the country list since it is not a country anymore
837
+ * Fix: Quantity field not shown on purchase buttons with the [purchase_link] shortcode
838
  * Tweak: Automatically disable buy now buttons when taxes are enabled since they do not support taxes
839
  * Tweak: Automatically disable the edd_test_ajax_works() test if the Airplane Mode plugin is enabled
840
  * Tweak: Updated translation files for many languages
905
  * Fix: Discount codes are validated improperly when the product requirements are not meant
906
  * Fix: CVC field allows more than 4 digits
907
  * Fix: In-browser receipt page is a mess on Twenty Fifteeen theme
908
+ * Fix: exclude_categories and exclude_tags parameters not working properly in [downloads] shortcode
909
  * Fix: Cross-domain download files get corrupted on NGINX servers
910
  * Fix: Instantiating EDD_Payment_Stats without a date triggers an error
911
  * Fix: File size not displayed when download files
949
 
950
  * New: Introduced edd_global_checkout_script_vars and edd_ajax_script_vars filters for localized javascript variables
951
  * Bug: Strict PHP Standards notice in EDD_Gateway_Error_Log class
952
+ * Bug: Category parameter behaves incorrectly for the [downloads] shortcode
953
  * Bug: Select a Download placeholder on add discount screen saves improperly
954
  * Bug: EDD_Session leaks across sites in multisite installs
955
  * Bug: Incorrect spelling of Indian state names
969
  * Bug: GMT date / time not properly set in date is specified when creating a payment record
970
  * Bug: Items purchased with quantities show incorrectly in sales log table
971
  * Bug: [downloads] pagination not working with default permalinks
972
+ * Bug: AND relation acting as an OR relation in [downloads] shortcode
973
  * Bug: Cart widget items incorrect with variable prices
974
  * Bug: Custom date range reports do not work when crossing year boundaries
975
  * Bug: Yesterday report fails on January 1
990
  * Fix: Extension updates running on every page load of plugins.php when using multisite
991
  * Fix: edd_test_ajax_works() request firing on every page load
992
  * Fix: Incorrect price ID added to the cart when two purchase buttons are on the same page
993
+ * Fix: Fatal error when using price_id in the purchase_link shortcode
994
  * Fix: Shopping cart squished in the Twenty Fifteen theme
995
  * Fix: Removed unused variables in edd_get_register_fields()
996
  * Fix: Incorrect quantity field displayed when a variable priced item with multi-purchase mode enabled is in the vart
1010
 
1011
  * New: Transaction IDs can now be linked to the transaction details page in the payment processor (per gateway)
1012
  * New: Added a WP CLI command for generating test purchase data
1013
+ * New: "price_id" parameter introduced for [purchase_link] shortcode to allow purchasing a single price option
1014
+ * New: Added support for variable prices to the [edd_price] shortcode
1015
  * New: EDD_Download class to make interacting with Download products easier for theme and extension developers
1016
  * New: edd_cart_item_tax_description filter
1017
  * New: Purchase buttons can now display a quantity field
1104
  = 2.1.4, September 22, 2014 =
1105
 
1106
  * Fix: New sale notification emails not sending for some users
1107
+ * Fix: direct="true" not working in the [purchase_link] shortcode
1108
  * Fix: User meta for saved carts not properly cleaned out after a cart is restored
1109
  * Fix: SQL errors related to WP Session garbage collection
1110
  * Fix: API Request logs table showing log entries from other log types
1155
  * New: Introduced edd_get_payment_transaction_id() and edd_set_payment_transaction_id()
1156
  * New: Introduced edd_user_can_view_receipt_item filter
1157
 
1158
+ * Tweak: [downloads] shortcode now accepts slugs or term IDs for category and tag attributes
1159
  * Tweak: Estimated earnings are more accurate
1160
  * Tweak: Custom date ranges for report graphs now include a day option
1161
  * Tweak: Added EDD-specific classes to the body tag when appropriate
1252
  = 2.0, June 3, 2014 =
1253
 
1254
  * New: Added support for sequential order numbers
1255
+ * New: Added a new [edd_register] shortcode
1256
  * New: Added an enforce SSL option
1257
  * New: Added greatly improved discount code validation during checkout
1258
  * New: Added a new API Keys list table in Downloads > Tools
1282
  * Tweak: Added a link to the File Downloads log from View Order Details
1283
  * Tweak: Added a "was_completed" meta flag for payment records
1284
  * Tweak: Reversed some of the checkbox anti-patterns
1285
+ * Tweak: Added support showing all Download products in the [downloads] shortcode
1286
  * Tweak: Log the reason a payment is marked as failed from PayPal
1287
  * Tweak: Added a columns variable to the edd_download_class filter
1288
  * Tweak: Added tax settings to the System Info
1362
 
1363
  * Tweak: Added $payment_id to the edd_email_receipt_download_title filter
1364
  * Tweak: Added a break after the country select field on checkout
1365
+ * Tweak: Removed direct call to wp_enqueue_script( 'jquery' ) since it is loaded as a dependency
1366
  * Tweak: Improved the Dashboard summary widget layout
1367
  * Tweak: Improve column width of the Downloads table
1368
  * Tweak: Updated language files
1569
  * Fix: Selecting the same month for start and end in Report date filters resulted in a 12 month spread
1570
  * Fix: A bug that caused the Yesterday report view to show 0 earnings and sales when the current month is January
1571
 
1572
+ * Tweak: Better support for responsive columns in the [downloads] shortcode
1573
  * Tweak: Improved the sample product import file
1574
  * Tweak: Better setup EDD_Roles during initial installation
1575
  * Tweak: Improved the checkout_cart.php template file
1626
  * Fix: fatal error in payment history column
1627
  * Fix: payment method icons not respecting WP in its own directory
1628
  * Fix: invalid UTF8 sequence in heartbeat API response
1629
+ * Fix: illegal offset with user address in profile editor shortcode
1630
  * Fix: empty paragraph tag after tax rates in tax settings
1631
  * Fix: undefined notices when saving Extensions tab with only one checkbox
1632
  * Fix: double subtotal when two cart widgets are displayed on the same page
1731
  * Tweak: added hex values to edd_get_button_colors()
1732
  * Tweak: added form_id attribute to [edd_purchase_link]
1733
  * Tweak: dramatically improved the EDD settings API
1734
+ * Tweak: added a column class to the [downloads] shortcode
1735
  * Tweak: added SPAN tags around checkoug LEGEND tags
1736
  * Tweak: automatically update file price conditions when new price options are added
1737
  * Tweak: fire edd_create_protection_files() on install process to ensure .htaccess file is created in uploads/edd directory
1771
  * New: Added options to configure the admin purchase notification email
1772
  * New: Added search to customer reports
1773
  * New: Added item quantity support on checkout
1774
+ * New: Brought back the [downloads_history] shortcode
1775
  * New: Added the ability to use multiple discounts per-purchase
1776
  * New: Added filter to disable schema.org microdata
1777
  * New: Better payment method icons, including full retina support
1816
  * Fix: Incorrect usage of edd_log_test_payment_stats filter
1817
  * Fix: Check for existence of country code in zip/postal code regex
1818
  * Fix: Variable pricing didn't follow currency position
1819
+ * Fix: Invalid foreach error with [downloads_discounts] shortcode
1820
+ * Fix: [purchase_collection] shortcode broken
1821
  * Fix: Customers not always receiving purchase receipt
1822
 
1823
 
1908
  * Fix: Insert Download icon screwed up
1909
  * Fix: Estimated stats incorrect
1910
  * Fix: "upload" field type in settings doesn't use WP 3.5 uploader
1911
+ * Fix: Sample import data uses wrong shortcode
1912
  * Fix: Max product limit in PayPal Standard
1913
  * Fix: Incorrect parameter in shortcode-content-cart-button.php
1914
  * Fix: System Info: Page On Front and Page for Posts have same value
1918
  * Fix: WP Super Cache 1.3.1 compatibility
1919
  * Fix: Incorrect URL to iPhone image in Payment History
1920
  * Fix: Editing Downloads in payment doesn't work fully
1921
+ * Fix: Purchase History page used wrong shortcode
1922
  * Fix: Error bulk-deleting payments with some languages
1923
  * Fix: Prices not showing on purchase button
1924
  * Fix: Incorect path and URL constants when wp-content/plugins is symlinked
1955
  * New: Added ability to export file download history by date
1956
  * New: Added category filtering to Downloads > Reports > Downloads
1957
  * New: Added option to disable admin sales notices
1958
+ * Tweaked: Better options to disable the price in the [purchase_link] shortcode
1959
  * Tweaked: Improved the checkout error fields
1960
  * Fix: Issue with purchase receipt CSS
1961
  * Fix: SQL error with comments_clauses
2047
  * New: Added new EDD_Export class to more flexible export system
2048
  * New: Pages are auto created and saved to the EDD options on activation
2049
  * New: Added excerpt support to download post type
2050
+ * New: Added new filter for [downloads] shortcode HTML
2051
  * New: Added dashboard alert to payment history when in Test Mode
2052
  * New: Added dashboard alert if the checkout page is deleted
2053
  * New: Show price range for variable priced products in Downloads list
2147
  * Tweak: Changelogs cleaned up (props @chriscct7)
2148
  * Tweak: Spaces in Download File Names May Cause 404
2149
  * Tweak: Remove Bullets from Default Email Template
2150
+ * Tweak: Paginate Payment / Download History Shortcodes
2151
  * Tweak: Convert Discount Admin Page to WP List Table
2152
  * Tweak: Moved the new edit profile form into templates folder
2153
  * Tweak: Removed cache_results query arg from sales widget
2259
 
2260
  * New: Option for defining the emails that receive admin sale notifications
2261
  * New: edd_item_in_cart filter
2262
+ * New: Added prices to the [purchase_link] shortcode so that the product price is shown on the button
2263
  * New: Added payment history search
2264
+ * New: Added exclude_category and exclude_tags parameters to the [downloads] shortcode
2265
  * New: Added date parameters to edd_get_payments() to allow payments of specific dates to be queried
2266
  * Fix: A problem with $0 purchases
2267
  * Fix: Problem with display the buyer's first name in purchase receipts
2268
+ * Fix: Problem with category/tag query parameters in the [downloads] shortcode
2269
  * Fix: Problem with PayPal purchases when item names have HTML entities
2270
  * Fix: Problem with prices over 1,000 on checkout
2271
  * Fix: Path to custom edd.css
2295
  * Fix: Problem with a stray file upload button in IE and Firefox
2296
  * Fix: Problem with improperly formatted amounts after applying a flat rate discount
2297
  * Fix: two conflicting filter names
2298
+ * Fix: A pagination bug with the [downloads] shortcode
2299
  * Tweak: Improved the error logging system
2300
  * Tweak: Improved the Payment History export to CSV option
2301
  * Tweak: Removed old, out of date PayPal payment gateway
2302
+ * Tweak: Improved markup for the [edd_price] shortcode
2303
  * Tweak: Updated Dutch translation files
2304
  * Tweak: Improved front-end CSS for variable price options
2305
  * Tweak: Improved logic for determing the lower price on variable priced downloads
2307
 
2308
  = 1.3.2.1: November 06, 2012 =
2309
 
2310
+ * New: Added basic pagination to the [downloads] shortcode
2311
  * New: Added new "edd_checkout_form_bottom" hook
2312
  * New: Added version numbers to scripts and styles to ensure proper display on upgrades
2313
  * New: Improved the checkout template to make it easier to customize
2336
  * New: Integrated Opt-In PressTrends tracking
2337
  * New: Added new edd_price_field action to the download meta box
2338
  * New: Added Lifetime Best Selling into the Dashboard Sales widget
2339
+ * Fix: Problem with the [download_discounts] shortcode
2340
  * Fix: Problem with the file download limit feature
2341
  * Fix: Problem with amount formatting in the purchase receipts
2342
  * Fix: Problem with the Apply Discount link when not logged-in
2445
  * New: Added new filter to the EDD languages directory
2446
  * New: Added new CSS for improved styling of checkout error messages
2447
  * New: Added new filter to edd_get_checkout_uri
2448
+ * New: Added huge new templating system to [download_history] and [purchase_history] shortcodes
2449
+ * New: Added huge new templating system for [downloads] shortcode
2450
  * New: Created new global checkout fields and validation methods for use by payment gateways
2451
  * New: Added new "Purchase History" widget
2452
  * New: Added new classes/div to the purchase history widget
2461
  * New: Added a new meta key for payment total so that payments can be sorted by amount
2462
  * New: Added a new option to export all customer emails from Payment History
2463
  * New: Added new edd_download_post_type_args filter
2464
+ * Fix: Problem with the auto-generated shortcode on the All Downloads page
2465
  * Fix: Problem with new downloads not being able to add download files
2466
  * Fix: Incorrect variable name in register-settings.php
2467
  * Fix: Problem with checkout ajax when permalinks are not enabled
2515
  * New: Added new actions to top and bottom of payment history page
2516
  * New: Added class names to all table rows and cells in the checkout template
2517
  * Fix: Misnamed class on the empty cart element
2518
+ * Fix: Bug with button colors when inserting a shortcode
2519
  * Fix: Spelling error in Downloads > Settings > Payment Gateways
2520
  * Fix: Major bug with discount codes that caused the "uses" value to get erased when updated a code
2521
  * Fix: Bug with download sales/earnings stats and variable priced downloads
2559
 
2560
  = 1.1.4.1: August 07, 2012 =
2561
 
2562
+ * New: Added "order" and "orderby" parameters to the [downloads] shortcode
2563
  * New: Added support for .mobi files
2564
  * New: Add a "No Download Found" message to the PDF reports for when there are no products
2565
  * Fix: Bug with the source file download processing
2573
 
2574
  * New: Added Quick Edit ability to the Download Price option
2575
  * New: Added a new PDF Report generation feature for Sales and Earnings, thanks to SunnyRatilal
2576
+ * New: Added a new [edd_price] shortcode
2577
  * New: Added new edd_cart_contents filter
2578
+ * New: Added a check to existing jQuery libraries before enqueuing
2579
  * New: Added is_array() check to the price options name function to fix a potential error
2580
  * New: Added an php_ini check for safe mode
2581
  * Fix: Bug with the purchase receipt templates
2620
 
2621
  * New: Added new payment export system, thanks to MadeByMike
2622
  * New: Added a legend to the user info fieldset
2623
+ * New: Added a new "class" parameter to the [purchas_link} shortcode
2624
  * New: Added new edd_is_checkout() conditional function
2625
  * Fix: Bug with the ajax function that adds items to the cart - it did not show the price option name until page was refreshed
2626
  * Fix: Bug in the purchase receipt that caused it to include all source file links, not just the ones set to the price option purchase
2669
  * Fix: Bug with the EDD_READ_FILE_MODE constant
2670
  * Fix: Bug with the file upload meta box fields
2671
  * Tweak: Updated the "View Purchase Details" modal to include the price option purchased, if any
2672
+ * Tweak: Updated the purchase/download history shortcodes to only show files for the price options the user has purchased
2673
  * Tweak: Made improvements to the checkout registration form layout
2674
+ * Tweak: Updated the [purchase_link] shortcode in the Download Configuration meta box to reflect the chosen button color
2675
+ * Tweak: Updated the "Shortcode" column in the list table to include the correct button color option
2676
  * Tweak: Improved some file / function organization
2677
 
2678
  = 1.0.8.5: June 28, 2012 =
2681
  * Fix: Bug with the page options in settings
2682
  * Fix: Bug with the function that checks if a user has purchased a specific download
2683
  * Fix: Potential bug with the "settings updated" notice that could have caused duplicate messages to be shown
2684
+ * Fix: Bug with the [downloads] shortcode
2685
  * Tweak: Enhanced the function for checking if a user has purchased a download to add support for checking for specific price options
2686
  * Tweak: Removed the menu_position attribute from the "download" post type to help prevent menu conflicts
2687
  * Tweak: Updated the edd_read_file() function to convert local URLs to absolute file paths
2690
 
2691
  * New: Added a few new action hooks
2692
  * New: Added "Settings Updated" notification when saving plugin settings
2693
+ * New: Add a parameter to the [downloads] shortcode for showing the complete content
2694
+ * New: Added options for linking the download titles in the [downloads] shortcode
2695
+ * New: Added a "price" parameter to the [downloads] shortcode
2696
  * Fix: Bug with free downloads
2697
  * Fix: Bug with download sale/earning stats going negative when reversing purchases
2698
  * Tweak: Improved the CSS on the variable price option forms
2701
  * Tweak: Renamed the "Manual Payment" gateway to "Test"
2702
  * Tweak: Updated Spanish language files
2703
  * Tweak: Removed some blank form action attributes that caused the HTML to invalidate
2704
+ * Tweak: Removed the "You have already purchased this" message from the purchase link shortcode / template
2705
 
2706
  = 1.0.8.3: June 15, 2012 =
2707
 
2710
  * New: Added auto creation for .htaccess files in the uploads directory for EDD to help protect unauthorized file downloads
2711
  * New: Added Turkish language files
2712
  * New: Added detection for php.ini variables important to PayPal payment verification
2713
+ * New: Added a new shortcode for showing a list of active discounts:** [download_discounts]
2714
  * New: Added pagination to the download/sale log on download Edit screens
2715
  * New: Added new "edd_default_downloads_name" filter for changing the default singular and plural "download" labels used globally throughout the plugin
2716
+ * New: Adding new span.edd-cart-item-separator to the cart widget and shortcode
2717
+ * New: Added more support for the [downloads] shortcode, used to display a list or grid of digital products
2718
  * New: Added option to send purchase receipt when manually marked a payment as complete
2719
  * New: Added new "edd_success_page_redirect" filter to the function that redirects a buyer to the success page
2720
  * New: Added "Payment Method" to the "View Order Details" popup
2783
  * New: Added a wrapper div.edd-cart-ajax-alert around the message that shows when an item has been added to the cart
2784
  * Fix: Bug with the discount code form on checkout. It now only shows if there is at least one active discount. Props to Sksmatt
2785
  * Fix: Bug with the Media Uploader when adding media to the content of a Download. Props to Sksmatt
2786
+ * Fix: Small error notice present in the checkout form shortcode. Props to Sksmatt
2787
  * Fix: Small bug wit the edd_remove_item_url() present when on a 404 error page. Props to Sksmatt
2788
  * Tweak: Updated the edd_purchase_link() function to automatically detect chosen link styles and colors
2789
 
2792
  * New: edd_has_variable_prices() function
2793
  * New: Added missing "required" classes to the checkout login form
2794
  * New: Added the ability to update the email address associated with payments
2795
+ * New: Added a new [edd_login] shortcode for showing a basic login form
2796
  * New: Added new Dutch language translation files
2797
  * New: Added an $id parameter to the edd_cart_item filter
2798
  * Tweak: Updated French language files
templates/edd.css CHANGED
@@ -407,16 +407,16 @@
407
  display: none;
408
  }
409
  #edd_checkout_form_wrap span.card-type.visa {
410
- background: url(images/icons/visa.gif ) no-repeat;
411
  }
412
  #edd_checkout_form_wrap span.card-type.mastercard {
413
- background: url(images/icons/mastercard.gif ) no-repeat;
414
  }
415
  #edd_checkout_form_wrap span.card-type.discover {
416
- background: url(images/icons/discover.gif ) no-repeat;
417
  }
418
  #edd_checkout_form_wrap span.card-type.amex {
419
- background: url(images/icons/americanexpress.gif ) no-repeat;
420
  }
421
  #edd_checkout_form_wrap #edd-discount-loader,
422
  #edd_checkeout_form_wrap .edd-cart-ajax {
407
  display: none;
408
  }
409
  #edd_checkout_form_wrap span.card-type.visa {
410
+ background: url(images/icons/visa.png ) no-repeat;
411
  }
412
  #edd_checkout_form_wrap span.card-type.mastercard {
413
+ background: url(images/icons/mastercard.png ) no-repeat;
414
  }
415
  #edd_checkout_form_wrap span.card-type.discover {
416
+ background: url(images/icons/discover.png ) no-repeat;
417
  }
418
  #edd_checkout_form_wrap span.card-type.amex {
419
+ background: url(images/icons/americanexpress.png ) no-repeat;
420
  }
421
  #edd_checkout_form_wrap #edd-discount-loader,
422
  #edd_checkeout_form_wrap .edd-cart-ajax {
templates/images/icons/amazon.png ADDED
Binary file
templates/images/icons/americanexpress.png ADDED
Binary file
templates/images/icons/discover.png ADDED
Binary file
templates/images/icons/iphone.png CHANGED
Binary file
templates/images/icons/mastercard.png ADDED
Binary file
templates/images/icons/paypal.png ADDED
Binary file
templates/images/icons/visa.png ADDED
Binary file