Version Description
Download this release
Release Info
Developer | mordauk |
Plugin | Easy Digital Downloads |
Version | 2.5.3 |
Comparing to | |
See all releases |
Code changes from version 2.5.2 to 2.5.3
easy-digital-downloads.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Serve Digital Downloads Through WordPress.
|
6 |
* Author: Pippin Williamson and Company
|
7 |
* Author URI: https://easydigitaldownloads.com
|
8 |
-
* Version: 2.5.
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -25,7 +25,7 @@
|
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
-
* @version 2.5.
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
@@ -186,7 +186,7 @@ final class Easy_Digital_Downloads {
|
|
186 |
|
187 |
// Plugin version.
|
188 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
189 |
-
define( 'EDD_VERSION', '2.5.
|
190 |
}
|
191 |
|
192 |
// Plugin Folder Path.
|
5 |
* Description: Serve Digital Downloads Through WordPress.
|
6 |
* Author: Pippin Williamson and Company
|
7 |
* Author URI: https://easydigitaldownloads.com
|
8 |
+
* Version: 2.5.3
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
+
* @version 2.5.3
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
186 |
|
187 |
// Plugin version.
|
188 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
189 |
+
define( 'EDD_VERSION', '2.5.3' );
|
190 |
}
|
191 |
|
192 |
// Plugin Folder Path.
|
includes/admin/discounts/class-discount-codes-table.php
CHANGED
@@ -146,7 +146,6 @@ class EDD_Discount_Codes_Table extends WP_List_Table {
|
|
146 |
'code' => __( 'Code', 'easy-digital-downloads' ),
|
147 |
'amount' => __( 'Amount', 'easy-digital-downloads' ),
|
148 |
'uses' => __( 'Uses', 'easy-digital-downloads' ),
|
149 |
-
'max_uses' => __( 'Max Uses', 'easy-digital-downloads' ),
|
150 |
'start_date' => __( 'Start Date', 'easy-digital-downloads' ),
|
151 |
'expiration' => __( 'Expiration', 'easy-digital-downloads' ),
|
152 |
'status' => __( 'Status', 'easy-digital-downloads' ),
|
@@ -388,12 +387,6 @@ class EDD_Discount_Codes_Table extends WP_List_Table {
|
|
388 |
$uses = edd_get_discount_uses( $discount->ID );
|
389 |
}
|
390 |
|
391 |
-
if ( edd_get_discount_max_uses( $discount->ID ) ) {
|
392 |
-
$max_uses = edd_get_discount_max_uses( $discount->ID ) ? edd_get_discount_max_uses( $discount->ID ) : __( 'unlimited', 'easy-digital-downloads' );
|
393 |
-
} else {
|
394 |
-
$max_uses = __( 'Unlimited', 'easy-digital-downloads' );
|
395 |
-
}
|
396 |
-
|
397 |
$start_date = edd_get_discount_start_date( $discount->ID );
|
398 |
|
399 |
if ( ! empty( $start_date ) ) {
|
@@ -414,7 +407,6 @@ class EDD_Discount_Codes_Table extends WP_List_Table {
|
|
414 |
'code' => edd_get_discount_code( $discount->ID ),
|
415 |
'amount' => edd_format_discount_rate( edd_get_discount_type( $discount->ID ), edd_get_discount_amount( $discount->ID ) ),
|
416 |
'uses' => $uses,
|
417 |
-
'max_uses' => $max_uses,
|
418 |
'start_date' => $discount_start_date,
|
419 |
'expiration' => $expiration,
|
420 |
'status' => edd_is_discount_expired( $discount->ID ) ? 'expired' : $discount->post_status,
|
146 |
'code' => __( 'Code', 'easy-digital-downloads' ),
|
147 |
'amount' => __( 'Amount', 'easy-digital-downloads' ),
|
148 |
'uses' => __( 'Uses', 'easy-digital-downloads' ),
|
|
|
149 |
'start_date' => __( 'Start Date', 'easy-digital-downloads' ),
|
150 |
'expiration' => __( 'Expiration', 'easy-digital-downloads' ),
|
151 |
'status' => __( 'Status', 'easy-digital-downloads' ),
|
387 |
$uses = edd_get_discount_uses( $discount->ID );
|
388 |
}
|
389 |
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
$start_date = edd_get_discount_start_date( $discount->ID );
|
391 |
|
392 |
if ( ! empty( $start_date ) ) {
|
407 |
'code' => edd_get_discount_code( $discount->ID ),
|
408 |
'amount' => edd_format_discount_rate( edd_get_discount_type( $discount->ID ), edd_get_discount_amount( $discount->ID ) ),
|
409 |
'uses' => $uses,
|
|
|
410 |
'start_date' => $discount_start_date,
|
411 |
'expiration' => $expiration,
|
412 |
'status' => edd_is_discount_expired( $discount->ID ) ? 'expired' : $discount->post_status,
|
includes/payments/class-edd-payment.php
CHANGED
@@ -486,10 +486,6 @@ final class EDD_Payment {
|
|
486 |
$payment_title = $this->email;
|
487 |
}
|
488 |
|
489 |
-
if ( empty( $payment_title ) ) {
|
490 |
-
return false;
|
491 |
-
}
|
492 |
-
|
493 |
if( empty( $this->date ) ) {
|
494 |
$this->date = date( 'Y-m-d H:i:s', current_time( 'timestamp' ) );
|
495 |
}
|
@@ -692,7 +688,7 @@ final class EDD_Payment {
|
|
692 |
case 'fees':
|
693 |
|
694 |
if ( 'publish' !== $this->status && 'complete' !== $this->status && 'revoked' !== $this->status ) {
|
695 |
-
break;
|
696 |
}
|
697 |
|
698 |
if ( empty( $this->pending[ $key ] ) ) {
|
486 |
$payment_title = $this->email;
|
487 |
}
|
488 |
|
|
|
|
|
|
|
|
|
489 |
if( empty( $this->date ) ) {
|
490 |
$this->date = date( 'Y-m-d H:i:s', current_time( 'timestamp' ) );
|
491 |
}
|
688 |
case 'fees':
|
689 |
|
690 |
if ( 'publish' !== $this->status && 'complete' !== $this->status && 'revoked' !== $this->status ) {
|
691 |
+
break;
|
692 |
}
|
693 |
|
694 |
if ( empty( $this->pending[ $key ] ) ) {
|
includes/payments/functions.php
CHANGED
@@ -147,6 +147,7 @@ function edd_insert_payment( $payment_data = array() ) {
|
|
147 |
$gateway = ! empty( $payment_data['gateway'] ) ? $payment_data['gateway'] : '';
|
148 |
$gateway = empty( $gateway ) && isset( $_POST['edd-gateway'] ) ? $_POST['edd-gateway'] : $gateway;
|
149 |
|
|
|
150 |
$payment->currency = $payment_data['currency'];
|
151 |
$payment->user_info = $payment_data['user_info'];
|
152 |
$payment->gateway = $gateway;
|
@@ -750,12 +751,17 @@ function edd_get_sales_by_date( $day = null, $month_num = null, $year = null, $h
|
|
750 |
* @param int $payment_id Payment ID to check against
|
751 |
* @return bool true if complete, false otherwise
|
752 |
*/
|
753 |
-
function edd_is_payment_complete( $payment_id ) {
|
754 |
$payment = new EDD_Payment( $payment_id );
|
755 |
|
756 |
$ret = false;
|
757 |
-
|
758 |
-
|
|
|
|
|
|
|
|
|
|
|
759 |
}
|
760 |
|
761 |
return apply_filters( 'edd_is_payment_complete', $ret, $payment_id, $payment->post_status );
|
147 |
$gateway = ! empty( $payment_data['gateway'] ) ? $payment_data['gateway'] : '';
|
148 |
$gateway = empty( $gateway ) && isset( $_POST['edd-gateway'] ) ? $_POST['edd-gateway'] : $gateway;
|
149 |
|
150 |
+
$payment->status = ! empty( $payment_data['status'] ) ? $payment_data['status'] : 'pending';
|
151 |
$payment->currency = $payment_data['currency'];
|
152 |
$payment->user_info = $payment_data['user_info'];
|
153 |
$payment->gateway = $gateway;
|
751 |
* @param int $payment_id Payment ID to check against
|
752 |
* @return bool true if complete, false otherwise
|
753 |
*/
|
754 |
+
function edd_is_payment_complete( $payment_id = 0 ) {
|
755 |
$payment = new EDD_Payment( $payment_id );
|
756 |
|
757 |
$ret = false;
|
758 |
+
|
759 |
+
if( $payment->ID > 0 ) {
|
760 |
+
|
761 |
+
if ( (int) $payment_id === (int) $payment->ID && 'publish' == $payment->status ) {
|
762 |
+
$ret = true;
|
763 |
+
}
|
764 |
+
|
765 |
}
|
766 |
|
767 |
return apply_filters( 'edd_is_payment_complete', $ret, $payment_id, $payment->post_status );
|
readme.txt
CHANGED
@@ -6,8 +6,7 @@ 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: 4.0
|
8 |
Tested up to: 4.5
|
9 |
-
|
10 |
-
Stable Tag: 2.5.2
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -215,6 +214,13 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
|
|
215 |
|
216 |
== Changelog ==
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
= 2.5.2, January 8, 2016 =
|
219 |
|
220 |
* Fix: Item specific fees applying twice
|
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: 4.0
|
8 |
Tested up to: 4.5
|
9 |
+
Stable Tag: 2.5.3
|
|
|
10 |
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
214 |
|
215 |
== Changelog ==
|
216 |
|
217 |
+
= 2.5.3, January 9, 2016 =
|
218 |
+
|
219 |
+
* Fix: Status passed to edd_insert_payment() not respected. Caused subscription payments to be marked as pending
|
220 |
+
* Fix: edd_is_payment_complete() returns false improperly
|
221 |
+
* Fix: Buy Now links going to empty checkout screen when customer is not logged in
|
222 |
+
* Tweak: Removed redundant Max Uses column on Discounts screen
|
223 |
+
|
224 |
= 2.5.2, January 8, 2016 =
|
225 |
|
226 |
* Fix: Item specific fees applying twice
|