@@ -83,6 +83,9 @@ discard block |
||
| 83 | 83 | return $value; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | + /** |
|
| 87 | + * @param string $key |
|
| 88 | + */ |
|
| 86 | 89 | public function set( $key, $value ) { |
| 87 | 90 | $ignore = array( 'items', 'cart_details', 'fees', '_ID' ); |
| 88 | 91 | |
@@ -921,6 +924,9 @@ discard block |
||
| 921 | 924 | return $removed; |
| 922 | 925 | } |
| 923 | 926 | |
| 927 | + /** |
|
| 928 | + * @param string $key |
|
| 929 | + */ |
|
| 924 | 930 | public function remove_fee_by( $key, $value, $global = false ) { |
| 925 | 931 | $allowed_fee_keys = apply_filters( 'wpinv_fee_keys', array( |
| 926 | 932 | 'index', 'label', 'amount', 'type', |
@@ -1380,6 +1386,9 @@ discard block |
||
| 1380 | 1386 | return apply_filters( 'wpinv_get_invoice_final_total', $final_total, $this, $currency ); |
| 1381 | 1387 | } |
| 1382 | 1388 | |
| 1389 | + /** |
|
| 1390 | + * @return boolean |
|
| 1391 | + */ |
|
| 1383 | 1392 | public function get_discounts( $array = false ) { |
| 1384 | 1393 | $discounts = $this->discounts; |
| 1385 | 1394 | if ( $array && $discounts ) { |
@@ -1388,6 +1397,9 @@ discard block |
||
| 1388 | 1397 | return apply_filters( 'wpinv_payment_discounts', $discounts, $this->ID, $this, $array ); |
| 1389 | 1398 | } |
| 1390 | 1399 | |
| 1400 | + /** |
|
| 1401 | + * @return string |
|
| 1402 | + */ |
|
| 1391 | 1403 | public function get_discount( $currency = false, $dash = false ) { |
| 1392 | 1404 | if ( !empty( $this->discounts ) ) { |
| 1393 | 1405 | global $ajax_cart_details; |
@@ -1490,10 +1502,16 @@ discard block |
||
| 1490 | 1502 | return apply_filters( 'wpinv_user_full_name', $this->full_name, $this->ID, $this ); |
| 1491 | 1503 | } |
| 1492 | 1504 | |
| 1505 | + /** |
|
| 1506 | + * @return string |
|
| 1507 | + */ |
|
| 1493 | 1508 | public function get_user_info() { |
| 1494 | 1509 | return apply_filters( 'wpinv_user_info', $this->user_info, $this->ID, $this ); |
| 1495 | 1510 | } |
| 1496 | 1511 | |
| 1512 | + /** |
|
| 1513 | + * @return string |
|
| 1514 | + */ |
|
| 1497 | 1515 | public function get_email() { |
| 1498 | 1516 | return apply_filters( 'wpinv_user_email', $this->email, $this->ID, $this ); |
| 1499 | 1517 | } |
@@ -1536,10 +1554,16 @@ discard block |
||
| 1536 | 1554 | return apply_filters( 'wpinv_currency_code', $this->currency, $this->ID, $this ); |
| 1537 | 1555 | } |
| 1538 | 1556 | |
| 1557 | + /** |
|
| 1558 | + * @return string |
|
| 1559 | + */ |
|
| 1539 | 1560 | public function get_created_date() { |
| 1540 | 1561 | return apply_filters( 'wpinv_created_date', $this->date, $this->ID, $this ); |
| 1541 | 1562 | } |
| 1542 | 1563 | |
| 1564 | + /** |
|
| 1565 | + * @return string |
|
| 1566 | + */ |
|
| 1543 | 1567 | public function get_due_date( $display = false ) { |
| 1544 | 1568 | $due_date = apply_filters( 'wpinv_due_date', $this->due_date, $this->ID, $this ); |
| 1545 | 1569 | |
@@ -2103,6 +2127,9 @@ discard block |
||
| 2103 | 2127 | return apply_filters( 'wpinv_invoice_get_subscription_name', $name, $this ); |
| 2104 | 2128 | } |
| 2105 | 2129 | |
| 2130 | + /** |
|
| 2131 | + * @return string |
|
| 2132 | + */ |
|
| 2106 | 2133 | public function get_expiration() { |
| 2107 | 2134 | $expiration = $this->get_meta( '_wpinv_subscr_expiration', true ); |
| 2108 | 2135 | return $expiration; |
@@ -2118,6 +2145,9 @@ discard block |
||
| 2118 | 2145 | return $cancelled_date; |
| 2119 | 2146 | } |
| 2120 | 2147 | |
| 2148 | + /** |
|
| 2149 | + * @return string |
|
| 2150 | + */ |
|
| 2121 | 2151 | public function get_trial_end_date( $formatted = true ) { |
| 2122 | 2152 | if ( !$this->is_free_trial() || ! ( $this->is_paid() || $this->is_refunded() ) ) { |
| 2123 | 2153 | return NULL; |
@@ -2139,6 +2169,9 @@ discard block |
||
| 2139 | 2169 | return $trial_end_date; |
| 2140 | 2170 | } |
| 2141 | 2171 | |
| 2172 | + /** |
|
| 2173 | + * @return string |
|
| 2174 | + */ |
|
| 2142 | 2175 | public function get_subscription_created( $default = true ) { |
| 2143 | 2176 | $created = $this->get_meta( '_wpinv_subscr_created', true ); |
| 2144 | 2177 | |
@@ -2148,6 +2181,9 @@ discard block |
||
| 2148 | 2181 | return $created; |
| 2149 | 2182 | } |
| 2150 | 2183 | |
| 2184 | + /** |
|
| 2185 | + * @return string |
|
| 2186 | + */ |
|
| 2151 | 2187 | public function get_subscription_start( $formatted = true ) { |
| 2152 | 2188 | if ( ! ( $this->is_paid() || $this->is_refunded() ) ) { |
| 2153 | 2189 | return '-'; |