Version Description
Download this release
Release Info
Developer | mordauk |
Plugin | Easy Digital Downloads |
Version | 2.3.9 |
Comparing to | |
See all releases |
Code changes from version 2.3.8 to 2.3.9
- assets/css/edd-admin.css +7 -0
- assets/css/edd-admin.min.css +1 -1
- assets/js/admin-scripts.js +13 -4
- assets/js/admin-scripts.min.js +1 -1
- easy-digital-downloads.php +5 -5
- includes/admin/class-edd-notices.php +1 -1
- includes/admin/customers/customer-actions.php +1 -1
- includes/admin/customers/customers.php +1 -1
- includes/admin/settings/register-settings.php +10 -10
- includes/admin/upgrades/upgrade-functions.php +2 -2
- includes/ajax-functions.php +8 -4
- includes/cart/functions.php +2 -1
- includes/class-edd-api.php +51 -68
- includes/download-functions.php +1 -1
- includes/install.php +1 -1
- includes/payments/functions.php +1 -0
- includes/plugin-compatibility.php +2 -2
- includes/shortcodes.php +11 -5
- languages/edd-af.mo +0 -0
- languages/edd-an.mo +0 -0
- languages/edd-ar.mo +0 -0
- languages/edd-az.mo +0 -0
- languages/edd-be.mo +0 -0
- languages/edd-bg.mo +0 -0
- languages/edd-bg_BG.mo +0 -0
- languages/edd-bn_BD.mo +0 -0
- languages/edd-bs_BA.mo +0 -0
- languages/edd-ca.mo +0 -0
- languages/edd-co.mo +0 -0
- languages/edd-cs_CZ.mo +0 -0
- languages/edd-cy.mo +0 -0
- languages/edd-da_DK.mo +0 -0
- languages/edd-de_CH.mo +0 -0
- languages/edd-de_DE.mo +0 -0
- languages/edd-el.mo +0 -0
- languages/edd-en_AU.mo +0 -0
- languages/edd-en_CA.mo +0 -0
- languages/edd-en_GB.mo +0 -0
- languages/edd-eo.mo +0 -0
- languages/edd-es_AR.mo +0 -0
- languages/edd-es_CL.mo +0 -0
- languages/edd-es_ES.mo +0 -0
- languages/edd-es_MX.mo +0 -0
- languages/edd-es_PE.mo +0 -0
- languages/edd-es_VE.mo +0 -0
- languages/edd-et.mo +0 -0
- languages/edd-eu.mo +0 -0
- languages/edd-fa_IR.mo +0 -0
- languages/edd-fi.mo +0 -0
- languages/edd-fo.mo +0 -0
- languages/edd-fr_FR.mo +0 -0
- languages/edd-fy.mo +0 -0
- languages/edd-ga.mo +0 -0
- languages/edd-gd.mo +0 -0
- languages/edd-gl_ES.mo +0 -0
- languages/edd-he_IL.mo +0 -0
- languages/edd-hi_IN.mo +0 -0
- languages/edd-hr.mo +0 -0
- languages/edd-hu_HU.mo +0 -0
- languages/edd-id_ID.mo +0 -0
- languages/edd-is_IS.mo +0 -0
- languages/edd-it_IT.mo +0 -0
- languages/edd-ja.mo +0 -0
- languages/edd-jv.mo +0 -0
- languages/edd-ka.mo +0 -0
- languages/edd-ka_GE.mo +0 -0
- languages/edd-kk.mo +0 -0
- languages/edd-km.mo +0 -0
- languages/edd-kn.mo +0 -0
- languages/edd-ko_KR.mo +0 -0
- languages/edd-ky.mo +0 -0
- languages/edd-lo.mo +0 -0
- languages/edd-lt_LT.mo +0 -0
- languages/edd-lv.mo +0 -0
- languages/edd-mg.mo +0 -0
- languages/edd-mk_MK.mo +0 -0
- languages/edd-mn.mo +0 -0
- languages/edd-ms_MY.mo +0 -0
- languages/edd-my_MM.mo +0 -0
- languages/edd-nb_NO.mo +0 -0
- languages/edd-ne_NP.mo +0 -0
- languages/edd-nl_NL.mo +0 -0
- languages/edd-nn_NO.mo +0 -0
- languages/edd-oc.mo +0 -0
- languages/edd-os.mo +0 -0
- languages/edd-pl_PL.mo +0 -0
- languages/edd-ps.mo +0 -0
- languages/edd-pt_BR.mo +0 -0
- languages/edd-pt_PT.mo +0 -0
- languages/edd-ro_RO.mo +0 -0
- languages/edd-ru_RU.mo +0 -0
- languages/edd-sah.mo +0 -0
- languages/edd-si_LK.mo +0 -0
- languages/edd-sk_SK.mo +0 -0
- languages/edd-sl_SI.mo +0 -0
- languages/edd-so.mo +0 -0
- languages/edd-sq.mo +0 -0
- languages/edd-sr_RS.mo +0 -0
- languages/edd-su.mo +0 -0
- languages/edd-sv_SE.mo +0 -0
- languages/edd-sw.mo +0 -0
- languages/edd-ta_IN.mo +0 -0
- languages/edd-ta_LK.mo +0 -0
- languages/edd-te.mo +0 -0
- languages/edd-tg.mo +0 -0
- languages/edd-th.mo +0 -0
- languages/edd-tl.mo +0 -0
- languages/edd-tr_TR.mo +0 -0
- languages/edd-ug.mo +0 -0
- languages/edd-uk.mo +0 -0
- languages/edd-ur.mo +0 -0
- languages/edd-uz.mo +0 -0
- languages/edd-vi.mo +0 -0
- languages/edd-zh_CN.mo +0 -0
- languages/edd-zh_TW.mo +0 -0
- languages/edd.pot +13 -18
- readme.txt +28 -14
- uninstall.php +5 -4
assets/css/edd-admin.css
CHANGED
@@ -13,6 +13,13 @@
|
|
13 |
a.edd-delete { color: #a00; }
|
14 |
a.edd-delete:hover { color: #f00; }
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
/* =Add Ons Styles
|
17 |
-------------------------------------------------------------- */
|
18 |
.edd-tab-span { float: right; bottom: 15px; position: relative; }
|
13 |
a.edd-delete { color: #a00; }
|
14 |
a.edd-delete:hover { color: #f00; }
|
15 |
|
16 |
+
|
17 |
+
/* General Settings Styles
|
18 |
+
-------------------------------------------------------------- */
|
19 |
+
.download_page_edd-settings .form-table label { font-size: 13px; color: #aaa; font-style:italic; cursor:default; margin:5px 0; }
|
20 |
+
.download_page_edd-settings .form-table select + label, .download_page_edd-settings .form-table input.regular-text + label, .download_page_edd-settings .form-table input.small-text + label { display:block; }
|
21 |
+
.download_page_edd-settings .field-section-title { font-style: italic; color: #aaa;}
|
22 |
+
|
23 |
/* =Add Ons Styles
|
24 |
-------------------------------------------------------------- */
|
25 |
.edd-tab-span { float: right; bottom: 15px; position: relative; }
|
assets/css/edd-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.edd-hidden{display:none}.edd-clearfix:after{display:block;visibility:hidden;content:".";text-indent:-9999px;height:0}.edd-wrap a{text-decoration:none}a.edd-delete{color:#a00}a.edd-delete:hover{color:red}.edd-tab-span{float:right;bottom:15px;position:relative}.edd-add-ons-footer{padding-top:10px}#edd-add-ons h2{margin:0 0 15px}#edd-add-ons h2 .button-primary{position:absolute}#edd-add-ons .edd-extension{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:320px;padding:14px;height:315px;position:relative}#edd-add-ons .edd-extension h3{margin:0 0 8px;font-size:13px}#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{border-color:#62a9d7;background-color:#85c0e5;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{clear:both;background:#f5f5f5;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;overflow:auto;margin:8px 0;padding:12px;border-width:1px;border-style:solid;border-radius:3px;font-size:13px;line-height:2.1em}#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;vertical-align:middle}.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}.edd_repeatable_row td{vertical-align:middle}#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{position:absolute;top:3px;right:7px;padding:2px 8px;display:block;background:#fff}.edd_upload_field{padding-right:8em}.edd_remove_repeatable{margin:8px 0 0;cursor:pointer;width:10px;height:10px;display:inline-block;text-indent:-9999px;overflow:hidden}.edd_remove_repeatable:active,.edd_remove_repeatable:hover{background-position:-10px 0!important}.edd_draghandle{display:block;width:20px;height:20px;background:url(../images/edd-cross-hair.png);cursor:move;margin:4px 0 0}textarea#edd-payment-note{width:100%;height:4em;margin:0}#edd_product_notes_field{width:98%;margin:0;height:4em}.edd_repeatable_default_wrapper{text-align:center;width:25px}.edd-admin-box .label{font-weight:600}.edd-admin-box-inside{margin:0;padding:3px 12px;clear:both;border-bottom:1px solid #eee}.rtl .edd-admin-box-inside{padding:5px 10px 5px 0}.edd-admin-box-inside .strong{font-weight:600}.edd-payment-fees .fee-label{font-weight:400;color:#666}.edd-admin-box .right{float:right}.rtl .edd-admin-box .right{float:left;margin-left:10px}#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-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-customer-details .actions{float:right}.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;position:relative;vertical-align:bottom;margin-right:5%;line-height:30px}#edd-purchased-files li.actions{text-align:right;min-width:200px}#edd-purchased-files ul li.remove{text-align:right}#edd-purchased-files .row{padding:12px;border-bottom:1px solid #eee}#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-order-recalc-total{float:right}.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{width:70px;display:inline-block}#edd_product_stats hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}.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{margin:0 0 8px 12px;display:block;font-size:12px;font-family:Helvetica,Arial,sans-serif;color:#8f8f8f;font-weight:400;padding-top:10px;border-top:1px solid #ececec}.edd_dashboard_widget .edd_dashboard_widget_subheading{margin:1em 0 0;border-top:1px solid #ececec;padding-top:10px;color:#8f8f8f;font-size:14px}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0}.edd_dashboard_widget .edd_price_label{background:#00769c;padding:2px 4px;border-radius:3px;color:#fff;margin-right:2px;font-size:10px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}td.edd_order_price{text-align:right}@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;margin-right:6px;height:24px;line-height:24px}#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}.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{width:800px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:pre;overflow:auto;display:block}#TB_window #edd-add-download:active,#TB_window #edd-add-download:focus,#TB_window #edd-add-download:hover{color:#fff}.edd-select-chosen{width:300px}.chosen-container-multi .chosen-choices{-webkit-border-radius:3px;border-radius:3px;border-color:#dfdfdf;background-image:none}.chosen-container-multi .chosen-choices input{margin:2px;height:27px!important;border-color:#dfdfdf}.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{-webkit-border-top-left-radius:3px;border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;border-color:#aaa;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.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{padding:10px 10px 4px;margin:0;background:#f0f0f0;border:1px solid #DFDFDF;width:300px;max-height:200px;overflow-y:scroll}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.download_page_edd-tools .apikeys .column-user{width:192px}#customer-tab-wrapper{margin-left:-1px;z-index:1;text-align:center;display:inline-block}#customer-tab-wrapper-list li{background-color:#fff;width:32px;height:32px}#customer-tab-wrapper-list .inactive{background-color:#fff;color:#eee;border-left:1px solid #e5e5e5}#customer-tab-wrapper-list .active{border-width:1px 1px 1px 0;border-style:solid;border-color:#e5e5e5}#customer-tab-wrapper-list :not(:last-child){margin-bottom:3px}#customer-tab-wrapper-list .dashicons{font-size:24px;line-height:32px}#edd-customer-card-wrapper .left{float:left}#edd-customer-card-wrapper .right{float:right}#edd-customer-card-wrapper input{font-weight:400}#edd-customer-card-wrapper{display:inline-block;margin-left:-1px;z-index:2;width:700px;background-color:#FFF;min-height:200px;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)}#edd-customer-card-wrapper .customer-section{border-bottom:1px solid #eee;margin-bottom:10px}#edd-customer-card-wrapper .customer-section table{margin-bottom:20px}#edd-customer-card-wrapper>div{padding:0 20px}#edd-customer-card-wrapper>div:first-child{padding-top:20px}#edd-customer-card-wrapper>div:last-child{padding-bottom:20px;border:none}#edd-customer-card-wrapper .avatar-wrap{padding-right:10px;text-align:center}#edd-customer-card-wrapper .customer-id{font-size:24px;font-weight:600}#edd-customer-card-wrapper .customer-main-wrapper input{width:200px}#edd-customer-card-wrapper .customer-address-wrapper{max-width:33%;margin-right:25px;width:202px}#edd-customer-card-wrapper .customer-address-wrapper select{width:200px}#edd-customer-card-wrapper .customer-info{margin-top:5px;min-height:185px;margin-bottom:10px}#edd-customer-card-wrapper .info-wrapper{min-height:125px}#edd-customer-card-wrapper a.delete{text-decoration:none;color:red;margin-right:5px}.customer-info .customer-name{font-size:24px;font-weight:600}.customer-edit-link a,.disconnect-user a{font-size:12px;font-weight:400;text-decoration:none}#customer-edit-actions{text-align:center;margin-bottom:20px;line-height:28px}#customer-edit-actions .button-secondary{margin-right:10px}#edd-customer-card-wrapper .info-item{line-height:16px;display:block;padding-bottom:5px}#edd-customer-card-wrapper .edit-item{display:none}#edd-customer-card-wrapper .edd_user_search_results{left:1px;top:16px}#edd-customer-card-wrapper .edd_user_search_results ul{width:200px}#customer-stats-wrapper{margin:0 auto;text-align:center;min-height:30px}#customer-stats-wrapper li{width:50%;float:left;line-height:22px;font-size:14px}#customer-stats-wrapper a{text-decoration:none}#customer-stats-wrapper .dashicons{color:#888}#customer-tables-wrapper table{width:100%;text-align:center}#customer-tables-wrapper th{text-align:center}#customer-tables-wrapper .downloads tr>td:first-child,#customer-tables-wrapper .downloads tr>th:first-child{text-align:left}#customer-tables-wrapper .downloads tr>td:only-child{text-align:center}#customer-notes-wrapper{min-height:50px}.customer-notes-header img,.customer-notes-header span{font-weight:600;line-height:30px;vertical-align:middle}.customer-note-input{width:100%;margin-bottom:5px}#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}.delete-customer{text-align:center}
|
1 |
+
.edd-hidden{display:none}.edd-clearfix:after{display:block;visibility:hidden;content:".";text-indent:-9999px;height:0}.edd-wrap a{text-decoration:none}a.edd-delete{color:#a00}a.edd-delete:hover{color:red}.download_page_edd-settings .form-table label{font-size:13px;color:#aaa;font-style:italic;cursor:default;margin:5px 0}.download_page_edd-settings .form-table input.regular-text+label,.download_page_edd-settings .form-table input.small-text+label,.download_page_edd-settings .form-table select+label{display:block}.download_page_edd-settings .field-section-title{font-style:italic;color:#aaa}.edd-tab-span{float:right;bottom:15px;position:relative}.edd-add-ons-footer{padding-top:10px}#edd-add-ons h2{margin:0 0 15px}#edd-add-ons h2 .button-primary{position:absolute}#edd-add-ons .edd-extension{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:320px;padding:14px;height:315px;position:relative}#edd-add-ons .edd-extension h3{margin:0 0 8px;font-size:13px}#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{border-color:#62a9d7;background-color:#85c0e5;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{clear:both;background:#f5f5f5;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;overflow:auto;margin:8px 0;padding:12px;border-width:1px;border-style:solid;border-radius:3px;font-size:13px;line-height:2.1em}#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;vertical-align:middle}.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}.edd_repeatable_row td{vertical-align:middle}#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{position:absolute;top:3px;right:7px;padding:2px 8px;display:block;background:#fff}.edd_upload_field{padding-right:8em}.edd_remove_repeatable{margin:8px 0 0;cursor:pointer;width:10px;height:10px;display:inline-block;text-indent:-9999px;overflow:hidden}.edd_remove_repeatable:active,.edd_remove_repeatable:hover{background-position:-10px 0!important}.edd_draghandle{display:block;width:20px;height:20px;background:url(../images/edd-cross-hair.png);cursor:move;margin:4px 0 0}textarea#edd-payment-note{width:100%;height:4em;margin:0}#edd_product_notes_field{width:98%;margin:0;height:4em}.edd_repeatable_default_wrapper{text-align:center;width:25px}.edd-admin-box .label{font-weight:600}.edd-admin-box-inside{margin:0;padding:3px 12px;clear:both;border-bottom:1px solid #eee}.rtl .edd-admin-box-inside{padding:5px 10px 5px 0}.edd-admin-box-inside .strong{font-weight:600}.edd-payment-fees .fee-label{font-weight:400;color:#666}.edd-admin-box .right{float:right}.rtl .edd-admin-box .right{float:left;margin-left:10px}#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-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-customer-details .actions{float:right}.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;position:relative;vertical-align:bottom;margin-right:5%;line-height:30px}#edd-purchased-files li.actions{text-align:right;min-width:200px}#edd-purchased-files ul li.remove{text-align:right}#edd-purchased-files .row{padding:12px;border-bottom:1px solid #eee}#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-order-recalc-total{float:right}.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{width:70px;display:inline-block}#edd_product_stats hr{border-style:solid;border-width:1px;border-color:#ccc #fff #fff #ccc}.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{margin:0 0 8px 12px;display:block;font-size:12px;font-family:Helvetica,Arial,sans-serif;color:#8f8f8f;font-weight:400;padding-top:10px;border-top:1px solid #ececec}.edd_dashboard_widget .edd_dashboard_widget_subheading{margin:1em 0 0;border-top:1px solid #ececec;padding-top:10px;color:#8f8f8f;font-size:14px}.edd_dashboard_widget .edd_dashboard_widget_subheading+.table{margin:8px 0 0}.edd_dashboard_widget .edd_price_label{background:#00769c;padding:2px 4px;border-radius:3px;color:#fff;margin-right:2px;font-size:10px}.edd_dashboard_widget table{width:100%;margin-left:0;margin-bottom:1em}td.edd_order_label{width:80%}td.edd_order_price{text-align:right}@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;margin-right:6px;height:24px;line-height:24px}#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}.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{width:800px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:pre;overflow:auto;display:block}#TB_window #edd-add-download:active,#TB_window #edd-add-download:focus,#TB_window #edd-add-download:hover{color:#fff}.edd-select-chosen{width:300px}.chosen-container-multi .chosen-choices{-webkit-border-radius:3px;border-radius:3px;border-color:#dfdfdf;background-image:none}.chosen-container-multi .chosen-choices input{margin:2px;height:27px!important;border-color:#dfdfdf}.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{-webkit-border-top-left-radius:3px;border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-left-radius:0;border-color:#aaa;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.1);box-shadow:1px 1px 2px rgba(0,0,0,.1)}.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{padding:10px 10px 4px;margin:0;background:#f0f0f0;border:1px solid #DFDFDF;width:300px;max-height:200px;overflow-y:scroll}.edd-graph .y1Axis{color:#edc240!important}.edd-graph .y2Axis{color:#afd8f8!important}.download_page_edd-tools .apikeys .column-user{width:192px}#customer-tab-wrapper{margin-left:-1px;z-index:1;text-align:center;display:inline-block}#customer-tab-wrapper-list li{background-color:#fff;width:32px;height:32px}#customer-tab-wrapper-list .inactive{background-color:#fff;color:#eee;border-left:1px solid #e5e5e5}#customer-tab-wrapper-list .active{border-width:1px 1px 1px 0;border-style:solid;border-color:#e5e5e5}#customer-tab-wrapper-list :not(:last-child){margin-bottom:3px}#customer-tab-wrapper-list .dashicons{font-size:24px;line-height:32px}#edd-customer-card-wrapper .left{float:left}#edd-customer-card-wrapper .right{float:right}#edd-customer-card-wrapper input{font-weight:400}#edd-customer-card-wrapper{display:inline-block;margin-left:-1px;z-index:2;width:700px;background-color:#FFF;min-height:200px;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)}#edd-customer-card-wrapper .customer-section{border-bottom:1px solid #eee;margin-bottom:10px}#edd-customer-card-wrapper .customer-section table{margin-bottom:20px}#edd-customer-card-wrapper>div{padding:0 20px}#edd-customer-card-wrapper>div:first-child{padding-top:20px}#edd-customer-card-wrapper>div:last-child{padding-bottom:20px;border:none}#edd-customer-card-wrapper .avatar-wrap{padding-right:10px;text-align:center}#edd-customer-card-wrapper .customer-id{font-size:24px;font-weight:600}#edd-customer-card-wrapper .customer-main-wrapper input{width:200px}#edd-customer-card-wrapper .customer-address-wrapper{max-width:33%;margin-right:25px;width:202px}#edd-customer-card-wrapper .customer-address-wrapper select{width:200px}#edd-customer-card-wrapper .customer-info{margin-top:5px;min-height:185px;margin-bottom:10px}#edd-customer-card-wrapper .info-wrapper{min-height:125px}#edd-customer-card-wrapper a.delete{text-decoration:none;color:red;margin-right:5px}.customer-info .customer-name{font-size:24px;font-weight:600}.customer-edit-link a,.disconnect-user a{font-size:12px;font-weight:400;text-decoration:none}#customer-edit-actions{text-align:center;margin-bottom:20px;line-height:28px}#customer-edit-actions .button-secondary{margin-right:10px}#edd-customer-card-wrapper .info-item{line-height:16px;display:block;padding-bottom:5px}#edd-customer-card-wrapper .edit-item{display:none}#edd-customer-card-wrapper .edd_user_search_results{left:1px;top:16px}#edd-customer-card-wrapper .edd_user_search_results ul{width:200px}#customer-stats-wrapper{margin:0 auto;text-align:center;min-height:30px}#customer-stats-wrapper li{width:50%;float:left;line-height:22px;font-size:14px}#customer-stats-wrapper a{text-decoration:none}#customer-stats-wrapper .dashicons{color:#888}#customer-tables-wrapper table{width:100%;text-align:center}#customer-tables-wrapper th{text-align:center}#customer-tables-wrapper .downloads tr>td:first-child,#customer-tables-wrapper .downloads tr>th:first-child{text-align:left}#customer-tables-wrapper .downloads tr>td:only-child{text-align:center}#customer-notes-wrapper{min-height:50px}.customer-notes-header img,.customer-notes-header span{font-weight:600;line-height:30px;vertical-align:middle}.customer-note-input{width:100%;margin-bottom:5px}#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}.delete-customer{text-align:center}
|
assets/js/admin-scripts.js
CHANGED
@@ -34,7 +34,7 @@ jQuery(document).ready(function ($) {
|
|
34 |
|
35 |
clone.removeClass( 'edd_add_blank' );
|
36 |
|
37 |
-
clone.
|
38 |
clone.find( 'td input, td select, textarea' ).val( '' );
|
39 |
clone.find( 'input, select, textarea' ).each(function() {
|
40 |
var name = $( this ).attr( 'name' );
|
@@ -90,8 +90,11 @@ jQuery(document).ready(function ($) {
|
|
90 |
type = $(this).data('type'),
|
91 |
repeatable = 'tr.edd_repeatable_' + type + 's';
|
92 |
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
95 |
|
96 |
if( count > 1 ) {
|
97 |
$( 'input, select', row ).val( '' );
|
@@ -909,12 +912,18 @@ jQuery(document).ready(function ($) {
|
|
909 |
var row = $('#edd_tax_rates tr:last');
|
910 |
var clone = row.clone();
|
911 |
var count = row.parent().find( 'tr' ).length;
|
912 |
-
clone.find( 'td input' ).val( '' );
|
|
|
913 |
clone.find( 'input, select' ).each(function() {
|
914 |
var name = $( this ).attr( 'name' );
|
915 |
name = name.replace( /\[(\d+)\]/, '[' + parseInt( count ) + ']');
|
916 |
$( this ).attr( 'name', name ).attr( 'id', name );
|
917 |
});
|
|
|
|
|
|
|
|
|
|
|
918 |
clone.insertAfter( row );
|
919 |
return false;
|
920 |
});
|
34 |
|
35 |
clone.removeClass( 'edd_add_blank' );
|
36 |
|
37 |
+
clone.attr( 'data-key', key );
|
38 |
clone.find( 'td input, td select, textarea' ).val( '' );
|
39 |
clone.find( 'input, select, textarea' ).each(function() {
|
40 |
var name = $( this ).attr( 'name' );
|
90 |
type = $(this).data('type'),
|
91 |
repeatable = 'tr.edd_repeatable_' + type + 's';
|
92 |
|
93 |
+
if ( type === 'price' ) {
|
94 |
+
var price_row_id = row.data('key');
|
95 |
+
/** remove from price condition */
|
96 |
+
$( '.edd_repeatable_condition_field option[value="' + price_row_id + '"]' ).remove();
|
97 |
+
}
|
98 |
|
99 |
if( count > 1 ) {
|
100 |
$( 'input, select', row ).val( '' );
|
912 |
var row = $('#edd_tax_rates tr:last');
|
913 |
var clone = row.clone();
|
914 |
var count = row.parent().find( 'tr' ).length;
|
915 |
+
clone.find( 'td input' ).not(':input[type=checkbox]').val( '' );
|
916 |
+
clone.find( 'td [type="checkbox"]' ).attr('checked', false);
|
917 |
clone.find( 'input, select' ).each(function() {
|
918 |
var name = $( this ).attr( 'name' );
|
919 |
name = name.replace( /\[(\d+)\]/, '[' + parseInt( count ) + ']');
|
920 |
$( this ).attr( 'name', name ).attr( 'id', name );
|
921 |
});
|
922 |
+
clone.find( 'label' ).each(function() {
|
923 |
+
var name = $( this ).attr( 'for' );
|
924 |
+
name = name.replace( /\[(\d+)\]/, '[' + parseInt( count ) + ']');
|
925 |
+
$( this ).attr( 'for', name );
|
926 |
+
});
|
927 |
clone.insertAfter( row );
|
928 |
return false;
|
929 |
});
|
assets/js/admin-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){var t={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(t){var d=highest=1;return t.parent().find("tr.edd_repeatable_row").each(function(){var t=e(this).data("key");parseInt(t)>highest&&(highest=t)}),d=highest+=1,clone=t.clone(),clone.find("select").each(function(){e(this).val(t.find('select[name="'+e(this).attr("name")+'"]').val())}),clone.removeClass("edd_add_blank"),clone.data("key",d),clone.find("td input, td select, textarea").val(""),clone.find("input, select, textarea").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),e(this).attr("name",t).attr("id",t)}),clone.find("span.edd_price_id").each(function(){e(this).text(parseInt(d))}),clone.find(".edd_repeatable_default_input").each(function(){e(this).val(parseInt(d)).removeAttr("checked")}),clone},add:function(){e("body").on("click",".submit .edd_add_repeatable",function(d){d.preventDefault();var n=e(this),a=n.parent().parent().prev("tr"),o=t.clone_repeatable(a);o.insertAfter(a).find("input, textarea, select").filter(":visible").eq(0).focus()})},move:function(){e(".edd_repeatable_table tbody").sortable({handle:".edd_draghandle",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var t=0;e(this).find("tr").each(function(){e(this).find("input.edd_repeatable_index").each(function(){e(this).val(t)}),t++})}})},remove:function(){e("body").on("click",".edd_remove_repeatable",function(t){t.preventDefault();var d=e(this).parent().parent("tr"),n=d.parent().find("tr").length-1,a=e(this).data("type"),o="tr.edd_repeatable_"+a+"s";if(e(".edd_repeatable_condition_field option[value="+d.index()+"]").remove(),n>1)e("input, select",d).val(""),d.fadeOut("fast").remove();else switch(a){case"price":alert(edd_vars.one_price_min);break;case"file":e("input, select",d).val("");break;default:alert(edd_vars.one_field_min)}e(o).each(function(t){e(this).find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+t+"]"),e(this).attr("name",d).attr("id",d)})})})},type:function(){e("body").on("change","#_edd_product_type",function(){"bundle"===e(this).val()?(e("#edd_products").show(),e("#edd_download_files").hide(),e("#edd_download_limit_wrap").hide()):(e("#edd_products").hide(),e("#edd_download_files").show(),e("#edd_download_limit_wrap").show())})},prices:function(){e("body").on("change","#edd_variable_pricing",function(){e(".edd_pricing_fields,.edd_repeatable_table .pricing").toggle()})},files:function(){if("undefined"==typeof wp||"1"!==edd_vars.new_media_ui)e(".edd_upload_file_button").length>0&&(window.formfield="",e("body").on("click",".edd_upload_file_button",function(t){if(t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),null!=edd_vars.post_id)var d="post_id="+edd_vars.post_id+"&";tb_show(edd_vars.add_new_download,"media-upload.php?"+d+"TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var d;window.formfield="",e("body").on("click",".edd_upload_file_button",function(n){n.preventDefault();var a=e(this);return window.formfield=e(this).closest(".edd_repeatable_upload_wrapper"),d?void d.open():(d=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:a.data("uploader-title"),button:{text:a.data("uploader-button-text")},multiple:"0"==e(this).data("multiple")?!1:!0}),d.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),d.on("insert",function(){var e=d.state().get("selection");e.each(function(e,d){if(e=e.toJSON(),0===d)window.formfield.find(".edd_repeatable_attachment_id_field").val(e.id),window.formfield.find(".edd_repeatable_upload_field").val(e.url),window.formfield.find(".edd_repeatable_name_field").val(e.title);else{var n=window.formfield,a=t.clone_repeatable(n);a.find(".edd_repeatable_attachment_id_field").val(e.id),a.find(".edd_repeatable_upload_field").val(e.url),a.find(".edd_repeatable_name_field").val(e.title.length>0?e.title:e.filename),a.insertAfter(n)}})}),void d.open())});var d;window.formfield=""}},updatePrices:function(){e("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var t=e(this).parents("tr").data("key"),d=e(this).val(),n=e(".edd_repeatable_condition_field option[value="+t+"]");n.length>0?n.text(d):e(".edd_repeatable_condition_field").append(e("<option></option>").attr("value",t).text(d))})}};if(t.init(),e(".edd_datepicker").length>0){var d="mm/dd/yy";e(".edd_datepicker").datepicker({dateFormat:d})}var n={init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.new_customer(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){e('select[name="edd-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"edd-payment-address[0][state]"},e.post(ajaxurl,data,function(t){e("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input").replaceWith("nostates"==t?'<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>':t)}),!1})},remove_download:function(){e("#edd-purchased-files").on("click",".edd-order-remove-download",function(){if(confirm(edd_vars.delete_payment_download)){var t=e(this).data("key"),d=(e(".edd-payment-id").val(),e('input[name="edd-payment-details-downloads['+t+'][id]"]').val()),n=e('input[name="edd-payment-details-downloads['+t+'][price_id]"]').val(),a=e('input[name="edd-payment-details-downloads['+t+'][quantity]"]').val(),o=e('input[name="edd-payment-details-downloads['+t+'][amount]"]').val(),i=e('input[name="edd-payment-removed"]').val();i=e.parseJSON(i),i.length<1&&(i={});var r=[{id:d,price_id:n,quantity:a,amount:o}];i[t]=r,e('input[name="edd-payment-removed"]').val(JSON.stringify(i)),e(this).parent().parent().parent().remove(),e("#edd-payment-downloads-changed").val(1),e(".edd-order-payment-recalc-totals").show()}return!1})},new_customer:function(){e("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(t){t.preventDefault(),e(".customer-info").toggle(),e(".new-customer").toggle(),e("#edd-new-customer").val(e(".new-customer").is(":visible")?1:0)})},add_download:function(){e("#edd-purchased-files").on("click","#edd-order-add-download",function(t){t.preventDefault();var d=e("#edd_order_download_select").val(),n=e("#edd_order_download_select").find(":selected").text(),a=e("#edd-order-download-quantity").val(),o=e("#edd-order-download-amount").val(),i=e(".edd_price_options_select option:selected").val(),r=e(".edd_price_options_select option:selected").text();if(1>d)return!1;if(o||(o=0),o=parseFloat(o),isNaN(o))return alert(edd_vars.numeric_item_price),!1;if("1"===edd_vars.quantities_enabled){if(isNaN(parseInt(a)))return alert(edd_vars.numeric_quantity),!1;o*=a}o=o.toFixed(edd_vars.currency_decimals);var s=o+edd_vars.currency_sign;"before"===edd_vars.currency_pos&&(s=edd_vars.currency_sign+o),r&&(n=n+" - "+r);var c=e("#edd-purchased-files div.row").length,l=e("#edd-purchased-files div.row:last").clone();l.find(".download span").html('<a href="post.php?post='+d+'&action=edit"></a>'),l.find(".download span a").text(n),l.find(".price-text").text(s),l.find(".item-quantity").text(a),l.find(".item-price").text(edd_vars.currency_sign+(o/a).toFixed(edd_vars.currency_decimals)),l.find("input.edd-payment-details-download-id").val(d),l.find("input.edd-payment-details-download-price-id").val(i),l.find("input.edd-payment-details-download-amount").val(o),l.find("input.edd-payment-details-download-quantity").val(a),l.find("input.edd-payment-details-download-has-log").val(0),l.find("input").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(c)+"]"),e(this).attr("name",t).attr("id",t)}),e("#edd-payment-downloads-changed").val(1),e(l).insertAfter("#edd-purchased-files div.row:last"),e(".edd-order-payment-recalc-totals").show()})},recalculate_total:function(){e("#edd-order-recalc-total").on("click",function(t){t.preventDefault();var d=0;e("#edd-purchased-files .row .edd-payment-details-download-amount").length&&e("#edd-purchased-files .row .edd-payment-details-download-amount").each(function(){d+=parseFloat(e(this).val())}),e(".edd-payment-fees").length&&e(".edd-payment-fees span.fee-amount").each(function(){d+=parseFloat(e(this).data("fee"))}),e("input[name=edd-payment-total]").val(d)})},variable_prices_check:function(){e("#edd-purchased-files").on("change","select#edd_order_download_select",function(){var t=e(this),d=t.val();if(parseInt(d)>0){var n={action:"edd_check_for_download_price_variations",download_id:d};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(d){e(".edd_price_options_select").remove(),e(d).insertAfter(t.next())}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}})},add_note:function(){e("#edd-add-payment-note").on("click",function(t){t.preventDefault();var d={action:"edd_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#edd-payment-note").val()};if(d.note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-payment-notes-inner").append(t),e(".edd-no-payment-notes").hide(),e("#edd-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#edd-payment-note").css("border-color");e("#edd-payment-note").css("border-color","red"),setTimeout(function(){e("#edd-payment-note").css("border-color",n)},500)}})},remove_note:function(){e("body").on("click",".edd-delete-payment-note",function(t){if(t.preventDefault(),confirm(edd_vars.delete_payment_note)){var d={action:"edd_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:d,url:ajaxurl,success:function(){return e("#edd-payment-note-"+d.note_id).remove(),e(".edd-payment-note").length||e(".edd-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},resend_receipt:function(){e("body").on("click","#edd-resend-receipt",function(){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){e("body").on("click",".edd-copy-download-link",function(t){t.preventDefault();var d=e(this),n={action:"edd_get_file_download_link",payment_id:e('input[name="edd_payment_id"]').val(),download_id:d.data("download-id"),price_id:d.data("price-id")};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){return e("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+t+"</textarea>"),e("#edd-download-link-textarea").focus().select(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)})})}};n.init();var a={init:function(){this.type_select(),this.product_requirements()},type_select:function(){e("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){e(".edd-amount-description").toggle()})},product_requirements:function(){e("#products").change(function(){e(this).val()?e("#edd-discount-product-conditions").show():e("#edd-discount-product-conditions").hide()})}};a.init();var o={init:function(){this.date_options(),this.customers_export()},date_options:function(){e("#edd-graphs-date-options").change(function(){var t=e(this);"other"===t.val()?e("#edd-date-range-options").show():e("#edd-date-range-options").hide()})},customers_export:function(){e("#edd_customer_export_download").change(function(){var t=e(this),d=e("option:selected",t).val();if("0"===t.val()?e("#edd_customer_export_option").show():e("#edd_customer_export_option").hide(),0!=parseInt(d)){var n={action:"edd_check_for_download_price_variations",download_id:d};e.post(ajaxurl,n,function(d){e(".edd_price_options_select").remove(),t.after(d)})}else e(".edd_price_options_select").remove()})}};o.init();var i={init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){if(e(".edd-color-picker").length&&e(".edd-color-picker").wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui)e(".edd_settings_upload_button").length>0&&(window.formfield="",e("body").on("click",".edd_settings_upload_button",function(t){t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var t;window.formfield="",e("body").on("click",".edd_settings_upload_button",function(d){d.preventDefault();var n=e(this);return window.formfield=e(this).parent().prev(),t?void t.open():(t=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:n.data("uploader_title"),button:{text:n.data("uploader_button_text")},multiple:!1}),t.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),t.on("insert",function(){var e=t.state().get("selection");e.each(function(e){e=e.toJSON(),window.formfield.val(e.url)})}),void t.open())});var t;window.formfield=""}},taxes:function(){e("select.edd-no-states").length&&e("select.edd-no-states").closest("tr").hide(),e('select[name="edd_settings[base_country]"]').change(function(){var t=e(this),d=t.closest("tr");return data={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd_settings[base_state]"},e.post(ajaxurl,data,function(e){"nostates"==e?d.next().hide():(d.next().show(),d.next().find("select").replaceWith(e))}),!1}),e("body").on("change","#edd_tax_rates select.edd-tax-country",function(){var t=e(this);return data={action:"edd_get_shop_states",country:e(this).val(),field_name:t.attr("name").replace("country","state")},e.post(ajaxurl,data,function(e){if("nostates"==e){var d='<input type="text" name="'+data.field_name+'" value=""/>';t.parent().next().find("select").replaceWith(d)}else t.parent().next().find("input,select").show(),t.parent().next().find("input,select").replaceWith(e)}),!1}),e("#edd_add_tax_rate").on("click",function(){var t=e("#edd_tax_rates tr:last"),d=t.clone(),n=t.parent().find("tr").length;return d.find("td input").val(""),d.find("input, select").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("name",t).attr("id",t)}),d.insertAfter(t),!1}),e("body").on("click","#edd_tax_rates .edd_remove_tax_rate",function(){if(confirm(edd_vars.delete_tax_rate)){var t=e("#edd_tax_rates tr:visible").length;2===t?(e("#edd_tax_rates select").val(""),e('#edd_tax_rates input[type="text"]').val(""),e('#edd_tax_rates input[type="number"]').val(""),e('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):e(this).closest("tr").remove()}return!1})},emails:function(){if(e("#email-preview-wrap").length){var t=e("#email-preview");e("#open-email-preview").colorbox({inline:!0,href:t,width:"80%",height:"auto"})}},misc:function(){"direct"!=e('select[name="edd_settings[download_method]"]:selected').val()&&(e('select[name="edd_settings[download_method]"]').parent().parent().next().hide(),e('select[name="edd_settings[download_method]"]').parent().parent().next().find("input").attr("checked",!1)),e('select[name="edd_settings[download_method]"]').on("change",function(){var t=e(this).parent().parent().next();"direct"==e(this).val()?t.hide():(t.show(),t.find("input").attr("checked",!1))})}};i.init(),e(".download_page_edd-payment-history .row-actions .delete a").on("click",function(){return confirm(edd_vars.delete_payment)?!0:!1}),e("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var d=e("#post-"+t),n=d.find(".column-price .downloadprice-"+t).val();n!=e("#post-"+t+".column-price .downloadprice-"+t).val()?e(".regprice","#edd-download-data").val(n).attr("disabled",!1):e(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),e("body").on("click","#bulk_edit",function(){var t=e("#bulk-edit"),d=new Array;t.find("#bulk-titles").children().each(function(){d.push(e(this).attr("id").replace(/^(ttle)/i,""))});var n=e('#edd-download-data input[name="_edd_regprice"]').val(),a={action:"edd_save_bulk_edit",edd_bulk_nonce:d,post_ids:d,price:n};e.post(ajaxurl,a)}),e(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),e(".chosen-choices").on("click",function(){e(this).children("li").children("input").attr("placeholder",edd_vars.type_to_search)});var r,s=342;e(".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input").keyup(function(t){var d=e(this).val(),n=e(this).closest(".edd-select-chosen"),a=n.attr("id").replace("_chosen",""),o=(t.which,"edd_download_search");n.attr("id").indexOf("customer")>=0&&(o="edd_customer_search"),d.length<=3&&"edd_download_search"==o||16==t.which||13==t.which||91==t.which||17==t.which||37==t.which||38==t.which||39==t.which||40==t.which||(clearTimeout(r),r=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:o,s:d,current_id:edd_vars.post_id},dataType:"json",beforeSend:function(){e("ul.chosen-results").empty()},success:function(t){e("#"+a+" option:not(:selected)").remove(),e.each(t,function(t,d){e("#"+a+' option[value="'+d.id+'"]').length||e("#"+a).prepend('<option value="'+d.id+'">'+d.name+"</option>")}),e(".edd-select-chosen").trigger("chosen:updated"),e("#"+a).next().find("input").val(d)}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(){})},s))}),e("#post").on("click",".edd-thickbox",function(){e(".edd-select-chosen","#choose-download").css("width","100%")});var c={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".edd-revoke-api-key",function(){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){e("body").on("click",".edd-regenerate-api-key",function(){return confirm(edd_vars.regenerate_api_key)})}};c.init();var l={init:function(){this.edit_customer(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){e("body").on("click","#edit-customer",function(t){t.preventDefault(),e("#edd-customer-card-wrapper .editable").hide(),e("#edd-customer-card-wrapper .edit-item").fadeIn().css("display","block")})},user_search:function(){e("body").on("click.eddSelectUser",".edd_user_search_results a",function(t){t.preventDefault();var d=e(this).data("userid");e('input[name="customerinfo[user_id]"]').val(d)})},remove_user:function(){e("body").on("click","#disconnect-customer",function(t){t.preventDefault();var d=e('input[name="customerinfo[id]"]').val(),n={edd_action:"disconnect-userid",customer_id:d,_wpnonce:e("#edit-customer-info #_wpnonce").val()};e.post(ajaxurl,n,function(){window.location.href=window.location.href},"json")})},cancel_edit:function(){e("body").on("click","#edd-edit-customer-cancel",function(t){t.preventDefault(),e("#edd-customer-card-wrapper .edit-item").hide(),e("#edd-customer-card-wrapper .editable").show(),e(".edd_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"customerinfo[state]"},e.post(ajaxurl,data,function(t){e(':input[name="customerinfo[state]"]').replaceWith("nostates"==t?'<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>':t)}),!1})},add_note:function(){e("body").on("click","#add-customer-note",function(t){t.preventDefault();var d={edd_action:"add-customer-note",customer_id:e("#customer-id").val(),customer_note:e("#customer-note").val(),add_customer_note_nonce:e("#add_customer_note_nonce").val()};if(d.customer_note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-customer-notes").prepend(t),e(".edd-no-customer-notes").hide(),e("#customer-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#customer-note").css("border-color");e("#customer-note").css("border-color","red"),setTimeout(function(){e("#customer-note").css("border-color",n)},500)}})},delete_checked:function(){e("#edd-customer-delete-confirm").change(function(){var t=e("#edd-customer-delete-records"),d=e("#edd-delete-customer");e(this).prop("checked")?(t.attr("disabled",!1),d.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),d.attr("disabled",!0))})}};l.init(),e(".edd-ajax-user-search").keyup(function(){var t=e(this).val(),d="";e(this).data("exclude")&&(d=e(this).data("exclude")),e(".edd-ajax").show(),data={action:"edd_search_users",user_name:t,exclude:d},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".edd-ajax").hide(),e(".edd_user_search_results").removeClass("hidden"),e(".edd_user_search_results span").html(""),e(t.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),e("body").on("click.eddSelectUser",".edd_user_search_results span a",function(t){t.preventDefault();var d=e(this).data("login");e(".edd-ajax-user-search").val(d),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e("body").on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(t){t.preventDefault(),e(".edd-ajax-user-search").val(""),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(t){e("#edd_dashboard_sales .inside").html(t)}}),e(document).on("keydown",".customer-note-input",function(t){13==t.keyCode&&(t.metaKey||t.ctrlKey)&&e("#add-customer-note").click()})});
|
1 |
+
jQuery(document).ready(function(e){var t={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(t){var d=highest=1;return t.parent().find("tr.edd_repeatable_row").each(function(){var t=e(this).data("key");parseInt(t)>highest&&(highest=t)}),d=highest+=1,clone=t.clone(),clone.find("select").each(function(){e(this).val(t.find('select[name="'+e(this).attr("name")+'"]').val())}),clone.removeClass("edd_add_blank"),clone.attr("data-key",d),clone.find("td input, td select, textarea").val(""),clone.find("input, select, textarea").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),e(this).attr("name",t).attr("id",t)}),clone.find("span.edd_price_id").each(function(){e(this).text(parseInt(d))}),clone.find(".edd_repeatable_default_input").each(function(){e(this).val(parseInt(d)).removeAttr("checked")}),clone},add:function(){e("body").on("click",".submit .edd_add_repeatable",function(d){d.preventDefault();var n=e(this),a=n.parent().parent().prev("tr"),o=t.clone_repeatable(a);o.insertAfter(a).find("input, textarea, select").filter(":visible").eq(0).focus()})},move:function(){e(".edd_repeatable_table tbody").sortable({handle:".edd_draghandle",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var t=0;e(this).find("tr").each(function(){e(this).find("input.edd_repeatable_index").each(function(){e(this).val(t)}),t++})}})},remove:function(){e("body").on("click",".edd_remove_repeatable",function(t){t.preventDefault();var d=e(this).parent().parent("tr"),n=d.parent().find("tr").length-1,a=e(this).data("type"),o="tr.edd_repeatable_"+a+"s";if("price"===a){var i=d.data("key");e('.edd_repeatable_condition_field option[value="'+i+'"]').remove()}if(n>1)e("input, select",d).val(""),d.fadeOut("fast").remove();else switch(a){case"price":alert(edd_vars.one_price_min);break;case"file":e("input, select",d).val("");break;default:alert(edd_vars.one_field_min)}e(o).each(function(t){e(this).find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+t+"]"),e(this).attr("name",d).attr("id",d)})})})},type:function(){e("body").on("change","#_edd_product_type",function(){"bundle"===e(this).val()?(e("#edd_products").show(),e("#edd_download_files").hide(),e("#edd_download_limit_wrap").hide()):(e("#edd_products").hide(),e("#edd_download_files").show(),e("#edd_download_limit_wrap").show())})},prices:function(){e("body").on("change","#edd_variable_pricing",function(){e(".edd_pricing_fields,.edd_repeatable_table .pricing").toggle()})},files:function(){if("undefined"==typeof wp||"1"!==edd_vars.new_media_ui)e(".edd_upload_file_button").length>0&&(window.formfield="",e("body").on("click",".edd_upload_file_button",function(t){if(t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),null!=edd_vars.post_id)var d="post_id="+edd_vars.post_id+"&";tb_show(edd_vars.add_new_download,"media-upload.php?"+d+"TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var d;window.formfield="",e("body").on("click",".edd_upload_file_button",function(n){n.preventDefault();var a=e(this);return window.formfield=e(this).closest(".edd_repeatable_upload_wrapper"),d?void d.open():(d=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:a.data("uploader-title"),button:{text:a.data("uploader-button-text")},multiple:"0"==e(this).data("multiple")?!1:!0}),d.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),d.on("insert",function(){var e=d.state().get("selection");e.each(function(e,d){if(e=e.toJSON(),0===d)window.formfield.find(".edd_repeatable_attachment_id_field").val(e.id),window.formfield.find(".edd_repeatable_upload_field").val(e.url),window.formfield.find(".edd_repeatable_name_field").val(e.title);else{var n=window.formfield,a=t.clone_repeatable(n);a.find(".edd_repeatable_attachment_id_field").val(e.id),a.find(".edd_repeatable_upload_field").val(e.url),a.find(".edd_repeatable_name_field").val(e.title.length>0?e.title:e.filename),a.insertAfter(n)}})}),void d.open())});var d;window.formfield=""}},updatePrices:function(){e("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var t=e(this).parents("tr").data("key"),d=e(this).val(),n=e(".edd_repeatable_condition_field option[value="+t+"]");n.length>0?n.text(d):e(".edd_repeatable_condition_field").append(e("<option></option>").attr("value",t).text(d))})}};if(t.init(),e(".edd_datepicker").length>0){var d="mm/dd/yy";e(".edd_datepicker").datepicker({dateFormat:d})}var n={init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.new_customer(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){e('select[name="edd-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"edd-payment-address[0][state]"},e.post(ajaxurl,data,function(t){e("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input").replaceWith("nostates"==t?'<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>':t)}),!1})},remove_download:function(){e("#edd-purchased-files").on("click",".edd-order-remove-download",function(){if(confirm(edd_vars.delete_payment_download)){var t=e(this).data("key"),d=(e(".edd-payment-id").val(),e('input[name="edd-payment-details-downloads['+t+'][id]"]').val()),n=e('input[name="edd-payment-details-downloads['+t+'][price_id]"]').val(),a=e('input[name="edd-payment-details-downloads['+t+'][quantity]"]').val(),o=e('input[name="edd-payment-details-downloads['+t+'][amount]"]').val(),i=e('input[name="edd-payment-removed"]').val();i=e.parseJSON(i),i.length<1&&(i={});var r=[{id:d,price_id:n,quantity:a,amount:o}];i[t]=r,e('input[name="edd-payment-removed"]').val(JSON.stringify(i)),e(this).parent().parent().parent().remove(),e("#edd-payment-downloads-changed").val(1),e(".edd-order-payment-recalc-totals").show()}return!1})},new_customer:function(){e("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(t){t.preventDefault(),e(".customer-info").toggle(),e(".new-customer").toggle(),e("#edd-new-customer").val(e(".new-customer").is(":visible")?1:0)})},add_download:function(){e("#edd-purchased-files").on("click","#edd-order-add-download",function(t){t.preventDefault();var d=e("#edd_order_download_select").val(),n=e("#edd_order_download_select").find(":selected").text(),a=e("#edd-order-download-quantity").val(),o=e("#edd-order-download-amount").val(),i=e(".edd_price_options_select option:selected").val(),r=e(".edd_price_options_select option:selected").text();if(1>d)return!1;if(o||(o=0),o=parseFloat(o),isNaN(o))return alert(edd_vars.numeric_item_price),!1;if("1"===edd_vars.quantities_enabled){if(isNaN(parseInt(a)))return alert(edd_vars.numeric_quantity),!1;o*=a}o=o.toFixed(edd_vars.currency_decimals);var s=o+edd_vars.currency_sign;"before"===edd_vars.currency_pos&&(s=edd_vars.currency_sign+o),r&&(n=n+" - "+r);var c=e("#edd-purchased-files div.row").length,l=e("#edd-purchased-files div.row:last").clone();l.find(".download span").html('<a href="post.php?post='+d+'&action=edit"></a>'),l.find(".download span a").text(n),l.find(".price-text").text(s),l.find(".item-quantity").text(a),l.find(".item-price").text(edd_vars.currency_sign+(o/a).toFixed(edd_vars.currency_decimals)),l.find("input.edd-payment-details-download-id").val(d),l.find("input.edd-payment-details-download-price-id").val(i),l.find("input.edd-payment-details-download-amount").val(o),l.find("input.edd-payment-details-download-quantity").val(a),l.find("input.edd-payment-details-download-has-log").val(0),l.find("input").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(c)+"]"),e(this).attr("name",t).attr("id",t)}),e("#edd-payment-downloads-changed").val(1),e(l).insertAfter("#edd-purchased-files div.row:last"),e(".edd-order-payment-recalc-totals").show()})},recalculate_total:function(){e("#edd-order-recalc-total").on("click",function(t){t.preventDefault();var d=0;e("#edd-purchased-files .row .edd-payment-details-download-amount").length&&e("#edd-purchased-files .row .edd-payment-details-download-amount").each(function(){d+=parseFloat(e(this).val())}),e(".edd-payment-fees").length&&e(".edd-payment-fees span.fee-amount").each(function(){d+=parseFloat(e(this).data("fee"))}),e("input[name=edd-payment-total]").val(d)})},variable_prices_check:function(){e("#edd-purchased-files").on("change","select#edd_order_download_select",function(){var t=e(this),d=t.val();if(parseInt(d)>0){var n={action:"edd_check_for_download_price_variations",download_id:d};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(d){e(".edd_price_options_select").remove(),e(d).insertAfter(t.next())}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}})},add_note:function(){e("#edd-add-payment-note").on("click",function(t){t.preventDefault();var d={action:"edd_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#edd-payment-note").val()};if(d.note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-payment-notes-inner").append(t),e(".edd-no-payment-notes").hide(),e("#edd-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#edd-payment-note").css("border-color");e("#edd-payment-note").css("border-color","red"),setTimeout(function(){e("#edd-payment-note").css("border-color",n)},500)}})},remove_note:function(){e("body").on("click",".edd-delete-payment-note",function(t){if(t.preventDefault(),confirm(edd_vars.delete_payment_note)){var d={action:"edd_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:d,url:ajaxurl,success:function(){return e("#edd-payment-note-"+d.note_id).remove(),e(".edd-payment-note").length||e(".edd-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},resend_receipt:function(){e("body").on("click","#edd-resend-receipt",function(){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){e("body").on("click",".edd-copy-download-link",function(t){t.preventDefault();var d=e(this),n={action:"edd_get_file_download_link",payment_id:e('input[name="edd_payment_id"]').val(),download_id:d.data("download-id"),price_id:d.data("price-id")};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){return e("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+t+"</textarea>"),e("#edd-download-link-textarea").focus().select(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)})})}};n.init();var a={init:function(){this.type_select(),this.product_requirements()},type_select:function(){e("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){e(".edd-amount-description").toggle()})},product_requirements:function(){e("#products").change(function(){e(this).val()?e("#edd-discount-product-conditions").show():e("#edd-discount-product-conditions").hide()})}};a.init();var o={init:function(){this.date_options(),this.customers_export()},date_options:function(){e("#edd-graphs-date-options").change(function(){var t=e(this);"other"===t.val()?e("#edd-date-range-options").show():e("#edd-date-range-options").hide()})},customers_export:function(){e("#edd_customer_export_download").change(function(){var t=e(this),d=e("option:selected",t).val();if("0"===t.val()?e("#edd_customer_export_option").show():e("#edd_customer_export_option").hide(),0!=parseInt(d)){var n={action:"edd_check_for_download_price_variations",download_id:d};e.post(ajaxurl,n,function(d){e(".edd_price_options_select").remove(),t.after(d)})}else e(".edd_price_options_select").remove()})}};o.init();var i={init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){if(e(".edd-color-picker").length&&e(".edd-color-picker").wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui)e(".edd_settings_upload_button").length>0&&(window.formfield="",e("body").on("click",".edd_settings_upload_button",function(t){t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var t;window.formfield="",e("body").on("click",".edd_settings_upload_button",function(d){d.preventDefault();var n=e(this);return window.formfield=e(this).parent().prev(),t?void t.open():(t=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:n.data("uploader_title"),button:{text:n.data("uploader_button_text")},multiple:!1}),t.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),t.on("insert",function(){var e=t.state().get("selection");e.each(function(e){e=e.toJSON(),window.formfield.val(e.url)})}),void t.open())});var t;window.formfield=""}},taxes:function(){e("select.edd-no-states").length&&e("select.edd-no-states").closest("tr").hide(),e('select[name="edd_settings[base_country]"]').change(function(){var t=e(this),d=t.closest("tr");return data={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd_settings[base_state]"},e.post(ajaxurl,data,function(e){"nostates"==e?d.next().hide():(d.next().show(),d.next().find("select").replaceWith(e))}),!1}),e("body").on("change","#edd_tax_rates select.edd-tax-country",function(){var t=e(this);return data={action:"edd_get_shop_states",country:e(this).val(),field_name:t.attr("name").replace("country","state")},e.post(ajaxurl,data,function(e){if("nostates"==e){var d='<input type="text" name="'+data.field_name+'" value=""/>';t.parent().next().find("select").replaceWith(d)}else t.parent().next().find("input,select").show(),t.parent().next().find("input,select").replaceWith(e)}),!1}),e("#edd_add_tax_rate").on("click",function(){var t=e("#edd_tax_rates tr:last"),d=t.clone(),n=t.parent().find("tr").length;return d.find("td input").not(":input[type=checkbox]").val(""),d.find('td [type="checkbox"]').attr("checked",!1),d.find("input, select").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("name",t).attr("id",t)}),d.find("label").each(function(){var t=e(this).attr("for");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("for",t)}),d.insertAfter(t),!1}),e("body").on("click","#edd_tax_rates .edd_remove_tax_rate",function(){if(confirm(edd_vars.delete_tax_rate)){var t=e("#edd_tax_rates tr:visible").length;2===t?(e("#edd_tax_rates select").val(""),e('#edd_tax_rates input[type="text"]').val(""),e('#edd_tax_rates input[type="number"]').val(""),e('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):e(this).closest("tr").remove()}return!1})},emails:function(){if(e("#email-preview-wrap").length){var t=e("#email-preview");e("#open-email-preview").colorbox({inline:!0,href:t,width:"80%",height:"auto"})}},misc:function(){"direct"!=e('select[name="edd_settings[download_method]"]:selected').val()&&(e('select[name="edd_settings[download_method]"]').parent().parent().next().hide(),e('select[name="edd_settings[download_method]"]').parent().parent().next().find("input").attr("checked",!1)),e('select[name="edd_settings[download_method]"]').on("change",function(){var t=e(this).parent().parent().next();"direct"==e(this).val()?t.hide():(t.show(),t.find("input").attr("checked",!1))})}};i.init(),e(".download_page_edd-payment-history .row-actions .delete a").on("click",function(){return confirm(edd_vars.delete_payment)?!0:!1}),e("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var d=e("#post-"+t),n=d.find(".column-price .downloadprice-"+t).val();n!=e("#post-"+t+".column-price .downloadprice-"+t).val()?e(".regprice","#edd-download-data").val(n).attr("disabled",!1):e(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),e("body").on("click","#bulk_edit",function(){var t=e("#bulk-edit"),d=new Array;t.find("#bulk-titles").children().each(function(){d.push(e(this).attr("id").replace(/^(ttle)/i,""))});var n=e('#edd-download-data input[name="_edd_regprice"]').val(),a={action:"edd_save_bulk_edit",edd_bulk_nonce:d,post_ids:d,price:n};e.post(ajaxurl,a)}),e(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),e(".chosen-choices").on("click",function(){e(this).children("li").children("input").attr("placeholder",edd_vars.type_to_search)});var r,s=342;e(".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input").keyup(function(t){var d=e(this).val(),n=e(this).closest(".edd-select-chosen"),a=n.attr("id").replace("_chosen",""),o=(t.which,"edd_download_search");n.attr("id").indexOf("customer")>=0&&(o="edd_customer_search"),d.length<=3&&"edd_download_search"==o||16==t.which||13==t.which||91==t.which||17==t.which||37==t.which||38==t.which||39==t.which||40==t.which||(clearTimeout(r),r=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:o,s:d,current_id:edd_vars.post_id},dataType:"json",beforeSend:function(){e("ul.chosen-results").empty()},success:function(t){e("#"+a+" option:not(:selected)").remove(),e.each(t,function(t,d){e("#"+a+' option[value="'+d.id+'"]').length||e("#"+a).prepend('<option value="'+d.id+'">'+d.name+"</option>")}),e(".edd-select-chosen").trigger("chosen:updated"),e("#"+a).next().find("input").val(d)}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(){})},s))}),e("#post").on("click",".edd-thickbox",function(){e(".edd-select-chosen","#choose-download").css("width","100%")});var c={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".edd-revoke-api-key",function(){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){e("body").on("click",".edd-regenerate-api-key",function(){return confirm(edd_vars.regenerate_api_key)})}};c.init();var l={init:function(){this.edit_customer(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){e("body").on("click","#edit-customer",function(t){t.preventDefault(),e("#edd-customer-card-wrapper .editable").hide(),e("#edd-customer-card-wrapper .edit-item").fadeIn().css("display","block")})},user_search:function(){e("body").on("click.eddSelectUser",".edd_user_search_results a",function(t){t.preventDefault();var d=e(this).data("userid");e('input[name="customerinfo[user_id]"]').val(d)})},remove_user:function(){e("body").on("click","#disconnect-customer",function(t){t.preventDefault();var d=e('input[name="customerinfo[id]"]').val(),n={edd_action:"disconnect-userid",customer_id:d,_wpnonce:e("#edit-customer-info #_wpnonce").val()};e.post(ajaxurl,n,function(){window.location.href=window.location.href},"json")})},cancel_edit:function(){e("body").on("click","#edd-edit-customer-cancel",function(t){t.preventDefault(),e("#edd-customer-card-wrapper .edit-item").hide(),e("#edd-customer-card-wrapper .editable").show(),e(".edd_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"customerinfo[state]"},e.post(ajaxurl,data,function(t){e(':input[name="customerinfo[state]"]').replaceWith("nostates"==t?'<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>':t)}),!1})},add_note:function(){e("body").on("click","#add-customer-note",function(t){t.preventDefault();var d={edd_action:"add-customer-note",customer_id:e("#customer-id").val(),customer_note:e("#customer-note").val(),add_customer_note_nonce:e("#add_customer_note_nonce").val()};if(d.customer_note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-customer-notes").prepend(t),e(".edd-no-customer-notes").hide(),e("#customer-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#customer-note").css("border-color");e("#customer-note").css("border-color","red"),setTimeout(function(){e("#customer-note").css("border-color",n)},500)}})},delete_checked:function(){e("#edd-customer-delete-confirm").change(function(){var t=e("#edd-customer-delete-records"),d=e("#edd-delete-customer");e(this).prop("checked")?(t.attr("disabled",!1),d.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),d.attr("disabled",!0))})}};l.init(),e(".edd-ajax-user-search").keyup(function(){var t=e(this).val(),d="";e(this).data("exclude")&&(d=e(this).data("exclude")),e(".edd-ajax").show(),data={action:"edd_search_users",user_name:t,exclude:d},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".edd-ajax").hide(),e(".edd_user_search_results").removeClass("hidden"),e(".edd_user_search_results span").html(""),e(t.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),e("body").on("click.eddSelectUser",".edd_user_search_results span a",function(t){t.preventDefault();var d=e(this).data("login");e(".edd-ajax-user-search").val(d),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e("body").on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(t){t.preventDefault(),e(".edd-ajax-user-search").val(""),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(t){e("#edd_dashboard_sales .inside").html(t)}}),e(document).on("keydown",".customer-note-input",function(t){13==t.keyCode&&(t.metaKey||t.ctrlKey)&&e("#add-customer-note").click()})});
|
easy-digital-downloads.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Easy Digital Downloads
|
4 |
-
* Plugin URI:
|
5 |
* Description: Serve Digital Downloads Through WordPress
|
6 |
* Author: Pippin Williamson
|
7 |
-
* Author URI:
|
8 |
-
* Version: 2.3.
|
9 |
* Text Domain: edd
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -25,7 +25,7 @@
|
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
-
* @version 2.3.
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly
|
@@ -187,7 +187,7 @@ final class Easy_Digital_Downloads {
|
|
187 |
|
188 |
// Plugin version
|
189 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
190 |
-
define( 'EDD_VERSION', '2.3.
|
191 |
}
|
192 |
|
193 |
// Plugin Folder Path
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Easy Digital Downloads
|
4 |
+
* Plugin URI: https://easydigitaldownloads.com
|
5 |
* Description: Serve Digital Downloads Through WordPress
|
6 |
* Author: Pippin Williamson
|
7 |
+
* Author URI: https://pippinsplugins.com
|
8 |
+
* Version: 2.3.9
|
9 |
* Text Domain: edd
|
10 |
* Domain Path: languages
|
11 |
*
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
+
* @version 2.3.9
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly
|
187 |
|
188 |
// Plugin version
|
189 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
190 |
+
define( 'EDD_VERSION', '2.3.9' );
|
191 |
}
|
192 |
|
193 |
// Plugin Folder Path
|
includes/admin/class-edd-notices.php
CHANGED
@@ -56,7 +56,7 @@ class EDD_Notices {
|
|
56 |
|
57 |
echo '<div class="error">';
|
58 |
echo '<p>' . sprintf( __( 'The download files in <strong>%s</strong> are not currently protected due to your site running on NGINX.', 'edd' ), edd_get_upload_dir() ) . '</p>';
|
59 |
-
echo '<p>' . __( 'To protect them, you must add a redirect rule as explained in <a href="
|
60 |
echo '<p>' . __( 'If you have already added the redirect rule, you may safely dismiss this notice', 'edd' ) . '</p>';
|
61 |
echo '<p><a href="' . add_query_arg( array( 'edd_action' => 'dismiss_notices', 'edd_notice' => 'nginx_redirect' ) ) . '">' . __( 'Dismiss Notice', 'edd' ) . '</a></p>';
|
62 |
echo '</div>';
|
56 |
|
57 |
echo '<div class="error">';
|
58 |
echo '<p>' . sprintf( __( 'The download files in <strong>%s</strong> are not currently protected due to your site running on NGINX.', 'edd' ), edd_get_upload_dir() ) . '</p>';
|
59 |
+
echo '<p>' . __( 'To protect them, you must add a redirect rule as explained in <a href="https://docs.easydigitaldownloads.com/article/682-protected-download-files-on-nginx">this guide</a>.', 'edd' ) . '</p>';
|
60 |
echo '<p>' . __( 'If you have already added the redirect rule, you may safely dismiss this notice', 'edd' ) . '</p>';
|
61 |
echo '<p><a href="' . add_query_arg( array( 'edd_action' => 'dismiss_notices', 'edd_notice' => 'nginx_redirect' ) ) . '">' . __( 'Dismiss Notice', 'edd' ) . '</a></p>';
|
62 |
echo '</div>';
|
includes/admin/customers/customer-actions.php
CHANGED
@@ -95,7 +95,7 @@ function edd_edit_customer( $args ) {
|
|
95 |
|
96 |
// Sanitize the inputs
|
97 |
$customer_data = array();
|
98 |
-
$customer_data['name'] = $customer_info['name'];
|
99 |
$customer_data['email'] = $customer_info['email'];
|
100 |
$customer_data['user_id'] = $customer_info['user_id'];
|
101 |
|
95 |
|
96 |
// Sanitize the inputs
|
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 |
|
includes/admin/customers/customers.php
CHANGED
@@ -252,7 +252,7 @@ function edd_customers_view( $customer ) {
|
|
252 |
|
253 |
<div class="customer-main-wrapper left">
|
254 |
|
255 |
-
<span class="customer-name info-item edit-item"><input size="15" data-key="name" name="customerinfo[name]" type="text" value="<?php echo $customer->name; ?>" placeholder="<?php _e( 'Customer Name', 'edd' ); ?>" /></span>
|
256 |
<span class="customer-name info-item editable"><span data-key="name"><?php echo $customer->name; ?></span></span>
|
257 |
<span class="customer-name info-item edit-item"><input size="20" data-key="email" name="customerinfo[email]" type="text" value="<?php echo $customer->email; ?>" placeholder="<?php _e( 'Customer Email', 'edd' ); ?>" /></span>
|
258 |
<span class="customer-email info-item editable" data-key="email"><?php echo $customer->email; ?></span>
|
252 |
|
253 |
<div class="customer-main-wrapper left">
|
254 |
|
255 |
+
<span class="customer-name info-item edit-item"><input size="15" data-key="name" name="customerinfo[name]" type="text" value="<?php echo esc_attr( $customer->name ); ?>" placeholder="<?php _e( 'Customer Name', 'edd' ); ?>" /></span>
|
256 |
<span class="customer-name info-item editable"><span data-key="name"><?php echo $customer->name; ?></span></span>
|
257 |
<span class="customer-name info-item edit-item"><input size="20" data-key="email" name="customerinfo[email]" type="text" value="<?php echo $customer->email; ?>" placeholder="<?php _e( 'Customer Email', 'edd' ); ?>" /></span>
|
258 |
<span class="customer-email info-item editable" data-key="email"><?php echo $customer->email; ?></span>
|
includes/admin/settings/register-settings.php
CHANGED
@@ -276,7 +276,7 @@ function edd_get_registered_settings() {
|
|
276 |
),
|
277 |
'currency_settings' => array(
|
278 |
'id' => 'currency_settings',
|
279 |
-
'name' => '<
|
280 |
'desc' => __( 'Configure the currency options', 'edd' ),
|
281 |
'type' => 'header'
|
282 |
),
|
@@ -316,7 +316,7 @@ function edd_get_registered_settings() {
|
|
316 |
),
|
317 |
'api_settings' => array(
|
318 |
'id' => 'api_settings',
|
319 |
-
'name' => '<
|
320 |
'desc' => '',
|
321 |
'type' => 'header'
|
322 |
),
|
@@ -328,7 +328,7 @@ function edd_get_registered_settings() {
|
|
328 |
),
|
329 |
'tracking_settings' => array(
|
330 |
'id' => 'tracking_settings',
|
331 |
-
'name' => '<
|
332 |
'desc' => '',
|
333 |
'type' => 'header'
|
334 |
),
|
@@ -379,7 +379,7 @@ function edd_get_registered_settings() {
|
|
379 |
),
|
380 |
'paypal' => array(
|
381 |
'id' => 'paypal',
|
382 |
-
'name' => '<
|
383 |
'desc' => __( 'Configure the PayPal settings', 'edd' ),
|
384 |
'type' => 'header'
|
385 |
),
|
@@ -457,7 +457,7 @@ function edd_get_registered_settings() {
|
|
457 |
),
|
458 |
'sale_notification_header' => array(
|
459 |
'id' => 'sale_notification_header',
|
460 |
-
'name' => '<
|
461 |
'desc' => __('Configure new sale notification emails', 'edd'),
|
462 |
'type' => 'header'
|
463 |
),
|
@@ -501,7 +501,7 @@ function edd_get_registered_settings() {
|
|
501 |
),
|
502 |
'button_header' => array(
|
503 |
'id' => 'button_header',
|
504 |
-
'name' => '<
|
505 |
'desc' => __( 'Options for add to cart and purchase buttons', 'edd' ),
|
506 |
'type' => 'header'
|
507 |
),
|
@@ -532,7 +532,7 @@ function edd_get_registered_settings() {
|
|
532 |
),
|
533 |
'tax_rates' => array(
|
534 |
'id' => 'tax_rates',
|
535 |
-
'name' => '<
|
536 |
'desc' => __( 'Enter tax rates for specific regions.', 'edd' ),
|
537 |
'type' => 'tax_rates'
|
538 |
),
|
@@ -641,7 +641,7 @@ function edd_get_registered_settings() {
|
|
641 |
),
|
642 |
'field_downloads' => array(
|
643 |
'id' => 'field_downloads',
|
644 |
-
'name' => '<
|
645 |
'desc' => '',
|
646 |
'type' => 'header'
|
647 |
),
|
@@ -685,7 +685,7 @@ function edd_get_registered_settings() {
|
|
685 |
),
|
686 |
'accounting_settings' => array(
|
687 |
'id' => 'accounting_settings',
|
688 |
-
'name' => '<
|
689 |
'desc' => '',
|
690 |
'type' => 'header'
|
691 |
),
|
@@ -723,7 +723,7 @@ function edd_get_registered_settings() {
|
|
723 |
),
|
724 |
'terms' => array(
|
725 |
'id' => 'terms',
|
726 |
-
'name' => '<
|
727 |
'desc' => '',
|
728 |
'type' => 'header'
|
729 |
),
|
276 |
),
|
277 |
'currency_settings' => array(
|
278 |
'id' => 'currency_settings',
|
279 |
+
'name' => '<span class="field-section-title">' . __( 'Currency Settings', 'edd' ) . '</span>',
|
280 |
'desc' => __( 'Configure the currency options', 'edd' ),
|
281 |
'type' => 'header'
|
282 |
),
|
316 |
),
|
317 |
'api_settings' => array(
|
318 |
'id' => 'api_settings',
|
319 |
+
'name' => '<span class="field-section-title">' . __( 'API Settings', 'edd' ) . '</span>',
|
320 |
'desc' => '',
|
321 |
'type' => 'header'
|
322 |
),
|
328 |
),
|
329 |
'tracking_settings' => array(
|
330 |
'id' => 'tracking_settings',
|
331 |
+
'name' => '<span class="field-section-title">' . __( 'Tracking Settings', 'edd' ) . '</span>',
|
332 |
'desc' => '',
|
333 |
'type' => 'header'
|
334 |
),
|
379 |
),
|
380 |
'paypal' => array(
|
381 |
'id' => 'paypal',
|
382 |
+
'name' => '<span class="field-section-title">' . __( 'PayPal Settings', 'edd' ) . '</span>',
|
383 |
'desc' => __( 'Configure the PayPal settings', 'edd' ),
|
384 |
'type' => 'header'
|
385 |
),
|
457 |
),
|
458 |
'sale_notification_header' => array(
|
459 |
'id' => 'sale_notification_header',
|
460 |
+
'name' => '<span class="field-section-title">' . __('New Sale Notifications', 'edd') . '</span>',
|
461 |
'desc' => __('Configure new sale notification emails', 'edd'),
|
462 |
'type' => 'header'
|
463 |
),
|
501 |
),
|
502 |
'button_header' => array(
|
503 |
'id' => 'button_header',
|
504 |
+
'name' => '<span class="field-section-title">' . __( 'Buttons', 'edd' ) . '</span>',
|
505 |
'desc' => __( 'Options for add to cart and purchase buttons', 'edd' ),
|
506 |
'type' => 'header'
|
507 |
),
|
532 |
),
|
533 |
'tax_rates' => array(
|
534 |
'id' => 'tax_rates',
|
535 |
+
'name' => '<span class="field-section-title">' . __( 'Tax Rates', 'edd' ) . '</span>',
|
536 |
'desc' => __( 'Enter tax rates for specific regions.', 'edd' ),
|
537 |
'type' => 'tax_rates'
|
538 |
),
|
641 |
),
|
642 |
'field_downloads' => array(
|
643 |
'id' => 'field_downloads',
|
644 |
+
'name' => '<span class="field-section-title">' . __( 'File Downloads', 'edd' ) . '</span>',
|
645 |
'desc' => '',
|
646 |
'type' => 'header'
|
647 |
),
|
685 |
),
|
686 |
'accounting_settings' => array(
|
687 |
'id' => 'accounting_settings',
|
688 |
+
'name' => '<span class="field-section-title">' . __( 'Accounting Settings', 'edd' ) . '</span>',
|
689 |
'desc' => '',
|
690 |
'type' => 'header'
|
691 |
),
|
723 |
),
|
724 |
'terms' => array(
|
725 |
'id' => 'terms',
|
726 |
+
'name' => '<span class="field-section-title">' . __( 'Terms of Agreement', 'edd' ) . '</span>',
|
727 |
'desc' => '',
|
728 |
'type' => 'header'
|
729 |
),
|
includes/admin/upgrades/upgrade-functions.php
CHANGED
@@ -119,7 +119,7 @@ function edd_show_upgrade_notices() {
|
|
119 |
|
120 |
if ( version_compare( $edd_version, '2.3', '<' ) || ! edd_has_upgrade_completed( 'upgrade_payment_taxes' ) ) {
|
121 |
printf(
|
122 |
-
'<div class="updated"><p>' . __( 'Easy Digital Downloads needs to upgrade the
|
123 |
esc_url( admin_url( 'index.php?page=edd-upgrades&edd-upgrade=upgrade_payment_taxes' ) )
|
124 |
);
|
125 |
}
|
@@ -447,7 +447,7 @@ function edd_v15_upgrades() {
|
|
447 |
update_option( 'edd_settings_taxes', $tax_options );
|
448 |
|
449 |
// Flush the rewrite rules for the new /edd-api/ end point
|
450 |
-
flush_rewrite_rules();
|
451 |
}
|
452 |
|
453 |
/**
|
119 |
|
120 |
if ( version_compare( $edd_version, '2.3', '<' ) || ! edd_has_upgrade_completed( 'upgrade_payment_taxes' ) ) {
|
121 |
printf(
|
122 |
+
'<div class="updated"><p>' . __( 'Easy Digital Downloads needs to upgrade the payment database, click <a href="%s">here</a> to start the upgrade.', 'edd' ) . '</p></div>',
|
123 |
esc_url( admin_url( 'index.php?page=edd-upgrades&edd-upgrade=upgrade_payment_taxes' ) )
|
124 |
);
|
125 |
}
|
447 |
update_option( 'edd_settings_taxes', $tax_options );
|
448 |
|
449 |
// Flush the rewrite rules for the new /edd-api/ end point
|
450 |
+
flush_rewrite_rules( false );
|
451 |
}
|
452 |
|
453 |
/**
|
includes/ajax-functions.php
CHANGED
@@ -38,17 +38,17 @@ function edd_test_ajax_works() {
|
|
38 |
// Check if the Airplane Mode plugin is installed
|
39 |
if ( class_exists( 'Airplane_Mode_Core' ) ) {
|
40 |
|
41 |
-
|
42 |
|
43 |
-
if ( method_exists( $
|
44 |
|
45 |
-
if ( $
|
46 |
return true;
|
47 |
}
|
48 |
|
49 |
} else {
|
50 |
|
51 |
-
if ( $
|
52 |
return true;
|
53 |
}
|
54 |
}
|
@@ -306,6 +306,10 @@ function edd_ajax_update_cart_item_quantity() {
|
|
306 |
'subtotal' => html_entity_decode( edd_currency_filter( edd_format_amount( edd_get_cart_subtotal() ) ), ENT_COMPAT, 'UTF-8' ),
|
307 |
'total' => html_entity_decode( edd_currency_filter( edd_format_amount( $total ) ), ENT_COMPAT, 'UTF-8' )
|
308 |
);
|
|
|
|
|
|
|
|
|
309 |
echo json_encode($return);
|
310 |
}
|
311 |
edd_die();
|
38 |
// Check if the Airplane Mode plugin is installed
|
39 |
if ( class_exists( 'Airplane_Mode_Core' ) ) {
|
40 |
|
41 |
+
$airplane = Airplane_Mode_Core::getInstance();
|
42 |
|
43 |
+
if ( method_exists( $airplane, 'enabled' ) ) {
|
44 |
|
45 |
+
if ( $airplane->enabled() ) {
|
46 |
return true;
|
47 |
}
|
48 |
|
49 |
} else {
|
50 |
|
51 |
+
if ( $airplane->check_status() == 'on' ) {
|
52 |
return true;
|
53 |
}
|
54 |
}
|
306 |
'subtotal' => html_entity_decode( edd_currency_filter( edd_format_amount( edd_get_cart_subtotal() ) ), ENT_COMPAT, 'UTF-8' ),
|
307 |
'total' => html_entity_decode( edd_currency_filter( edd_format_amount( $total ) ), ENT_COMPAT, 'UTF-8' )
|
308 |
);
|
309 |
+
|
310 |
+
// Allow for custom cart item quantity handling
|
311 |
+
$return = apply_filters( 'edd_ajax_cart_item_quantity_response', $return );
|
312 |
+
|
313 |
echo json_encode($return);
|
314 |
}
|
315 |
edd_die();
|
includes/cart/functions.php
CHANGED
@@ -135,8 +135,9 @@ function edd_add_to_cart( $download_id, $options = array() ) {
|
|
135 |
if( 'download' != $download->post_type )
|
136 |
return; // Not a download product
|
137 |
|
138 |
-
if ( ! current_user_can( 'edit_post', $download->ID ) &&
|
139 |
return; // Do not allow draft/pending to be purchased if can't edit. Fixes #1056
|
|
|
140 |
|
141 |
do_action( 'edd_pre_add_to_cart', $download_id, $options );
|
142 |
|
135 |
if( 'download' != $download->post_type )
|
136 |
return; // Not a download product
|
137 |
|
138 |
+
if ( ! current_user_can( 'edit_post', $download->ID ) && $download->post_status != 'publish' ) {
|
139 |
return; // Do not allow draft/pending to be purchased if can't edit. Fixes #1056
|
140 |
+
}
|
141 |
|
142 |
do_action( 'edd_pre_add_to_cart', $download_id, $options );
|
143 |
|
includes/class-edd-api.php
CHANGED
@@ -763,41 +763,7 @@ class EDD_API {
|
|
763 |
if ( $product_list ) {
|
764 |
$i = 0;
|
765 |
foreach ( $product_list as $product_info ) {
|
766 |
-
$products['products'][$i]
|
767 |
-
$products['products'][$i]['info']['slug'] = $product_info->post_name;
|
768 |
-
$products['products'][$i]['info']['title'] = $product_info->post_title;
|
769 |
-
$products['products'][$i]['info']['create_date'] = $product_info->post_date;
|
770 |
-
$products['products'][$i]['info']['modified_date'] = $product_info->post_modified;
|
771 |
-
$products['products'][$i]['info']['status'] = $product_info->post_status;
|
772 |
-
$products['products'][$i]['info']['link'] = html_entity_decode( $product_info->guid );
|
773 |
-
$products['products'][$i]['info']['content'] = $product_info->post_content;
|
774 |
-
$products['products'][$i]['info']['excerpt'] = $product_info->post_excerpt;
|
775 |
-
$products['products'][$i]['info']['thumbnail'] = wp_get_attachment_url( get_post_thumbnail_id( $product_info->ID ) );
|
776 |
-
$products['products'][$i]['info']['category'] = get_the_terms( $product_info, 'download_category' );
|
777 |
-
$products['products'][$i]['info']['tags'] = get_the_terms( $product_info, 'download_tag' );
|
778 |
-
|
779 |
-
if( user_can( $this->user_id, 'view_shop_reports' ) || $this->override) {
|
780 |
-
$products['products'][$i]['stats']['total']['sales'] = edd_get_download_sales_stats( $product_info->ID );
|
781 |
-
$products['products'][$i]['stats']['total']['earnings'] = edd_get_download_earnings_stats( $product_info->ID );
|
782 |
-
$products['products'][$i]['stats']['monthly_average']['sales'] = edd_get_average_monthly_download_sales( $product_info->ID );
|
783 |
-
$products['products'][$i]['stats']['monthly_average']['earnings'] = edd_get_average_monthly_download_earnings( $product_info->ID );
|
784 |
-
}
|
785 |
-
|
786 |
-
if ( edd_has_variable_prices( $product_info->ID ) ) {
|
787 |
-
foreach ( edd_get_variable_prices( $product_info->ID ) as $price ) {
|
788 |
-
$products['products'][$i]['pricing'][ sanitize_key( $price['name'] ) ] = $price['amount'];
|
789 |
-
}
|
790 |
-
} else {
|
791 |
-
$products['products'][$i]['pricing']['amount'] = edd_get_download_price( $product_info->ID );
|
792 |
-
}
|
793 |
-
|
794 |
-
if( user_can( $this->user_id, 'view_shop_sensitive_data' ) || $this->override ) {
|
795 |
-
foreach ( edd_get_download_files( $product_info->ID ) as $file ) {
|
796 |
-
$products['products'][$i]['files'][] = $file;
|
797 |
-
}
|
798 |
-
$products['products'][$i]['notes'] = edd_get_product_notes( $product_info->ID );
|
799 |
-
}
|
800 |
-
|
801 |
$i++;
|
802 |
}
|
803 |
}
|
@@ -805,39 +771,7 @@ class EDD_API {
|
|
805 |
if ( get_post_type( $product ) == 'download' ) {
|
806 |
$product_info = get_post( $product );
|
807 |
|
808 |
-
$products['products'][0]
|
809 |
-
$products['products'][0]['info']['slug'] = $product_info->post_name;
|
810 |
-
$products['products'][0]['info']['title'] = $product_info->post_title;
|
811 |
-
$products['products'][0]['info']['create_date'] = $product_info->post_date;
|
812 |
-
$products['products'][0]['info']['modified_date'] = $product_info->post_modified;
|
813 |
-
$products['products'][0]['info']['status'] = $product_info->post_status;
|
814 |
-
$products['products'][0]['info']['link'] = html_entity_decode( $product_info->guid );
|
815 |
-
$products['products'][0]['info']['content'] = $product_info->post_content;
|
816 |
-
$products['products'][0]['info']['thumbnail'] = wp_get_attachment_url( get_post_thumbnail_id( $product_info->ID ) );
|
817 |
-
$products['products'][0]['info']['category'] = get_the_terms( $product_info, 'download_category' );
|
818 |
-
$products['products'][0]['info']['tags'] = get_the_terms( $product_info, 'download_tag' );
|
819 |
-
|
820 |
-
if( user_can( $this->user_id, 'view_shop_reports' ) || $this->override ) {
|
821 |
-
$products['products'][0]['stats']['total']['sales'] = edd_get_download_sales_stats( $product_info->ID );
|
822 |
-
$products['products'][0]['stats']['total']['earnings'] = edd_get_download_earnings_stats( $product_info->ID );
|
823 |
-
$products['products'][0]['stats']['monthly_average']['sales'] = edd_get_average_monthly_download_sales( $product_info->ID );
|
824 |
-
$products['products'][0]['stats']['monthly_average']['earnings'] = edd_get_average_monthly_download_earnings( $product_info->ID );
|
825 |
-
}
|
826 |
-
|
827 |
-
if ( edd_has_variable_prices( $product_info->ID ) ) {
|
828 |
-
foreach ( edd_get_variable_prices( $product_info->ID ) as $price ) {
|
829 |
-
$products['products'][0]['pricing'][ sanitize_key( $price['name'] ) ] = $price['amount'];
|
830 |
-
}
|
831 |
-
} else {
|
832 |
-
$products['products'][0]['pricing']['amount'] = edd_get_download_price( $product_info->ID );
|
833 |
-
}
|
834 |
-
|
835 |
-
if( user_can( $this->user_id, 'view_shop_sensitive_data' ) || $this->override ) {
|
836 |
-
foreach ( edd_get_download_files( $product_info->ID ) as $file ) {
|
837 |
-
$products['products'][0]['files'][] = $file;
|
838 |
-
}
|
839 |
-
$products['products'][0]['notes'] = edd_get_product_notes( $product_info->ID );
|
840 |
-
}
|
841 |
|
842 |
} else {
|
843 |
$error['error'] = sprintf( __( 'Product %s not found!', 'edd' ), $product );
|
@@ -848,6 +782,55 @@ class EDD_API {
|
|
848 |
return $products;
|
849 |
}
|
850 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
/**
|
852 |
* Process Get Stats API Request
|
853 |
*
|
763 |
if ( $product_list ) {
|
764 |
$i = 0;
|
765 |
foreach ( $product_list as $product_info ) {
|
766 |
+
$products['products'][$i] = $this->get_product_data( $product_info );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
$i++;
|
768 |
}
|
769 |
}
|
771 |
if ( get_post_type( $product ) == 'download' ) {
|
772 |
$product_info = get_post( $product );
|
773 |
|
774 |
+
$products['products'][0] = $this->get_product_data( $product_info );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
|
776 |
} else {
|
777 |
$error['error'] = sprintf( __( 'Product %s not found!', 'edd' ), $product );
|
782 |
return $products;
|
783 |
}
|
784 |
|
785 |
+
/**
|
786 |
+
* Given a download post object, generate the data for the API output
|
787 |
+
*
|
788 |
+
* @since 2.3.9
|
789 |
+
* @param object $product_info The Download Post Object
|
790 |
+
* @return array Array of post data to return back in the API
|
791 |
+
*/
|
792 |
+
private function get_product_data( $product_info ) {
|
793 |
+
|
794 |
+
$product = array();
|
795 |
+
|
796 |
+
$product['info']['id'] = $product_info->ID;
|
797 |
+
$product['info']['slug'] = $product_info->post_name;
|
798 |
+
$product['info']['title'] = $product_info->post_title;
|
799 |
+
$product['info']['create_date'] = $product_info->post_date;
|
800 |
+
$product['info']['modified_date'] = $product_info->post_modified;
|
801 |
+
$product['info']['status'] = $product_info->post_status;
|
802 |
+
$product['info']['link'] = html_entity_decode( $product_info->guid );
|
803 |
+
$product['info']['content'] = $product_info->post_content;
|
804 |
+
$product['info']['thumbnail'] = wp_get_attachment_url( get_post_thumbnail_id( $product_info->ID ) );
|
805 |
+
$product['info']['category'] = get_the_terms( $product_info, 'download_category' );
|
806 |
+
$product['info']['tags'] = get_the_terms( $product_info, 'download_tag' );
|
807 |
+
|
808 |
+
if( user_can( $this->user_id, 'view_shop_reports' ) || $this->override ) {
|
809 |
+
$product['stats']['total']['sales'] = edd_get_download_sales_stats( $product_info->ID );
|
810 |
+
$product['stats']['total']['earnings'] = edd_get_download_earnings_stats( $product_info->ID );
|
811 |
+
$product['stats']['monthly_average']['sales'] = edd_get_average_monthly_download_sales( $product_info->ID );
|
812 |
+
$product['stats']['monthly_average']['earnings'] = edd_get_average_monthly_download_earnings( $product_info->ID );
|
813 |
+
}
|
814 |
+
|
815 |
+
if ( edd_has_variable_prices( $product_info->ID ) ) {
|
816 |
+
foreach ( edd_get_variable_prices( $product_info->ID ) as $price ) {
|
817 |
+
$product['pricing'][ sanitize_key( $price['name'] ) ] = $price['amount'];
|
818 |
+
}
|
819 |
+
} else {
|
820 |
+
$product['pricing']['amount'] = edd_get_download_price( $product_info->ID );
|
821 |
+
}
|
822 |
+
|
823 |
+
if( user_can( $this->user_id, 'view_shop_sensitive_data' ) || $this->override ) {
|
824 |
+
foreach ( edd_get_download_files( $product_info->ID ) as $file ) {
|
825 |
+
$product['files'][] = $file;
|
826 |
+
}
|
827 |
+
$product['notes'] = edd_get_product_notes( $product_info->ID );
|
828 |
+
}
|
829 |
+
|
830 |
+
return apply_filters( 'edd_api_products_product', $product );
|
831 |
+
|
832 |
+
}
|
833 |
+
|
834 |
/**
|
835 |
* Process Get Stats API Request
|
836 |
*
|
includes/download-functions.php
CHANGED
@@ -546,7 +546,7 @@ function edd_record_sale_in_log( $download_id = 0, $payment_id, $price_id = fals
|
|
546 |
'post_parent' => $download_id,
|
547 |
'log_type' => 'sale',
|
548 |
'post_date' => isset( $sale_date ) ? $sale_date : null,
|
549 |
-
'post_date_gmt' => isset( $sale_date ) ? $sale_date : null
|
550 |
);
|
551 |
|
552 |
$log_meta = array(
|
546 |
'post_parent' => $download_id,
|
547 |
'log_type' => 'sale',
|
548 |
'post_date' => isset( $sale_date ) ? $sale_date : null,
|
549 |
+
'post_date_gmt' => isset( $sale_date ) ? get_gmt_from_date( $sale_date ) : null
|
550 |
);
|
551 |
|
552 |
$log_meta = array(
|
includes/install.php
CHANGED
@@ -41,7 +41,7 @@ function edd_install() {
|
|
41 |
edd_setup_download_taxonomies();
|
42 |
|
43 |
// Clear the permalinks
|
44 |
-
flush_rewrite_rules();
|
45 |
|
46 |
// Add Upgraded From Option
|
47 |
$current_version = get_option( 'edd_version' );
|
41 |
edd_setup_download_taxonomies();
|
42 |
|
43 |
// Clear the permalinks
|
44 |
+
flush_rewrite_rules( false );
|
45 |
|
46 |
// Add Upgraded From Option
|
47 |
$current_version = get_option( 'edd_version' );
|
includes/payments/functions.php
CHANGED
@@ -504,6 +504,7 @@ function edd_count_payments( $args = array() ) {
|
|
504 |
}
|
505 |
|
506 |
$where = apply_filters( 'edd_count_payments_where', $where );
|
|
|
507 |
|
508 |
$cache_key = md5( implode( '|', $args ) . $where );
|
509 |
|
504 |
}
|
505 |
|
506 |
$where = apply_filters( 'edd_count_payments_where', $where );
|
507 |
+
$join = apply_filters( 'edd_count_payments_join', $join );
|
508 |
|
509 |
$cache_key = md5( implode( '|', $args ) . $where );
|
510 |
|
includes/plugin-compatibility.php
CHANGED
@@ -126,7 +126,7 @@ add_action( 'edd_email_send_before', 'edd_disable_mandrill_nl2br');
|
|
126 |
* @return void
|
127 |
*/
|
128 |
function edd_disable_404_redirected_redirect() {
|
129 |
-
|
130 |
if( ! defined( 'WBZ404_VERSION' ) ) {
|
131 |
return;
|
132 |
}
|
@@ -135,4 +135,4 @@ function edd_disable_404_redirected_redirect() {
|
|
135 |
remove_action( 'template_redirect', 'wbz404_process404', 10 );
|
136 |
}
|
137 |
}
|
138 |
-
add_action( '
|
126 |
* @return void
|
127 |
*/
|
128 |
function edd_disable_404_redirected_redirect() {
|
129 |
+
|
130 |
if( ! defined( 'WBZ404_VERSION' ) ) {
|
131 |
return;
|
132 |
}
|
135 |
remove_action( 'template_redirect', 'wbz404_process404', 10 );
|
136 |
}
|
137 |
}
|
138 |
+
add_action( 'template_redirect', 'edd_disable_404_redirected_redirect', 9 );
|
includes/shortcodes.php
CHANGED
@@ -528,10 +528,11 @@ function edd_downloads_query( $atts, $content = null ) {
|
|
528 |
|
529 |
<?php wp_reset_postdata(); ?>
|
530 |
|
531 |
-
|
532 |
-
|
|
|
533 |
if ( is_single() ) {
|
534 |
-
|
535 |
'base' => get_permalink() . '%#%',
|
536 |
'format' => '?paged=%#%',
|
537 |
'current' => max( 1, $query['paged'] ),
|
@@ -541,15 +542,20 @@ function edd_downloads_query( $atts, $content = null ) {
|
|
541 |
$big = 999999;
|
542 |
$search_for = array( $big, '#038;' );
|
543 |
$replace_with = array( '%#%', '&' );
|
544 |
-
|
545 |
'base' => str_replace( $search_for, $replace_with, get_pagenum_link( $big ) ),
|
546 |
'format' => '?paged=%#%',
|
547 |
'current' => max( 1, $query['paged'] ),
|
548 |
'total' => $downloads->max_num_pages
|
549 |
), $atts, $downloads, $query ) );
|
550 |
}
|
551 |
-
|
|
|
|
|
|
|
|
|
552 |
</div>
|
|
|
553 |
|
554 |
</div>
|
555 |
<?php
|
528 |
|
529 |
<?php wp_reset_postdata(); ?>
|
530 |
|
531 |
+
<?php
|
532 |
+
$pagination = false;
|
533 |
+
|
534 |
if ( is_single() ) {
|
535 |
+
$pagination = paginate_links( apply_filters( 'edd_download_pagination_args', array(
|
536 |
'base' => get_permalink() . '%#%',
|
537 |
'format' => '?paged=%#%',
|
538 |
'current' => max( 1, $query['paged'] ),
|
542 |
$big = 999999;
|
543 |
$search_for = array( $big, '#038;' );
|
544 |
$replace_with = array( '%#%', '&' );
|
545 |
+
$pagination = paginate_links( apply_filters( 'edd_download_pagination_args', array(
|
546 |
'base' => str_replace( $search_for, $replace_with, get_pagenum_link( $big ) ),
|
547 |
'format' => '?paged=%#%',
|
548 |
'current' => max( 1, $query['paged'] ),
|
549 |
'total' => $downloads->max_num_pages
|
550 |
), $atts, $downloads, $query ) );
|
551 |
}
|
552 |
+
?>
|
553 |
+
|
554 |
+
<?php if ( ! empty( $pagination ) ) : ?>
|
555 |
+
<div id="edd_download_pagination" class="navigation">
|
556 |
+
<?php echo $pagination; ?>
|
557 |
</div>
|
558 |
+
<?php endif; ?>
|
559 |
|
560 |
</div>
|
561 |
<?php
|
languages/edd-af.mo
CHANGED
Binary file
|
languages/edd-an.mo
CHANGED
Binary file
|
languages/edd-ar.mo
CHANGED
Binary file
|
languages/edd-az.mo
CHANGED
Binary file
|
languages/edd-be.mo
CHANGED
Binary file
|
languages/edd-bg.mo
CHANGED
Binary file
|
languages/edd-bg_BG.mo
CHANGED
Binary file
|
languages/edd-bn_BD.mo
CHANGED
Binary file
|
languages/edd-bs_BA.mo
CHANGED
Binary file
|
languages/edd-ca.mo
CHANGED
Binary file
|
languages/edd-co.mo
CHANGED
Binary file
|
languages/edd-cs_CZ.mo
CHANGED
Binary file
|
languages/edd-cy.mo
CHANGED
Binary file
|
languages/edd-da_DK.mo
CHANGED
Binary file
|
languages/edd-de_CH.mo
CHANGED
Binary file
|
languages/edd-de_DE.mo
CHANGED
Binary file
|
languages/edd-el.mo
CHANGED
Binary file
|
languages/edd-en_AU.mo
CHANGED
Binary file
|
languages/edd-en_CA.mo
CHANGED
Binary file
|
languages/edd-en_GB.mo
CHANGED
Binary file
|
languages/edd-eo.mo
CHANGED
Binary file
|
languages/edd-es_AR.mo
CHANGED
Binary file
|
languages/edd-es_CL.mo
CHANGED
Binary file
|
languages/edd-es_ES.mo
CHANGED
Binary file
|
languages/edd-es_MX.mo
CHANGED
Binary file
|
languages/edd-es_PE.mo
CHANGED
Binary file
|
languages/edd-es_VE.mo
CHANGED
Binary file
|
languages/edd-et.mo
CHANGED
Binary file
|
languages/edd-eu.mo
CHANGED
Binary file
|
languages/edd-fa_IR.mo
CHANGED
Binary file
|
languages/edd-fi.mo
CHANGED
Binary file
|
languages/edd-fo.mo
CHANGED
Binary file
|
languages/edd-fr_FR.mo
CHANGED
Binary file
|
languages/edd-fy.mo
CHANGED
Binary file
|
languages/edd-ga.mo
CHANGED
Binary file
|
languages/edd-gd.mo
CHANGED
Binary file
|
languages/edd-gl_ES.mo
CHANGED
Binary file
|
languages/edd-he_IL.mo
CHANGED
Binary file
|
languages/edd-hi_IN.mo
CHANGED
Binary file
|
languages/edd-hr.mo
CHANGED
Binary file
|
languages/edd-hu_HU.mo
CHANGED
Binary file
|
languages/edd-id_ID.mo
CHANGED
Binary file
|
languages/edd-is_IS.mo
CHANGED
Binary file
|
languages/edd-it_IT.mo
CHANGED
Binary file
|
languages/edd-ja.mo
CHANGED
Binary file
|
languages/edd-jv.mo
CHANGED
Binary file
|
languages/edd-ka.mo
CHANGED
Binary file
|
languages/edd-ka_GE.mo
CHANGED
Binary file
|
languages/edd-kk.mo
CHANGED
Binary file
|
languages/edd-km.mo
CHANGED
Binary file
|
languages/edd-kn.mo
CHANGED
Binary file
|
languages/edd-ko_KR.mo
CHANGED
Binary file
|
languages/edd-ky.mo
CHANGED
Binary file
|
languages/edd-lo.mo
CHANGED
Binary file
|
languages/edd-lt_LT.mo
CHANGED
Binary file
|
languages/edd-lv.mo
CHANGED
Binary file
|
languages/edd-mg.mo
CHANGED
Binary file
|
languages/edd-mk_MK.mo
CHANGED
Binary file
|
languages/edd-mn.mo
CHANGED
Binary file
|
languages/edd-ms_MY.mo
CHANGED
Binary file
|
languages/edd-my_MM.mo
CHANGED
Binary file
|
languages/edd-nb_NO.mo
CHANGED
Binary file
|
languages/edd-ne_NP.mo
CHANGED
Binary file
|
languages/edd-nl_NL.mo
CHANGED
Binary file
|
languages/edd-nn_NO.mo
CHANGED
Binary file
|
languages/edd-oc.mo
CHANGED
Binary file
|
languages/edd-os.mo
CHANGED
Binary file
|
languages/edd-pl_PL.mo
CHANGED
Binary file
|
languages/edd-ps.mo
CHANGED
Binary file
|
languages/edd-pt_BR.mo
CHANGED
Binary file
|
languages/edd-pt_PT.mo
CHANGED
Binary file
|
languages/edd-ro_RO.mo
CHANGED
Binary file
|
languages/edd-ru_RU.mo
CHANGED
Binary file
|
languages/edd-sah.mo
CHANGED
Binary file
|
languages/edd-si_LK.mo
CHANGED
Binary file
|
languages/edd-sk_SK.mo
CHANGED
Binary file
|
languages/edd-sl_SI.mo
CHANGED
Binary file
|
languages/edd-so.mo
CHANGED
Binary file
|
languages/edd-sq.mo
CHANGED
Binary file
|
languages/edd-sr_RS.mo
CHANGED
Binary file
|
languages/edd-su.mo
CHANGED
Binary file
|
languages/edd-sv_SE.mo
CHANGED
Binary file
|
languages/edd-sw.mo
CHANGED
Binary file
|
languages/edd-ta_IN.mo
CHANGED
Binary file
|
languages/edd-ta_LK.mo
CHANGED
Binary file
|
languages/edd-te.mo
CHANGED
Binary file
|
languages/edd-tg.mo
CHANGED
Binary file
|
languages/edd-th.mo
CHANGED
Binary file
|
languages/edd-tl.mo
CHANGED
Binary file
|
languages/edd-tr_TR.mo
CHANGED
Binary file
|
languages/edd-ug.mo
CHANGED
Binary file
|
languages/edd-uk.mo
CHANGED
Binary file
|
languages/edd-ur.mo
CHANGED
Binary file
|
languages/edd-uz.mo
CHANGED
Binary file
|
languages/edd-vi.mo
CHANGED
Binary file
|
languages/edd-zh_CN.mo
CHANGED
Binary file
|
languages/edd-zh_TW.mo
CHANGED
Binary file
|
languages/edd.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Easy Digital Downloads 2.3.
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
-
"POT-Creation-Date: 2015-04-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -940,7 +940,7 @@ msgstr ""
|
|
940 |
#: includes/admin/discounts/class-discount-codes-table.php:274
|
941 |
#: includes/admin/payments/class-payments-table.php:302
|
942 |
#: includes/admin/payments/class-payments-table.php:375
|
943 |
-
#: includes/payments/functions.php:
|
944 |
msgid "Delete"
|
945 |
msgstr ""
|
946 |
|
@@ -1523,27 +1523,27 @@ msgid "Completed"
|
|
1523 |
msgstr ""
|
1524 |
|
1525 |
#: includes/admin/payments/class-payments-table.php:201
|
1526 |
-
#: includes/payments/functions.php:
|
1527 |
msgid "Pending"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
#: includes/admin/payments/class-payments-table.php:202
|
1531 |
-
#: includes/payments/functions.php:
|
1532 |
msgid "Refunded"
|
1533 |
msgstr ""
|
1534 |
|
1535 |
#: includes/admin/payments/class-payments-table.php:203
|
1536 |
-
#: includes/payments/functions.php:
|
1537 |
msgid "Revoked"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
#: includes/admin/payments/class-payments-table.php:204
|
1541 |
-
#: includes/payments/functions.php:
|
1542 |
msgid "Failed"
|
1543 |
msgstr ""
|
1544 |
|
1545 |
#: includes/admin/payments/class-payments-table.php:205
|
1546 |
-
#: includes/payments/functions.php:
|
1547 |
msgid "Abandoned"
|
1548 |
msgstr ""
|
1549 |
|
@@ -3567,6 +3567,7 @@ msgid ""
|
|
3567 |
msgstr ""
|
3568 |
|
3569 |
#: includes/admin/upgrades/upgrade-functions.php:108
|
|
|
3570 |
msgid ""
|
3571 |
"Easy Digital Downloads needs to upgrade the payment database, click <a "
|
3572 |
"href=\"%s\">here</a> to start the upgrade."
|
@@ -3578,12 +3579,6 @@ msgid ""
|
|
3578 |
"href=\"%s\">here</a> to start the upgrade."
|
3579 |
msgstr ""
|
3580 |
|
3581 |
-
#: includes/admin/upgrades/upgrade-functions.php:122
|
3582 |
-
msgid ""
|
3583 |
-
"Easy Digital Downloads needs to upgrade the payments database, click <a "
|
3584 |
-
"href=\"%s\">here</a> to start the upgrade."
|
3585 |
-
msgstr ""
|
3586 |
-
|
3587 |
#: includes/admin/upgrades/upgrade-functions.php:153
|
3588 |
#: includes/admin/upgrades/upgrade-functions.php:506
|
3589 |
#: includes/admin/upgrades/upgrade-functions.php:588
|
@@ -5585,15 +5580,15 @@ msgstr ""
|
|
5585 |
msgid "Status changed from %s to %s"
|
5586 |
msgstr ""
|
5587 |
|
5588 |
-
#: includes/payments/functions.php:
|
5589 |
msgid "Complete"
|
5590 |
msgstr ""
|
5591 |
|
5592 |
-
#: includes/payments/functions.php:
|
5593 |
msgid "EDD Bot"
|
5594 |
msgstr ""
|
5595 |
|
5596 |
-
#: includes/payments/functions.php:
|
5597 |
msgid "Delete this payment note"
|
5598 |
msgstr ""
|
5599 |
|
@@ -6540,4 +6535,4 @@ msgstr ""
|
|
6540 |
#: includes/post-types.php:310
|
6541 |
msgctxt "Inactive discount code status"
|
6542 |
msgid "Inactive"
|
6543 |
-
msgstr ""
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Easy Digital Downloads 2.3.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
+
"POT-Creation-Date: 2015-04-29 07:28:25+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
940 |
#: includes/admin/discounts/class-discount-codes-table.php:274
|
941 |
#: includes/admin/payments/class-payments-table.php:302
|
942 |
#: includes/admin/payments/class-payments-table.php:375
|
943 |
+
#: includes/payments/functions.php:1572
|
944 |
msgid "Delete"
|
945 |
msgstr ""
|
946 |
|
1523 |
msgstr ""
|
1524 |
|
1525 |
#: includes/admin/payments/class-payments-table.php:201
|
1526 |
+
#: includes/payments/functions.php:604
|
1527 |
msgid "Pending"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
#: includes/admin/payments/class-payments-table.php:202
|
1531 |
+
#: includes/payments/functions.php:606
|
1532 |
msgid "Refunded"
|
1533 |
msgstr ""
|
1534 |
|
1535 |
#: includes/admin/payments/class-payments-table.php:203
|
1536 |
+
#: includes/payments/functions.php:609
|
1537 |
msgid "Revoked"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
#: includes/admin/payments/class-payments-table.php:204
|
1541 |
+
#: includes/payments/functions.php:607
|
1542 |
msgid "Failed"
|
1543 |
msgstr ""
|
1544 |
|
1545 |
#: includes/admin/payments/class-payments-table.php:205
|
1546 |
+
#: includes/payments/functions.php:608
|
1547 |
msgid "Abandoned"
|
1548 |
msgstr ""
|
1549 |
|
3567 |
msgstr ""
|
3568 |
|
3569 |
#: includes/admin/upgrades/upgrade-functions.php:108
|
3570 |
+
#: includes/admin/upgrades/upgrade-functions.php:122
|
3571 |
msgid ""
|
3572 |
"Easy Digital Downloads needs to upgrade the payment database, click <a "
|
3573 |
"href=\"%s\">here</a> to start the upgrade."
|
3579 |
"href=\"%s\">here</a> to start the upgrade."
|
3580 |
msgstr ""
|
3581 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3582 |
#: includes/admin/upgrades/upgrade-functions.php:153
|
3583 |
#: includes/admin/upgrades/upgrade-functions.php:506
|
3584 |
#: includes/admin/upgrades/upgrade-functions.php:588
|
5580 |
msgid "Status changed from %s to %s"
|
5581 |
msgstr ""
|
5582 |
|
5583 |
+
#: includes/payments/functions.php:605
|
5584 |
msgid "Complete"
|
5585 |
msgstr ""
|
5586 |
|
5587 |
+
#: includes/payments/functions.php:1557
|
5588 |
msgid "EDD Bot"
|
5589 |
msgstr ""
|
5590 |
|
5591 |
+
#: includes/payments/functions.php:1572
|
5592 |
msgid "Delete this payment note"
|
5593 |
msgstr ""
|
5594 |
|
6535 |
#: includes/post-types.php:310
|
6536 |
msgctxt "Inactive discount code status"
|
6537 |
msgid "Inactive"
|
6538 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== Easy Digital Downloads ===
|
2 |
-
Author URI:
|
3 |
-
Plugin URI:
|
4 |
Contributors: mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702, cklosows, sksmatt, SpencerFinnell
|
5 |
-
Donate link:
|
6 |
Tags: download, downloads, e-store, eshop, digital downloads, e-downloads, ecommerce, e commerce, e-commerce, selling, wp-ecommerce, wp ecommerce, mordauk, Pippin Williamson, pippinsplugins
|
7 |
Requires at least: 3.9.2
|
8 |
Tested up to: 4.2
|
9 |
|
10 |
-
Stable Tag: 2.3.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -36,7 +36,7 @@ Features of the plugin include:
|
|
36 |
|
37 |
More information at [Easy Digital Downloads.com](https://easydigitaldownloads.com/?utm_source=home&utm_medium=description_tab&utm_content=home&utm_campaign=readme).
|
38 |
|
39 |
-
[youtube
|
40 |
|
41 |
**Follow this plugin on [GitHub](https://github.com/easydigitaldownloads/Easy-Digital-Downloads)**
|
42 |
|
@@ -48,7 +48,7 @@ Includes a complete integration pack for delivering automatic upgrades for premi
|
|
48 |
|
49 |
**Build Up Your Email Subscribers**
|
50 |
|
51 |
-
With extensions for [
|
52 |
|
53 |
**Languages**
|
54 |
|
@@ -89,7 +89,7 @@ Would you like to help translate the plugin into more languages? [Join our WP-Tr
|
|
89 |
2. Go to Downloads > Settings and configure the options
|
90 |
3. Create Downloadable products from the Downloads page
|
91 |
4. Insert purchase buttons for any download via the "Insert Download" button next the Upload Media buttons
|
92 |
-
5. For detailed setup instructions, vist the official [Documentation](
|
93 |
|
94 |
== Frequently Asked Questions ==
|
95 |
|
@@ -138,13 +138,13 @@ Yes, EDD has an extension that allows for downloadable invoices to be generated
|
|
138 |
|
139 |
Yes, through the addition of one or more of the add-on payment gateways, you can accept payments in many different ways. The add-on gateways currently available:
|
140 |
|
141 |
-
* [Stripe](
|
142 |
-
* [Recurly](
|
143 |
-
* [Authorize.net](
|
144 |
* [Google Wallet](https://easydigitaldownloads.com/extensions/google-checkout/?utm_source=gateway&utm_medium=faq_tab&utm_content=google-checkout&utm_campaign=readme)
|
145 |
-
* [Moneybookers / Skrill](
|
146 |
-
* [2Checkout](
|
147 |
-
* [PayPal Pro/Express](
|
148 |
* [PayPal Adaptive Payments](https://easydigitaldownloads.com/extensions/paypal-adaptive-payments/?utm_source=gateway&utm_medium=faq_tab&utm_content=paypal-adaptive-payments&utm_campaign=readme)
|
149 |
* [GoCardless](https://easydigitaldownloads.com/extensions/gocardless-payment-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=gocardless-payment-gateway&utm_campaign=readme)
|
150 |
* [Amazon FPS](https://easydigitaldownloads.com/extensions/amazon-fps-payment-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=amazon-fps-payment-gateway&utm_campaign=readme)
|
@@ -191,13 +191,27 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 2.3.8, April 27, 2015 =
|
195 |
|
196 |
* Fix: Customer stats incrementing with attaching payment to customer, if payment is already attached
|
197 |
* Fix: edd_get_file_download_method called too late during download process
|
198 |
* Update: Translations Updated
|
199 |
* Tweak: Improvements to the EDD Extensions page
|
200 |
-
*
|
201 |
|
202 |
= 2.3.7, April 20, 2015 =
|
203 |
|
1 |
=== Easy Digital Downloads ===
|
2 |
+
Author URI: https://pippinsplugins.com
|
3 |
+
Plugin URI: https://easydigitaldownloads.com
|
4 |
Contributors: mordauk, sunnyratilal, chriscct7, section214, sumobi, sdavis2702, cklosows, sksmatt, SpencerFinnell
|
5 |
+
Donate link: https://pippinsplugins.com/support-the-site
|
6 |
Tags: download, downloads, e-store, eshop, digital downloads, e-downloads, ecommerce, e commerce, e-commerce, selling, wp-ecommerce, wp ecommerce, mordauk, Pippin Williamson, pippinsplugins
|
7 |
Requires at least: 3.9.2
|
8 |
Tested up to: 4.2
|
9 |
|
10 |
+
Stable Tag: 2.3.9
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
36 |
|
37 |
More information at [Easy Digital Downloads.com](https://easydigitaldownloads.com/?utm_source=home&utm_medium=description_tab&utm_content=home&utm_campaign=readme).
|
38 |
|
39 |
+
[youtube https://www.youtube.com/watch?v=japHPcIFs4I]
|
40 |
|
41 |
**Follow this plugin on [GitHub](https://github.com/easydigitaldownloads/Easy-Digital-Downloads)**
|
42 |
|
48 |
|
49 |
**Build Up Your Email Subscribers**
|
50 |
|
51 |
+
With extensions for [MailChimp](https://easydigitaldownloads.com/extensions/mail-chimp/?utm_source=extension&utm_medium=description_tab&utm_content=mail-chimp&utm_campaign=readme), [Campaign Monitor](https://easydigitaldownloads.com/extensions/campaign-monitor/?utm_source=extension&utm_medium=description_tab&utm_content=campaign-monitor&utm_campaign=readme), and [AWeber](https://easydigitaldownloads.com/extensions/aweber/?utm_source=extension&utm_medium=description_tab&utm_content=aweber&utm_campaign=readme), [Wysija](https://easydigitaldownloads.com/extensions/wysija/?utm_source=extension&utm_medium=description_tab&utm_content=wysija&utm_campaign=readme), [ActiveCampaign](https://easydigitaldownloads.com/extensions/active-campaign/?utm_source=extension&utm_medium=description_tab&utm_content=active-campaign&utm_campaign=readme), [iContact](https://easydigitaldownloads.com/extensions/icontact/?utm_source=extension&utm_medium=description_tab&utm_content=icontact&utm_campaign=readme), [Constant Contact](https://easydigitaldownloads.com/extensions/constant-contact/?utm_source=extension&utm_medium=description_tab&utm_content=constant-contact&utm_campaign=readme), and more, Easy Digital Downloads can easily grow your email subscription lists while making you money at the same time.
|
52 |
|
53 |
**Languages**
|
54 |
|
89 |
2. Go to Downloads > Settings and configure the options
|
90 |
3. Create Downloadable products from the Downloads page
|
91 |
4. Insert purchase buttons for any download via the "Insert Download" button next the Upload Media buttons
|
92 |
+
5. For detailed setup instructions, vist the official [Documentation](https://easydigitaldownloads.com/documentation/?utm_source=docs&utm_medium=installation_tab&utm_content=documentation&utm_campaign=readme) page.
|
93 |
|
94 |
== Frequently Asked Questions ==
|
95 |
|
138 |
|
139 |
Yes, through the addition of one or more of the add-on payment gateways, you can accept payments in many different ways. The add-on gateways currently available:
|
140 |
|
141 |
+
* [Stripe](https://easydigitaldownloads.com/extensions/stripe-payment-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=stripe-payment-gateway&utm_campaign=readme)
|
142 |
+
* [Recurly](https://easydigitaldownloads.com/extensions/recurly-com-checkout/?utm_source=gateway&utm_medium=faq_tab&utm_content=recurly-com-checkout&utm_campaign=readme)
|
143 |
+
* [Authorize.net](https://easydigitaldownloads.com/extensions/authorize-net-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=authorize-net-gateway&utm_campaign=readme)
|
144 |
* [Google Wallet](https://easydigitaldownloads.com/extensions/google-checkout/?utm_source=gateway&utm_medium=faq_tab&utm_content=google-checkout&utm_campaign=readme)
|
145 |
+
* [Moneybookers / Skrill](https://easydigitaldownloads.com/extensions/moneybookers-skrill-payment-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=moneybookers-skrill-payment-gateway&utm_campaign=readme)
|
146 |
+
* [2Checkout](https://easydigitaldownloads.com/extensions/2checkout-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=2checkout-gateway&utm_campaign=readme)
|
147 |
+
* [PayPal Pro/Express](https://easydigitaldownloads.com/extensions/paypal-pro-express/?utm_source=gateway&utm_medium=faq_tab&utm_content=paypal-pro-express&utm_campaign=readme)
|
148 |
* [PayPal Adaptive Payments](https://easydigitaldownloads.com/extensions/paypal-adaptive-payments/?utm_source=gateway&utm_medium=faq_tab&utm_content=paypal-adaptive-payments&utm_campaign=readme)
|
149 |
* [GoCardless](https://easydigitaldownloads.com/extensions/gocardless-payment-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=gocardless-payment-gateway&utm_campaign=readme)
|
150 |
* [Amazon FPS](https://easydigitaldownloads.com/extensions/amazon-fps-payment-gateway/?utm_source=gateway&utm_medium=faq_tab&utm_content=amazon-fps-payment-gateway&utm_campaign=readme)
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 2.3.9, May 25, 2015 =
|
195 |
+
|
196 |
+
* Fix: Variable price assignment options get removed from download when deleting file row
|
197 |
+
* Fix: Pagination container still shown when no pagination is needed
|
198 |
+
* Fix: Airplane Mode load order can cause problems
|
199 |
+
* Fix: Rewrites hard flushed during activation instead of soft flushed
|
200 |
+
* Fix: Log records not recording post_date_gmt
|
201 |
+
* Fix: Slashes not stripped from customer name in Customer Details view
|
202 |
+
* Fix: "Apply to whole country" tax setting not saved on first save
|
203 |
+
* Fix: Trashed downloads can be purchased with custom add to cart URLs
|
204 |
+
* Tweak: Added filters to join and where clauses in edd_count_payments()
|
205 |
+
* Tweak: Improved logic and flexibility for Products endpoint of the REST API
|
206 |
+
|
207 |
+
|
208 |
= 2.3.8, April 27, 2015 =
|
209 |
|
210 |
* Fix: Customer stats incrementing with attaching payment to customer, if payment is already attached
|
211 |
* Fix: edd_get_file_download_method called too late during download process
|
212 |
* Update: Translations Updated
|
213 |
* Tweak: Improvements to the EDD Extensions page
|
214 |
+
* Tweak: Corrections and updates to readme.txt
|
215 |
|
216 |
= 2.3.7, April 20, 2015 =
|
217 |
|
uninstall.php
CHANGED
@@ -23,7 +23,7 @@ if( edd_get_option( 'uninstall_on_delete' ) ) {
|
|
23 |
$edd_taxonomies = array( 'download_category', 'download_tag', 'edd_log_type', );
|
24 |
$edd_post_types = array( 'download', 'edd_payment', 'edd_discount', 'edd_log' );
|
25 |
foreach ( $edd_post_types as $post_type ) {
|
26 |
-
|
27 |
$edd_taxonomies = array_merge( $edd_taxonomies, get_object_taxonomies( $post_type ) );
|
28 |
$items = get_posts( array( 'post_type' => $post_type, 'post_status' => 'any', 'numberposts' => -1, 'fields' => 'ids' ) );
|
29 |
|
@@ -36,9 +36,9 @@ if( edd_get_option( 'uninstall_on_delete' ) ) {
|
|
36 |
|
37 |
/** Delete All the Terms & Taxonomies */
|
38 |
foreach ( array_unique( array_filter( $edd_taxonomies ) ) as $taxonomy ) {
|
39 |
-
|
40 |
$terms = $wpdb->get_results( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('%s') ORDER BY t.name ASC", $taxonomy ) );
|
41 |
-
|
42 |
// Delete Terms
|
43 |
if ( $terms ) {
|
44 |
foreach ( $terms as $term ) {
|
@@ -46,7 +46,7 @@ if( edd_get_option( 'uninstall_on_delete' ) ) {
|
|
46 |
$wpdb->delete( $wpdb->terms, array( 'term_id' => $term->term_id ) );
|
47 |
}
|
48 |
}
|
49 |
-
|
50 |
// Delete Taxonomies
|
51 |
$wpdb->delete( $wpdb->term_taxonomy, array( 'taxonomy' => $taxonomy ), array( '%s' ) );
|
52 |
}
|
@@ -62,6 +62,7 @@ if( edd_get_option( 'uninstall_on_delete' ) ) {
|
|
62 |
|
63 |
/** Delete all the Plugin Options */
|
64 |
delete_option( 'edd_settings' );
|
|
|
65 |
|
66 |
/** Delete Capabilities */
|
67 |
EDD()->roles->remove_caps();
|
23 |
$edd_taxonomies = array( 'download_category', 'download_tag', 'edd_log_type', );
|
24 |
$edd_post_types = array( 'download', 'edd_payment', 'edd_discount', 'edd_log' );
|
25 |
foreach ( $edd_post_types as $post_type ) {
|
26 |
+
|
27 |
$edd_taxonomies = array_merge( $edd_taxonomies, get_object_taxonomies( $post_type ) );
|
28 |
$items = get_posts( array( 'post_type' => $post_type, 'post_status' => 'any', 'numberposts' => -1, 'fields' => 'ids' ) );
|
29 |
|
36 |
|
37 |
/** Delete All the Terms & Taxonomies */
|
38 |
foreach ( array_unique( array_filter( $edd_taxonomies ) ) as $taxonomy ) {
|
39 |
+
|
40 |
$terms = $wpdb->get_results( $wpdb->prepare( "SELECT t.*, tt.* FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('%s') ORDER BY t.name ASC", $taxonomy ) );
|
41 |
+
|
42 |
// Delete Terms
|
43 |
if ( $terms ) {
|
44 |
foreach ( $terms as $term ) {
|
46 |
$wpdb->delete( $wpdb->terms, array( 'term_id' => $term->term_id ) );
|
47 |
}
|
48 |
}
|
49 |
+
|
50 |
// Delete Taxonomies
|
51 |
$wpdb->delete( $wpdb->term_taxonomy, array( 'taxonomy' => $taxonomy ), array( '%s' ) );
|
52 |
}
|
62 |
|
63 |
/** Delete all the Plugin Options */
|
64 |
delete_option( 'edd_settings' );
|
65 |
+
delete_option( 'edd_version' );
|
66 |
|
67 |
/** Delete Capabilities */
|
68 |
EDD()->roles->remove_caps();
|