| @@ 853-864 (lines=12) @@ | ||
| 850 | * @return void |
|
| 851 | * @throws \EE_Error |
|
| 852 | */ |
|
| 853 | public function increase_reserved( $qty = 1 ) { |
|
| 854 | $qty = absint( $qty ); |
|
| 855 | $reserved = $this->reserved() + $qty; |
|
| 856 | $this->_increase_reserved_for_datetimes( $qty ); |
|
| 857 | $this->set_reserved( $reserved ); |
|
| 858 | do_action( |
|
| 859 | 'AHEE__EE_Ticket__increase_reserved', |
|
| 860 | $this, |
|
| 861 | $qty, |
|
| 862 | $reserved |
|
| 863 | ); |
|
| 864 | } |
|
| 865 | ||
| 866 | ||
| 867 | ||
| @@ 897-909 (lines=13) @@ | ||
| 894 | * @return void |
|
| 895 | * @throws \EE_Error |
|
| 896 | */ |
|
| 897 | public function decrease_reserved( $qty = 1, $adjust_datetimes = true ) { |
|
| 898 | $reserved = $this->reserved() - absint( $qty ); |
|
| 899 | if ( $adjust_datetimes ) { |
|
| 900 | $this->_decrease_reserved_for_datetimes( $qty ); |
|
| 901 | } |
|
| 902 | $this->set_reserved( $reserved ); |
|
| 903 | do_action( |
|
| 904 | 'AHEE__EE_Ticket__decrease_reserved', |
|
| 905 | $this, |
|
| 906 | $qty, |
|
| 907 | $reserved |
|
| 908 | ); |
|
| 909 | } |
|
| 910 | ||
| 911 | ||
| 912 | ||