Easy Digital Downloads - Version 2.5.1

Version Description

Download this release

Release Info

Developer mordauk
Plugin Icon 128x128 Easy Digital Downloads
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.5 to 2.5.1

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.1
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.1
29
  */
30
 
31
  // Exit if accessed directly.
186
 
187
  // Plugin version.
188
  if ( ! defined( 'EDD_VERSION' ) ) {
189
+ define( 'EDD_VERSION', '2.5.1' );
190
  }
191
 
192
  // Plugin Folder Path.
includes/admin/payments/actions.php CHANGED
@@ -96,7 +96,7 @@ function edd_update_payment_details( $data ) {
96
  // Set some defaults
97
  $args = array(
98
  'quantity' => $quantity,
99
- 'amount' => $amount,
100
  'price_id' => $price_id,
101
  );
102
 
96
  // Set some defaults
97
  $args = array(
98
  'quantity' => $quantity,
99
+ 'item_price' => $amount,
100
  'price_id' => $price_id,
101
  );
102
 
includes/admin/settings/register-settings.php CHANGED
@@ -1983,7 +1983,7 @@ if ( ! function_exists( 'edd_license_key_callback' ) ) {
1983
  $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
1984
  $html = '<input type="text" class="' . $size . '-text" id="edd_settings[' . $args['id'] . ']" name="edd_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
1985
 
1986
- if ( is_object( $license ) && 'valid' == $license->license ) {
1987
  $html .= '<input type="submit" class="button-secondary" name="' . $args['id'] . '_deactivate" value="' . __( 'Deactivate License', 'easy-digital-downloads' ) . '"/>';
1988
  }
1989
  $html .= '<label for="edd_settings[' . $args['id'] . ']">' . $args['desc'] . '</label>';
1983
  $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
1984
  $html = '<input type="text" class="' . $size . '-text" id="edd_settings[' . $args['id'] . ']" name="edd_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
1985
 
1986
+ if ( ( is_object( $license ) && 'valid' == $license->license ) || 'valid' == $license ) {
1987
  $html .= '<input type="submit" class="button-secondary" name="' . $args['id'] . '_deactivate" value="' . __( 'Deactivate License', 'easy-digital-downloads' ) . '"/>';
1988
  }
1989
  $html .= '<label for="edd_settings[' . $args['id'] . ']">' . $args['desc'] . '</label>';
includes/class-edd-customer.php CHANGED
@@ -575,7 +575,7 @@ class EDD_Customer {
575
 
576
  $all_notes = $this->db->get_column( 'notes', $this->id );
577
 
578
- return $all_notes;
579
 
580
  }
581
 
575
 
576
  $all_notes = $this->db->get_column( 'notes', $this->id );
577
 
578
+ return (string) $all_notes;
579
 
580
  }
581
 
includes/payments/class-edd-payment.php CHANGED
@@ -321,17 +321,22 @@ final class EDD_Payment {
321
  * Magic GET function
322
  *
323
  * @since 2.5
324
- * @param string $name The property
325
  * @return mixed The value
326
  */
327
- public function __get( $name ) {
328
 
329
- if ( 'fees' === $name ) {
330
- return $this->get_fees();
331
- }
 
 
332
 
333
- return $this->$name;
334
 
 
 
 
335
  }
336
 
337
  /**
@@ -340,22 +345,22 @@ final class EDD_Payment {
340
  * Sets up the pending array for the save method
341
  *
342
  * @since 2.5
343
- * @param string $name The property name
344
  * @param mixed $value The value of the property
345
  */
346
- public function __set( $name, $value ) {
347
  $ignore = array( 'downloads', 'cart_details', 'fees', '_ID' );
348
 
349
- if ( $name === 'status' ) {
350
  $this->old_status = $this->status;
351
  }
352
 
353
- if ( ! in_array( $name, $ignore ) ) {
354
- $this->pending[ $name ] = $value;
355
  }
356
 
357
- if( '_ID' !== $name ) {
358
- $this->$name = $value;
359
  }
360
  }
361
 
@@ -471,10 +476,12 @@ final class EDD_Payment {
471
  date_default_timezone_set( edd_get_timezone_id() );
472
 
473
  // Construct the payment title
474
- $payment_tite = '';
475
 
476
  if ( ! empty( $this->first_name ) && ! empty( $this->last_name ) ) {
477
  $payment_title = $this->first_name . ' ' . $this->last_name;
 
 
478
  } else if ( ! empty( $this->email ) && is_email( $this->email ) ) {
479
  $payment_title = $this->email;
480
  }
@@ -1247,7 +1254,7 @@ final class EDD_Payment {
1247
  }
1248
  }
1249
 
1250
- return $fees;
1251
  }
1252
 
1253
  /**
@@ -1513,7 +1520,7 @@ final class EDD_Payment {
1513
 
1514
  $date = ( $date = $this->get_meta( '_edd_completed_date', true ) ) ? $date : $payment->modified_date;
1515
 
1516
- return apply_filters( 'edd_payment_completed_date', $date, $this->ID, $this );
1517
  }
1518
 
1519
  private function setup_mode() {
@@ -1557,7 +1564,8 @@ final class EDD_Payment {
1557
 
1558
  }
1559
 
1560
- return apply_filters( 'edd_get_payment_tax', $tax, $this->ID, $this );
 
1561
  }
1562
 
1563
  /**
@@ -1590,7 +1598,7 @@ final class EDD_Payment {
1590
 
1591
  }
1592
 
1593
- return apply_filters( 'edd_get_payment_subtotal', $subtotal, $this->ID, $this );
1594
  }
1595
 
1596
  /**
@@ -1602,7 +1610,7 @@ final class EDD_Payment {
1602
  */
1603
  private function setup_discounts() {
1604
  $discounts = ! empty( $this->payment_meta['user_info']['discount'] ) ? $this->payment_meta['user_info']['discount'] : array();
1605
- return apply_filters( 'edd_payment_discounts', $discounts, $this->ID );
1606
  }
1607
 
1608
  /**
@@ -1614,7 +1622,7 @@ final class EDD_Payment {
1614
  */
1615
  private function setup_currency() {
1616
  $currency = isset( $this->payment_meta['currency'] ) ? $this->payment_meta['currency'] : edd_get_currency();
1617
- return apply_filters( 'edd_payment_currency_code', $currency, $this->ID, $this );
1618
  }
1619
 
1620
  /**
@@ -1626,7 +1634,7 @@ final class EDD_Payment {
1626
  */
1627
  private function setup_fees() {
1628
  $payment_fees = isset( $this->payment_meta['fees'] ) ? $this->payment_meta['fees'] : array();
1629
- return apply_filters( 'edd_get_payment_fees', $payment_fees, $this->ID );
1630
  }
1631
 
1632
  /**
@@ -1637,7 +1645,7 @@ final class EDD_Payment {
1637
  */
1638
  private function setup_gateway() {
1639
  $gateway = $this->get_meta( '_edd_payment_gateway', true );
1640
- return apply_filters( 'edd_payment_gateway', $gateway, $this );
1641
  }
1642
 
1643
  /**
@@ -1657,7 +1665,7 @@ final class EDD_Payment {
1657
 
1658
  }
1659
 
1660
- return apply_filters( 'edd_get_payment_transaction_id', $transaction_id, $this->ID, $this );
1661
  }
1662
 
1663
  /**
@@ -1668,7 +1676,7 @@ final class EDD_Payment {
1668
  */
1669
  private function setup_ip() {
1670
  $ip = $this->get_meta( '_edd_payment_user_ip', true );
1671
- return apply_filters( 'edd_payment_user_ip', $ip, $this );
1672
  }
1673
 
1674
  /**
@@ -1679,7 +1687,7 @@ final class EDD_Payment {
1679
  */
1680
  private function setup_customer_id() {
1681
  $customer_id = $this->get_meta( '_edd_payment_customer_id', true );
1682
- return apply_filters( 'edd_payment_customer_id', $customer_id, $this );
1683
  }
1684
 
1685
  /**
@@ -1690,7 +1698,7 @@ final class EDD_Payment {
1690
  */
1691
  private function setup_user_id() {
1692
  $user_id = $this->get_meta( '_edd_payment_user_id', true );
1693
- return apply_filters( 'edd_payment_user_id', $user_id, $this );
1694
  }
1695
 
1696
  /**
@@ -1706,7 +1714,7 @@ final class EDD_Payment {
1706
  $email = EDD()->customers->get_column( 'email', $this->customer_id );
1707
  }
1708
 
1709
- return apply_filters( 'edd_payment_user_email', $email, $this );
1710
  }
1711
 
1712
  /**
@@ -1725,7 +1733,8 @@ final class EDD_Payment {
1725
 
1726
  $user_info = isset( $this->payment_meta['user_info'] ) ? $this->payment_meta['user_info'] : array();
1727
  $user_info = wp_parse_args( $user_info, $defaults );
1728
- return apply_filters( 'edd_payment_meta_user_info', $user_info );
 
1729
  }
1730
 
1731
  /**
@@ -1737,8 +1746,7 @@ final class EDD_Payment {
1737
  */
1738
  private function setup_address() {
1739
  $address = ! empty( $this->payment_meta['user_info']['address'] ) ? $this->payment_meta['user_info']['address'] : array( 'line1' => '', 'line2' => '', 'city' => '', 'country' => '', 'state' => '', 'zip' => '' );
1740
-
1741
- return apply_filters( 'edd_payment_address', $address, $this );
1742
  }
1743
 
1744
  /**
@@ -1749,7 +1757,7 @@ final class EDD_Payment {
1749
  */
1750
  private function setup_payment_key() {
1751
  $key = $this->get_meta( '_edd_payment_purchase_key', true );
1752
- return apply_filters( 'edd_payment_key', $key, $this->ID, $this );
1753
  }
1754
 
1755
  /**
@@ -1773,7 +1781,7 @@ final class EDD_Payment {
1773
 
1774
  }
1775
 
1776
- return apply_filters( 'edd_payment_number', $number, $this->ID, $this );
1777
  }
1778
 
1779
  /**
@@ -1785,7 +1793,7 @@ final class EDD_Payment {
1785
  */
1786
  private function setup_cart_details() {
1787
  $cart_details = isset( $this->payment_meta['cart_details'] ) ? maybe_unserialize( $this->payment_meta['cart_details'] ) : array();
1788
- return apply_filters( 'edd_payment_cart_details', $cart_details, $this->ID, $this );
1789
  }
1790
 
1791
  /**
@@ -1797,7 +1805,7 @@ final class EDD_Payment {
1797
  */
1798
  private function setup_downloads() {
1799
  $downloads = isset( $this->payment_meta['downloads'] ) ? maybe_unserialize( $this->payment_meta['downloads'] ) : array();
1800
- return apply_filters( 'edd_payment_meta_downloads', $downloads, $this->ID, $this );
1801
  }
1802
 
1803
  /**
@@ -1808,7 +1816,7 @@ final class EDD_Payment {
1808
  */
1809
  private function setup_has_unlimited() {
1810
  $unlimited = (bool) $this->get_meta( '_edd_payment_unlimited_downloads', true );
1811
- return apply_filters( 'edd_payment_unlimited_downloads', $unlimited, $this );
1812
  }
1813
 
1814
  /**
@@ -1820,4 +1828,184 @@ final class EDD_Payment {
1820
  return get_object_vars( $this );
1821
  }
1822
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1823
  }
321
  * Magic GET function
322
  *
323
  * @since 2.5
324
+ * @param string $key The property
325
  * @return mixed The value
326
  */
327
+ public function __get( $key ) {
328
 
329
+ if ( method_exists( $this, 'get_' . $key ) ) {
330
+
331
+ $value = call_user_func( array( $this, 'get_' . $key ) );
332
+
333
+ } else {
334
 
335
+ $value = $this->$key;
336
 
337
+ }
338
+
339
+ return $value;
340
  }
341
 
342
  /**
345
  * Sets up the pending array for the save method
346
  *
347
  * @since 2.5
348
+ * @param string $key The property name
349
  * @param mixed $value The value of the property
350
  */
351
+ public function __set( $key, $value ) {
352
  $ignore = array( 'downloads', 'cart_details', 'fees', '_ID' );
353
 
354
+ if ( $key === 'status' ) {
355
  $this->old_status = $this->status;
356
  }
357
 
358
+ if ( ! in_array( $key, $ignore ) ) {
359
+ $this->pending[ $key ] = $value;
360
  }
361
 
362
+ if( '_ID' !== $key ) {
363
+ $this->$key = $value;
364
  }
365
  }
366
 
476
  date_default_timezone_set( edd_get_timezone_id() );
477
 
478
  // Construct the payment title
479
+ $payment_title = '';
480
 
481
  if ( ! empty( $this->first_name ) && ! empty( $this->last_name ) ) {
482
  $payment_title = $this->first_name . ' ' . $this->last_name;
483
+ } else if ( ! empty( $this->first_name ) && empty( $this->last_name ) ) {
484
+ $payment_title = $this->first_name;
485
  } else if ( ! empty( $this->email ) && is_email( $this->email ) ) {
486
  $payment_title = $this->email;
487
  }
1254
  }
1255
  }
1256
 
1257
+ return apply_filters( 'edd_get_payment_fees', $fees, $this->ID, $this );
1258
  }
1259
 
1260
  /**
1520
 
1521
  $date = ( $date = $this->get_meta( '_edd_completed_date', true ) ) ? $date : $payment->modified_date;
1522
 
1523
+ return $date;
1524
  }
1525
 
1526
  private function setup_mode() {
1564
 
1565
  }
1566
 
1567
+ return $tax;
1568
+
1569
  }
1570
 
1571
  /**
1598
 
1599
  }
1600
 
1601
+ return $subtotal;
1602
  }
1603
 
1604
  /**
1610
  */
1611
  private function setup_discounts() {
1612
  $discounts = ! empty( $this->payment_meta['user_info']['discount'] ) ? $this->payment_meta['user_info']['discount'] : array();
1613
+ return $discounts;
1614
  }
1615
 
1616
  /**
1622
  */
1623
  private function setup_currency() {
1624
  $currency = isset( $this->payment_meta['currency'] ) ? $this->payment_meta['currency'] : edd_get_currency();
1625
+ return $currency;
1626
  }
1627
 
1628
  /**
1634
  */
1635
  private function setup_fees() {
1636
  $payment_fees = isset( $this->payment_meta['fees'] ) ? $this->payment_meta['fees'] : array();
1637
+ return $payment_fees;
1638
  }
1639
 
1640
  /**
1645
  */
1646
  private function setup_gateway() {
1647
  $gateway = $this->get_meta( '_edd_payment_gateway', true );
1648
+ return $gateway;
1649
  }
1650
 
1651
  /**
1665
 
1666
  }
1667
 
1668
+ return $transaction_id;
1669
  }
1670
 
1671
  /**
1676
  */
1677
  private function setup_ip() {
1678
  $ip = $this->get_meta( '_edd_payment_user_ip', true );
1679
+ return $ip;
1680
  }
1681
 
1682
  /**
1687
  */
1688
  private function setup_customer_id() {
1689
  $customer_id = $this->get_meta( '_edd_payment_customer_id', true );
1690
+ return $customer_id;
1691
  }
1692
 
1693
  /**
1698
  */
1699
  private function setup_user_id() {
1700
  $user_id = $this->get_meta( '_edd_payment_user_id', true );
1701
+ return $user_id;
1702
  }
1703
 
1704
  /**
1714
  $email = EDD()->customers->get_column( 'email', $this->customer_id );
1715
  }
1716
 
1717
+ return $email;
1718
  }
1719
 
1720
  /**
1733
 
1734
  $user_info = isset( $this->payment_meta['user_info'] ) ? $this->payment_meta['user_info'] : array();
1735
  $user_info = wp_parse_args( $user_info, $defaults );
1736
+
1737
+ return $user_info;
1738
  }
1739
 
1740
  /**
1746
  */
1747
  private function setup_address() {
1748
  $address = ! empty( $this->payment_meta['user_info']['address'] ) ? $this->payment_meta['user_info']['address'] : array( 'line1' => '', 'line2' => '', 'city' => '', 'country' => '', 'state' => '', 'zip' => '' );
1749
+ return $address;
 
1750
  }
1751
 
1752
  /**
1757
  */
1758
  private function setup_payment_key() {
1759
  $key = $this->get_meta( '_edd_payment_purchase_key', true );
1760
+ return $key;
1761
  }
1762
 
1763
  /**
1781
 
1782
  }
1783
 
1784
+ return $number;
1785
  }
1786
 
1787
  /**
1793
  */
1794
  private function setup_cart_details() {
1795
  $cart_details = isset( $this->payment_meta['cart_details'] ) ? maybe_unserialize( $this->payment_meta['cart_details'] ) : array();
1796
+ return $cart_details;
1797
  }
1798
 
1799
  /**
1805
  */
1806
  private function setup_downloads() {
1807
  $downloads = isset( $this->payment_meta['downloads'] ) ? maybe_unserialize( $this->payment_meta['downloads'] ) : array();
1808
+ return $downloads;
1809
  }
1810
 
1811
  /**
1816
  */
1817
  private function setup_has_unlimited() {
1818
  $unlimited = (bool) $this->get_meta( '_edd_payment_unlimited_downloads', true );
1819
+ return $unlimited;
1820
  }
1821
 
1822
  /**
1828
  return get_object_vars( $this );
1829
  }
1830
 
1831
+ /**
1832
+ * Retrieve payment cart details
1833
+ *
1834
+ * @since 2.5.1
1835
+ * @return array Cart details array
1836
+ */
1837
+ private function get_cart_details() {
1838
+ return apply_filters( 'edd_payment_cart_details', $this->cart_details, $this->ID, $this );
1839
+ }
1840
+
1841
+ /**
1842
+ * Retrieve payment completion date
1843
+ *
1844
+ * @since 2.5.1
1845
+ * @return string Date payment was completed
1846
+ */
1847
+ private function get_completed_date() {
1848
+ return apply_filters( 'edd_payment_completed_date', $this->completed_date, $this->ID, $this );
1849
+ }
1850
+
1851
+ /**
1852
+ * Retrieve payment tax
1853
+ *
1854
+ * @since 2.5.1
1855
+ * @return float Payment tax
1856
+ */
1857
+ private function get_tax() {
1858
+ return apply_filters( 'edd_get_payment_tax', $this->tax, $this->ID, $this );
1859
+ }
1860
+
1861
+ /**
1862
+ * Retrieve payment subtotal
1863
+ *
1864
+ * @since 2.5.1
1865
+ * @return float Payment subtotal
1866
+ */
1867
+ private function get_subtotal() {
1868
+ return apply_filters( 'edd_get_payment_subtotal', $this->subtotal, $this->ID, $this );
1869
+ }
1870
+
1871
+ /**
1872
+ * Retrieve payment discounts
1873
+ *
1874
+ * @since 2.5.1
1875
+ * @return array Discount codes on payment
1876
+ */
1877
+ private function get_discounts() {
1878
+ return apply_filters( 'edd_payment_discounts', $this->discounts, $this->ID, $this );
1879
+ }
1880
+
1881
+ /**
1882
+ * Retrieve payment currency
1883
+ *
1884
+ * @since 2.5.1
1885
+ * @return string Payment currency code
1886
+ */
1887
+ private function get_currency() {
1888
+ return apply_filters( 'edd_payment_currency_code', $this->currency, $this->ID, $this );
1889
+ }
1890
+
1891
+ /**
1892
+ * Retrieve payment gateway
1893
+ *
1894
+ * @since 2.5.1
1895
+ * @return string Gateway used
1896
+ */
1897
+ private function get_gateway() {
1898
+ return apply_filters( 'edd_payment_gateway', $this->gateway, $this->ID, $this );
1899
+ }
1900
+
1901
+ /**
1902
+ * Retrieve payment transaction ID
1903
+ *
1904
+ * @since 2.5.1
1905
+ * @return string Transaction ID from merchant processor
1906
+ */
1907
+ private function get_transaction_id() {
1908
+ return apply_filters( 'edd_get_payment_transaction_id', $this->transaction_id, $this->ID, $this );
1909
+ }
1910
+
1911
+ /**
1912
+ * Retrieve payment IP
1913
+ *
1914
+ * @since 2.5.1
1915
+ * @return string Payment IP address
1916
+ */
1917
+ private function get_ip() {
1918
+ return apply_filters( 'edd_payment_user_ip', $this->ip, $this->ID, $this );
1919
+ }
1920
+
1921
+ /**
1922
+ * Retrieve payment customer ID
1923
+ *
1924
+ * @since 2.5.1
1925
+ * @return int Payment customer ID
1926
+ */
1927
+ private function get_customer_id() {
1928
+ return apply_filters( 'edd_payment_customer_id', $this->customer_id, $this->ID, $this );
1929
+ }
1930
+
1931
+ /**
1932
+ * Retrieve payment user ID
1933
+ *
1934
+ * @since 2.5.1
1935
+ * @return int Payment user ID
1936
+ */
1937
+ private function get_user_id() {
1938
+ return apply_filters( 'edd_payment_user_id', $this->user_id, $this->ID, $this );
1939
+ }
1940
+
1941
+ /**
1942
+ * Retrieve payment email
1943
+ *
1944
+ * @since 2.5.1
1945
+ * @return string Payment customer email
1946
+ */
1947
+ private function get_email() {
1948
+ return apply_filters( 'edd_payment_user_email', $this->email, $this->ID, $this );
1949
+ }
1950
+
1951
+ /**
1952
+ * Retrieve payment user info
1953
+ *
1954
+ * @since 2.5.1
1955
+ * @return array Payment user info
1956
+ */
1957
+ private function get_user_info() {
1958
+ return apply_filters( 'edd_payment_meta_user_info', $this->user_info, $this->ID, $this );
1959
+ }
1960
+
1961
+ /**
1962
+ * Retrieve payment billing address
1963
+ *
1964
+ * @since 2.5.1
1965
+ * @return array Payment billing address
1966
+ */
1967
+ private function get_address() {
1968
+ return apply_filters( 'edd_payment_address', $this->address, $this->ID, $this );
1969
+ }
1970
+
1971
+ /**
1972
+ * Retrieve payment key
1973
+ *
1974
+ * @since 2.5.1
1975
+ * @return string Payment key
1976
+ */
1977
+ private function get_key() {
1978
+ return apply_filters( 'edd_payment_key', $this->key, $this->ID, $this );
1979
+ }
1980
+
1981
+ /**
1982
+ * Retrieve payment number
1983
+ *
1984
+ * @since 2.5.1
1985
+ * @return int|string Payment number
1986
+ */
1987
+ private function get_number() {
1988
+ return apply_filters( 'edd_payment_number', $this->number, $this->ID, $this );
1989
+ }
1990
+
1991
+ /**
1992
+ * Retrieve downloads on payment
1993
+ *
1994
+ * @since 2.5.1
1995
+ * @return array Payment downloads
1996
+ */
1997
+ private function get_downloads() {
1998
+ return apply_filters( 'edd_payment_meta_downloads', $this->downloads, $this->ID, $this );
1999
+ }
2000
+
2001
+ /**
2002
+ * Retrieve unlimited file downloads status
2003
+ *
2004
+ * @since 2.5.1
2005
+ * @return bool Is unlimted
2006
+ */
2007
+ private function get_unlimited() {
2008
+ return apply_filters( 'edd_payment_unlimited_downloads', $this->unlimited, $this->ID, $this );
2009
+ }
2010
+
2011
  }
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: download, downloads, e-store, eshop, digital downloads, e-downloads, ecomm
7
  Requires at least: 4.0
8
  Tested up to: 4.5
9
 
10
- Stable Tag: 2.5
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
@@ -215,6 +215,14 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
215
 
216
  == Changelog ==
217
 
 
 
 
 
 
 
 
 
218
  = 2.5, January 7, 2016 =
219
 
220
  * New: Improved settings organization with subsections
7
  Requires at least: 4.0
8
  Tested up to: 4.5
9
 
10
+ Stable Tag: 2.5.1
11
 
12
  License: GNU Version 2 or Any Later Version
13
 
215
 
216
  == Changelog ==
217
 
218
+ = 2.5.1, January 7, 2016 =
219
+
220
+ * Fix: Infinite loop in some instances where add_filter() is used by extensions
221
+ * Fix: Deactivate License button missing on valid license keys
222
+ * Fix: Payments not properly attached to customer records if last name is not supplied during checkout while logged out
223
+ * Fix: Item amounts not saving properly when adding new Download to payment record
224
+ * Fix: PHP warning on explode() due to empty customer notes field
225
+
226
  = 2.5, January 7, 2016 =
227
 
228
  * New: Improved settings organization with subsections